/game-dev:game-devfrom game-dev
Guides building 2D browser games via a strict discovery-interview → system-by-system build-and-test loop with in-browser testing after every system.
Ships in game-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill is for 2D, browser-based games (HTML5/Canvas/WebGL via JS or TS). If the user wants 3D, a native (non-web) target, or a specific engine like Unity/Unreal/Godot, say so explicitly and ask whether they still want you to proceed with adapted guidance — don't silently force it into the web mold.
Solo game projects die from two things: never nailing down what the game actually is, and building five systems in parallel none of which actually work. This skill exists to prevent both. Follow the phases below in order. Do not skip the interview. Do not build more than one system at a time. Do not mark a system done without watching it work in a real browser.
Before doing anything else, check the project root:
GAME_SPEC.md already exists → this is a resumed project, not a new
one. Read GAME_SPEC.md and SYSTEMS.md in full. Do not re-run the
Phase 1 interview. Jump straight to Phase 4 and continue at the first
system in SYSTEMS.md that isn't done. Briefly confirm your read of
where things stand with the user before writing any code, in case
something changed since the last session.GAME_SPEC.md, but a project already exists (a package.json,
an existing src/, etc.) → an established project the skill wasn't
used to start. Don't scaffold over it. Read what's there (stack,
structure, existing game logic), then run Phase 1 to establish
GAME_SPEC.md, and do Phase 3 adapted to build SYSTEMS.md and a dev
level around the existing code rather than a fresh scaffold.Never assume genre, platform, or scope on the user's behalf. Ask, using
AskUserQuestion.
Derive 2–4 follow-up questions from whatever genre came out of Round 1. Don't ask a static checklist — pick what's actually decision-relevant. Examples:
Once both rounds are answered, write GAME_SPEC.md in the project root
using references/game-spec.template.md as the structure: genre, platform
target(s), art approach, scope, every genre-specific answer, plus a
one-paragraph "core loop" summary in your own words. This file is the
source of truth for the rest of the build — every later phase reads it,
and scope creep beyond it requires asking the user first, not deciding
unilaterally.
Read references/libraries.md — it's a curated knowledge base of the 2D
web game libraries available (engines, physics, audio, tilemaps, word-list
sources, mobile input, bundler). Pick the smallest stack that actually
satisfies GAME_SPEC.md. Default bundler is Vite unless there's a reason
not to. State the chosen stack and a one-line reason to the user; only ask
for confirmation if two real options are genuinely close and the tradeoff
matters to them (e.g. Phaser vs. raw PixiJS when physics needs are unclear).
git init now. The
checkpoint commits in Phase 4 depend on it, and it's cheap to set up
before any code exists.references/dev-level.md. This is not
throwaway scaffolding: it stays in the repo for the life of the project
as the QA harness.SYSTEMS.md using references/systems.template.md as the
structure — the build checklist. Derive the initial system list from
GAME_SPEC.md (genre + platform), e.g.: input/controls, core movement,
collision, camera, the genre-defining mechanic, UI/HUD, audio, mobile
touch input (if mobile was requested), save/progress (if the scope calls
for it), level/content loading. Each row: system name, status
(pending / building / testing / done), test notes. Show this
list to the user before starting Phase 4 so the build order is visible
and correctable.Non-negotiable rules:
SYSTEMS.md order top to
bottom. Reorder only when a real dependency forces it, and note why in
the file when you do.done in SYSTEMS.md after watching it pass in an
actual browser per Phase 5 — "the code looks right" is not a pass.done, commit it (git add the
changed files + SYSTEMS.md, commit with a message naming the system).
This is the rollback point if a later system's changes break something
already working — don't batch multiple systems into one commit.Read references/testing-protocol.md and follow it exactly. In short:
prefer claude-in-chrome when it's available and permitted for the local
dev server; otherwise fall back to Playwright. Every test cycle: serve the
project, load the dev level for the system under test, exercise it,
screenshot, read the console for errors, confirm the expected behavior
actually happened, then log the result (pass/fail + note) in SYSTEMS.md.
Once all systems pass individually, wire them together into real
levels/content per GAME_SPEC.md. Do a full playthrough using the same
browser-testing tool from Phase 5, exercising every platform target that
was declared (simulate touch input if mobile was in scope, keyboard/mouse
if desktop was). Log findings in PLAYTEST.md.
Check against the scope declared in GAME_SPEC.md:
PLAYTEST.md.If it's unclear which bar has been met, ask the user rather than declaring the project finished unilaterally.
GAME_SPEC.md and SYSTEMS.md are living documents — re-read them at the
start of any later session before continuing work, instead of re-deriving
context from scratch.GAME_SPEC.md without asking the user first.GAME_SPEC.md and
SYSTEMS.md explicitly rather than quietly folding it into the current system.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sudhanshu5669/html5-gamedev-skill --plugin game-devOther plugins' skills for the same job