Builds one game component from an MVP plan as typed TypeScript with tests and mocks for unbuilt dependencies, then records it in the build registry. Supports status checks and rebuilds.
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.
Read when SKILL.md points to them.
Input: $ARGUMENTS; if empty, use the user's message. It holds a component name, <component> --rebuild, or status.
This command skips the game-dev index. The skill table in Phase 3 picks the skills.
game-backend-architecturequest-mission-designquest-narrative-coherencepostgres-game-schemaredis-game-patternsbullmq-game-queuesbetterauth-integrationstripe-game-paymentselevenlabs-sound-musicgame-state-syncmatchmaking-systemgameplay-analyticsLoad a skill from this list only when the Phase 3 table picks it. Before you apply one, check that it appears in your available skills list. If it is not, name it, give this install line, and stop: bunx skills add fcsouza/agent-skills --skill <name>.
docs/mvp-first-draft.md in the project (run /game-architect first)Do this before writing code.
docs/mvp-first-draft.md is missing, say: "Stopped: no MVP plan. Run /game-architect first, so the build follows one plan." Then stop.docs/build-registry.md. If it is missing, copy the registry skeleton from templates/build-registry.md.docs/world-lore.md and docs/quest-registry.md.status: before step 3, read the registry if it exists (do not create it), print a table of built, rebuilding, mocked and remaining components, build nothing, stop.
Resolve the component's dependencies from the plan. For each one, check the registry.
built: import it from its registered path. Do not regenerate it.// MOCK: replace with real implementation via /game-build [dependency-name] and register it as status: mock.List the mocks at the top of your output.
Component already built or rebuilding. Stop and say: "[component] is built (docs/build-registry.md). To redo it, run /game-build [component] --rebuild." For rebuilding, say instead: "[component] has a rebuild in progress. Run /game-build [component] --rebuild to resume it." Regenerating would overwrite code other components import, so only --rebuild proceeds. --rebuild on a component with no registry entry builds it as new. With --rebuild:
rebuilding, build as normal, and set it back to built in Phase 5.Ask only when the plan cannot answer, for example REST or WebSocket when it lists both. Never ask about naming or style.
Code standards:
any, no implicit types.NOT IN PLAN and ask.// [-> bullmq-game-queues: retry with exponential backoff]
const retryConfig = { attempts: 3, backoff: { type: 'exponential', delay: 1000 } };
Files:
src/[component-name]/
index.ts public API
[component].ts core logic
[component].test.ts tests
types.ts types for this component
src/__mocks__/[dependency].mock.ts mocks from Phase 1
Skill table:
| Component involves | Apply |
|---|---|
| DB reads/writes | postgres-game-schema |
| Cache, realtime | redis-game-patterns |
| Background jobs | bullmq-game-queues |
| Auth, sessions | betterauth-integration |
| Payments | stripe-game-payments |
| Audio, SFX | elevenlabs-sound-music |
| Quests, missions | quest-mission-design, quest-narrative-coherence (coherence check first) |
| Client-server sync, multiplayer | game-state-sync, game-backend-architecture (server decides; the client sends intentions) |
| Matchmaking | matchmaking-system |
| Analytics | gameplay-analytics |
Tests cover: the happy path, boundary cases, failure when a dependency throws or returns bad data, and that each mock matches the interface it replaces. Assert on behavior, not snapshots. A component without tests is incomplete.
Read package.json.
vitest is a dependency, write tests with Vitest and run them with bun run test (add a test script of vitest run if missing). Vitest's guide says to use bun run test with Bun, because bun test starts Bun's own runner instead. Docs: https://vitest.dev/guide/describe, it and expect from bun:test and run bun test src/[component-name]/. Docs: https://bun.com/docs/testCheck the new content against docs/world-lore.md and docs/quest-registry.md using the checklist in quest-narrative-coherence. On a conflict, say "Conflict: [description]" and propose a fix before the final code. Register new content in docs/quest-registry.md.
bun run typecheck if the script exists, else bunx tsc --noEmit.built.bun run format if the script exists.templates/build-registry.md when you write the entry. Add or update the entry in docs/build-registry.md in its entry format with status: built (this also ends a rebuild), and update the Summary counts./game-build [name] lines.built or rebuilding component without --rebuild.// MOCK markers until the real implementation replaces the mock.What SKILL.md sets; muted values are Claude Code's defaults
/game-dev:game-build component name (e.g. auth, matchmaking, shop), "<component> --rebuild", or "status"from game-dev
npx claudepluginhub fcsouza/agent-skills --plugin game-dev39 skills in this plugin
/betterauth-integrationCovers the game-specific layer of Better Auth: player, moderator and admin roles, session checks on game routes and WebSocket handshakes, and keeping the auth session apart from the game session. Use when a game needs player login, moderator or admin powers, or authenticated real-time connections, and the project uses Better Auth./bullmq-game-queuesBackground job design for game backends on BullMQ and Redis: one queue per game domain, idempotent reward fulfilment, and cron schedulers for daily rewards and season ends. Use when a game needs matchmaking requests, reward grants, match results, notifications or analytics processed off the request path, or recurring and timed jobs such as daily login rewards, leaderboard snapshots and season rollovers./character-design-narrativeCovers designing game characters: NPCs, companions, antagonists, player avatars, character bibles and branching dialogue. Use when a game needs a new character written, an NPC feels flat or interchangeable, or dialogue needs a branching format with conditions and effects./ci-cd-gameGitHub Actions pipeline rules for a Bun game backend on Neon and Fly.io: migrations before deploy, one Neon database branch per pull request, a smoke test after deploy, and a pinned Bun version. Use when a game project needs CI, a deploy workflow, preview databases for pull requests, or a safe order for schema migrations and server deploys./elevenlabs-sound-musicCovers generating game audio with ElevenLabs (voice lines, sound effects, music) and Google Lyria 2 (instrumental music clips), and playing it in the browser through an audio state machine with crossfades, per-layer volume and an unlock on the first user input. Use when a game needs sound effects, NPC voice lines or a soundtrack, when music must follow game state (menu, exploration, combat, boss) without hard cuts, when audio stays silent on a phone until the player taps, or when choosing between ElevenLabs and Lyria for music./game-anti-cheatCovers how a developer defends their own online game against cheating: server-side input validation, withholding hidden state, lag-compensation limits, dupe-proof transfers, detection from server data and reports, and enforcement with delayed bans, appeals and refunds to victims. Use when a multiplayer game has speed hacks, wallhacks, aimbots, bots, item or currency dupes, real-money trading, boosting or win trading, or when planning how to detect and ban cheaters.Other plugins' skills for the same job