develop-web-game

Build and test HTML/JS web games with a Playwright-driven action and screenshot loop.

Updated May 11, 2026
One-click install
npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill develop-web-game-cloudofgeorge
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: develop-web-game
Source: https://github.com/cloudofgeorge/AI-hands-Engineer/tree/main/skills/engineering/domains/web/develop-web-game
Command: npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill develop-web-game-cloudofgeorge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) and references (resource) components.

What problem does it solve? Iterating on a web game without automated feedback leads to broken controls, visual regressions, and untested state transitions. This Skill enforces a tight implement-act-pause-observe loop so every change to an HTML/JS game is validated with real browser input, screenshots, and console error checks. ## Core Features & Use Cases - Playwright action loop: Run scripted keyboard and mouse bursts against the game via a dedicated client script, with deterministic frame stepping through a window.advanceTime(ms) hook. - State and visual inspection: Capture canvas screenshots and window.render_game_to_text JSON output after each burst, plus buffered console error logs, so you can verify gameplay without manual play. - Structured iteration workflow: Track work in progress.md, follow a test checklist covering movement, win/lose transitions, collisions, and menus, and fix the first new console error before continuing. - Use Case: You are building a canvas platformer and just added a shooting mechanic. Run the client with an action payload that moves, jumps, and fires, then inspect the screenshots and state JSON to confirm enemies lose health, disappear at zero, and update the score. ## Quick Start Ask the agent to build or modify the web game in this workspace and validate each change by running the Playwright client script with an action payload, then reviewing the screenshots and render_game_to_text output.

Frequently Asked Questions about develop-web-game

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a web game automatically with Playwright?▼

Run the provided Playwright client script with a game URL and an action payload file defining button presses and frame counts. The script executes the inputs, steps frames deterministically via window.advanceTime, and saves screenshots, state JSON, and console errors for review.

What is render_game_to_text and why does my game need it?▼

render_game_to_text is a window function your game exposes that returns a JSON string of current game state, including player position, entities, score, and mode. It lets automated tests verify gameplay state without relying only on screenshots.

Why are my Playwright game tests flaky or inconsistent?▼

Flakiness usually comes from real-time frame loops that vary between runs. Expose a window.advanceTime(ms) hook that steps your update loop deterministically so the test client advances a fixed number of frames per action.

Does the Playwright client work with headless browser screenshots of WebGL canvases?▼

The client captures canvas pixels via toDataURL and falls back to element or page screenshots if the canvas reads as transparent. If you suspect a headless WebGL capture issue, rerun with headless disabled and re-inspect the screenshots.

What should I test after adding a new game feature?▼

Exercise primary inputs like move, jump, and shoot, verify win/lose transitions, score and health changes, boundary collisions, and menu or pause flows. Confirm render_game_to_text matches what is visible on screen and fix the first new console error before continuing.