From web-game-dev
Game implementation patterns and code structure. Invoked by game-orchestra when a design exists but code doesn't. Covers scaffolding, game loops, state management, integration hooks, and iterative development workflow.
How this skill is triggered — by the user, by Claude, or both
Slash command
/web-game-dev:game-developerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
<!-- EXPECTED GATES: 6 -->
Guides implementation of web games — project setup, architecture, integration hooks, and iterative development.
By game-orchestra when a game design document exists but code doesn't.
Read the game design document (game-design.md) and extract key decisions
that affect implementation.
STEP 1 COMPLETE: Key decisions affecting implementation: [list mechanics, architecture choice, state approach, input type, content structure].
Set up the project structure.
npm create vite@latest)index.html with inline or linked scriptnpm run dev on http://localhost:5173Single file: all logic in one game.js or game.ts.
src/
├── game.ts # Entry point, game loop
├── state.ts # State machine
├── entities.ts # Game objects
├── renderer.ts # Drawing/rendering
├── input.ts # Input handling
└── types.ts # Type definitions
STEP 2 COMPLETE: Files created: [list all files created]. Structure: [single/modular]. Build tool: [tool].
Set up the core game loop and state management.
requestAnimationFrame (canvas) or DOM event-drivenSee references/game-patterns.md for patterns.
STEP 3 COMPLETE: Loop type: [rAF/DOM event-driven]. State management: [approach]. States: [list of game states].
Every game MUST implement these two hooks for testing.
See game-integration.md for full examples.
window.render_game_to_text()Returns a JSON string of the current game state. Used by game-qa and game-tester for state verification.
window.advanceTime(ms)Advances the game by N milliseconds deterministically. Used for step-based frame control in automated tests.
STEP 4 COMPLETE:
window.render_game_to_text()returns [describe JSON shape].window.advanceTime(ms)implemented with [deterministic/non-deterministic] time control.
Implement game mechanics from the design document using iterative workflow:
See references/game-patterns.md for:
STEP 5 COMPLETE: Mechanics implemented: [list each mechanic]. Remaining: [list or "none"].
Review all code for quality standards.
const and let, never varupdatePlayerPosition() not update()STEP 6 COMPLETE: No magic numbers: [confirmed/fixed N]. Naming: [confirmed/fixed N]. Error handling: [confirmed/added N guards]. Functions under 30 lines: [confirmed/refactored N].
npx claudepluginhub hexcelerate/web-game-dev --plugin web-game-devProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.