codewisp-game-builderlisted
Install: claude install-skill riteshkew/yc-skills
# Workflow
When this skill triggers, follow these steps in order.
## Step 1 — Capture the game description
Ask the user to describe their game in plain English. Good descriptions include:
- What the player controls and how (keyboard, mouse)
- What the objective is (survive, collect, reach a goal)
- What ends the game or increases the score
- Any enemies, obstacles, or power-ups
Example: "A game where you move a player left and right to dodge blocks falling from the top. Score goes up the longer you survive; getting hit ends the game."
If the user is unsure, suggest the dodge-blocks starter from `examples/input.md`.
## Step 2 — Run the engine
With `cwd` set to the skill root (`skills/codewisp-game-builder/`), run:
```bash
node scripts/gen-game.mjs <description-file> <output-html-file>
```
Or pipe the description directly:
```bash
echo "Your game description here" | node scripts/gen-game.mjs - output/index.html
```
The engine writes a single self-contained `index.html` that:
- Loads kaplay via CDN (`https://unpkg.com/kaplay@3001/dist/kaplay.js`)
- Initialises the game with `kaplay(...)`
- Defines scenes with `scene(...)` (menu, game, game-over)
- Spawns game objects matching the description
- Runs a main loop via `onUpdate(...)` with movement, scoring, and collision
- Handles keyboard input via `onKeyDown(...)`
## Step 3 — Tell the user how to play
After the file is written, instruct the user:
> Open `<output-html-file>` in any browser (double-click or drag into