User-scoped skills install under $CODEX_HOME/skills (default: ~/.codex/skills).
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_text so 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.md exists, read it first and confirm the original user prompt is recorded at the top (prefix with Original prompt:). Also note any TODOs and suggestions left by the previous agent. If missing, create it and write Original prompt: <prompt> at the top before appending updates.
Verify Playwright availability. Ensure is available (local dependency or global install). If unsure, check first.
playwright
npx
Run the Playwright test script. You must run $WEB_GAME_CLIENT after each meaningful change; do not invent a new client unless required.
Use the payload reference. Base actions on $WEB_GAME_ACTIONS to 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_text reflects the same state shown on screen. If anything is off, fix and rerun.
Examples of important interactions: move, jump, shoot/attack, interact/use, select/confirm/cancel in menus, pause/resume, restart, and any special abilities or puzzle actions defined by the request. Multi-step examples: shooting an enemy should reduce its health; when health reaches 0 it should disappear and update the score; collecting a key should unlock a door and allow level progression.
Check errors. Review console errors and fix the first new issue before continuing.
Reset between scenarios. Avoid cross-test state when validating distinct features.
Iterate with small deltas. Change one variable at a time (frames, inputs, timing, positions), then repeat steps 7–13 until stable.
Test any new features added for the request and any areas your logic changes could affect. Identify issues, fix them, and re-run the tests to confirm they’re resolved.
Any special actions tied to the request (powerups, combos, abilities, puzzles, timers).
Test Artifacts to Review
Latest screenshots from the Playwright run.
Latest render_game_to_text JSON output.
Console error logs (fix the first new error before continuing).
You must actually open and visually inspect the latest screenshots after running the Playwright script, not just generate them. Ensure everything that should be visible on screen is actually visible. Go beyond the start screen and capture gameplay screenshots that cover all newly added features. Treat the screenshots as the source of truth; if something is missing, it is missing in the build. If you suspect a headless/WebGL capture issue, rerun the Playwright script in headed mode and re-check. Fix and rerun in a tight loop until the screenshots and text state look correct. Once fixes are verified, re-test all important interactions and controls, confirm they work, and ensure your changes did not introduce regressions. If they did, fix them and rerun everything in a loop until interactions, text state, and controls all work as expected. Be exhaustive in testing controls; broken games are not acceptable.
Core Game Guidelines
Canvas + Layout
Prefer a single canvas centered in the window.
Visuals
Keep on-screen text minimal; show controls on a start/menu screen rather than overlaying them during play.
Avoid overly dark scenes unless the design calls for it. Make key elements easy to see.
Draw the background on the canvas itself instead of relying on CSS backgrounds.
Text State Output (render_game_to_text)
Expose a window.render_game_to_text function that returns a concise JSON string representing the current game state. The text should include enough information to play the game without visuals.
Keep the payload succinct and biased toward on-screen/interactive elements. Prefer current, visible entities over full history.
Include a clear coordinate system note (origin and axis directions), and encode all player-relevant state: player position/velocity, active obstacles/enemies, collectibles, timers/cooldowns, score, and any mode/state flags needed to make correct decisions. Avoid large histories; only include what's currently relevant and visible.
Time Stepping Hook
Provide a deterministic time-stepping hook so the Playwright client can advance the game in controlled increments. Expose window.advanceTime(ms) (or a thin wrapper that forwards to your game update loop) and have the game loop use it when present.
The Playwright test script uses this hook to step frames deterministically during automated testing.
Minimal pattern:
window.advanceTime = (ms) => {
const steps = Math.max(1, Math.round(ms / (1000 / 60)));
for (let i = 0; i < steps; i++) update(1 / 60);
render();
};
Fullscreen Toggle
Use a single key (prefer f) to toggle fullscreen on/off.
Allow Esc to exit fullscreen.
When fullscreen toggles, resize the canvas/rendering so visuals and input mapping stay correct.
Progress Tracking
Create a progress.md file if it doesn't exist, and append TODOs, notes, gotchas, and loose ends as you go so another agent can pick up seamlessly.
If a progress.md file already exists, read it first, including the original user prompt at the top (you may be continuing another agent's work). Do not overwrite the original prompt; preserve it.
Update progress.md after each meaningful chunk of work (feature added, bug found, test run, or decision made).
At the end of your work, leave TODOs and suggestions for the next agent in progress.md.
Playwright Prerequisites
Prefer a local playwright dependency if the project already has it.
If unsure whether Playwright is available, check for npx:
command -v npx >/dev/null 2>&1
If npx is missing, install Node/npm and then install Playwright globally:
npm install -g @playwright/mcp@latest
Do not switch to @playwright/test unless explicitly asked; stick to the client script.
Scripts
$WEB_GAME_CLIENT (installed default: $CODEX_HOME/skills/develop-web-game/scripts/web_game_playwright_client.js) — Playwright-based action loop with virtual-time stepping, screenshot capture, and console error buffering. You must pass an action burst via --actions-file, --actions-json, or --click.
References
$WEB_GAME_ACTIONS (installed default: $CODEX_HOME/skills/develop-web-game/references/action_payloads.json) — example action payloads (keyboard + mouse, per-frame capture). Use these to build your burst.
Research-backed changes
The biggest delta is Show HN: Baton – A desktop app for developing with AI agents. Fold the concrete changes into the operating notes, then discard the fluff.
Refresh $develop-web-game-107b1b from the tracked sources. Capture only concrete changes, fold them into the skill, and stay terse.
Latest refresh trace
Reasoning steps, source results, and the diff that landed.
Apr 11, 2026 · 9:28 AM
triggerAutomation
editoropenai/gpt-5-mini
duration123.4s
statussuccess
web searches4
Revision: v7
Minor update: clarified React Server Components security guidance to include additional vulnerabilities disclosed on 2025-12-11 and strengthened remediation instructions; bumped skill version.
- Security note: added follow-up vulnerabilities (CVE-2025-55184, CVE-2025-55183) and audit/upgrade guidance
- Bumped skill version label and updated Research-backed changes list
- No behavioral changes to Playwright workflow or agent orchestration
Agent steps
Step 1Started scanning 5 sources.
Step 2Vercel atom: No fresh signals found.
Step 3React rss: 12 fresh signals captured.
Step 4Github releases: No fresh signals found.
Step 5Hnrss show: 12 fresh signals captured.
Step 6Playwright Docs - MCP: No fresh signals found.
Step 7Agent is rewriting the skill body from the fetched source deltas.
+Summary: Develop Web Game agent run was interrupted: Free credits temporarily have rate limits in place due to abuse. We are working on a resolution. Try again later, or pay for credits which continue to have unrestricted access. Pur
+What changed: Agent crashed mid-run after 0 search(es). (agent error: Free credits temporarily have rate limits in place due to abuse. We are working on a resolution. Try again later, or pay for credits which continue to have unrestricted access. Purchase credits at htt)
+Body changed: no
−Generated:2026-04-01T12:27:05.213Z
+Editor:openai/gpt-5-mini
−Summary: Develop Web Game now tracks Show HN: Baton – A desktop app for developing with AI agents and 3 other fresh signals.
−What changed: The biggest delta is Show HN: Baton – A desktop app for developing with AI agents. Fold the concrete changes into the operating notes, then discard the fluff.
−Body changed: yes
−Editor: heuristic-fallback
−Changed sections: Research-backed changes
Experiments:
+- Re-run after the issue is resolved.
+- Add a higher-signal source.
−- Addonenewtacticbasedon Show HN: Baton – A desktop app for developing with AI agents.
+- Checkgatewaycreditsorratelimits.
−- Rewrite one stale section with today's source language.
−- Turn the top signal into a reusable agent prompt.
Signals:
+- Show HN: Anonymous Chat Channels (Hnrss show)
+- Show HN: Stashpin – Pinterest downloader for videos and boards (Hnrss show)
+- Show HN: Apfel – The free AI on your Mac (Hnrss show)
−- Show HN: Baton–AdesktopappfordevelopingwithAIagents (Hnrss show)
+- Show HN: Myportfolioasaworkingterminal(vanillaJavaScript,oneHTMLfile) (Hnrss show)
−- Show HN: An agent that adapts by creating new tools to suit its task on the fly (Hnrss show)
−- Show HN: RequestHunt – One prompt to install, know what users want while coding (Hnrss show)
−- Show HN: ShellAgent – Open-source agentic terminal, bring your own API (Hnrss show)
Update history2▶
Apr 3, 20264 sources
Develop Web Game agent run was interrupted: Free credits temporarily have rate limits in place due to abuse. We are working on a resolution. Try again later, or pay for credits which continue to have unrestricted access. Pur
Apr 1, 20264 sources
Develop Web Game now tracks Show HN: Baton – A desktop app for developing with AI agents and 3 other fresh signals.