openai-develop-web-game
Installation
SKILL.md
Develop Web Game
Build games in small steps and validate every change. Treat each iteration as: implement → act → pause → observe → adjust.
Scripts and references are located under {baseDir}/.
Workflow
- Pick a goal. Define a single feature or behavior to implement.
- Implement small. Make the smallest change that moves the game forward.
- Ensure integration points. Provide a single canvas and
window.render_game_to_textso the test loop can read state. - Add
window.advanceTime(ms). Strongly prefer a deterministic step hook so the Playwright script can advance frames reliably; without it, automated tests can be flaky. - Initialize progress.md. If
progress.mdexists, read it first and confirm the original user prompt is recorded at the top (prefix withOriginal prompt:). Also note any TODOs and suggestions left by the previous agent. If missing, create it and writeOriginal prompt: <prompt>at the top before appending updates. - Verify Playwright availability. Ensure
playwrightis available (local dependency or global install). If unsure, checknpxfirst. - Run the Playwright test script. You must run
$WEB_GAME_CLIENTafter each meaningful change; do not invent a new client unless required. - Use the payload reference. Base actions on
$WEB_GAME_ACTIONSto avoid guessing keys. - Inspect state. Capture screenshots and text state after each burst.
- Inspect screenshots. Open the latest screenshot, verify expected visuals, fix any issues, and rerun the script. Repeat until correct.
- Verify controls and state (multi-step focus). Exhaustively exercise all important interactions. For each, think through the full multi-step sequence it implies (cause → intermediate states → outcome) and verify the entire chain works end-to-end. Confirm
render_game_to_textreflects the same state shown on screen. If anything is off, fix and rerun.
Related skills