phaser4-gamedev
A portable agent-skills package and Claude Code plugin that makes building Phaser 4 web games fast and easy. It ships 26 portable skills, 5 Claude Code subagents, 11 Claude slash commands, and 2 Claude hooks that encode deep Phaser 4 (v4.2.1) knowledge — so you can build any 2D web game without needing to memorize the API.
It covers the whole loop, not just the coding part:
/phaser-brainstorm ──► /phaser-gdd ──► /phaser-new ──► /phaser-dev
shape & scope plan scaffold phase by phase
│ │
│ ▼
│ /phaser-playtest ──► /phaser-release
│ VERIFY RUNNING ship
│ ▲ │ │
│ └─ fix ─┘ ▼
│ ▲ /phaser-feedback
│ └──── repro ───────┘
└── acceptance criteria ───────────► playtest scenarios
Every project starts verified. /phaser-new scaffolds deterministically (no prompts, no
remote templates) and runs npm run verify — typecheck, unit tests, and a playtest of the
minified production build — before any game code is written. /phaser-dev then builds the
game one phase of docs/ARCHITECTURE.md at a time: each phase's exit conditions become
failing playtest scenarios first, then code until they pass, then permanent regression
tests. That loop works for any game, not just the nine archetypes.
Two more steps most toolkits skip. The first is /phaser-playtest. tsc --noEmit proves your code
compiles; it says nothing about whether the game runs. A mistyped asset path, a
scene left out of scene: [], a throw partway through create() — all type-check
perfectly and all ship a black screen. The playtest harness boots the real game in
headless Chromium, drives real input, and reports what actually happened.
The second is /phaser-feedback. Paste what players actually wrote — Discord messages,
itch.io comments, QA notes — and it triages them, reproduces each defect as a failing
playtest scenario, fixes it, verifies the fix, and drafts the reply. The scenario stays
behind as a regression test, so feedback compounds instead of recurring.
Features
- 26 Portable Skills — installable with
npx skills add for Codex, Claude Code, Cursor, OpenCode, and other compatible coding agents
- 5 Claude Code Agents — specialized subagents for architecture, coding, debugging, asset management, and playtesting
- Verified scaffold — Phaser 4.2.1 + Vite 8 + TypeScript 7 + Vitest, a build-time Content-Security-Policy, a vendored playtest harness, and GitHub Actions CI + Pages deploy with SHA-pinned actions
- Phase-by-phase development —
/phaser-dev turns each architecture phase's exit conditions into failing playtests, implements until green, and keeps them as regression tests
- 11 Claude Commands —
/phaser-brainstorm, /phaser-gdd, /phaser-new, /phaser-dev, /phaser-run, /phaser-playtest, /phaser-validate, /phaser-build, /phaser-analyze, /phaser-release, /phaser-feedback
- Feedback → failing test → fix — paste raw player feedback and get it triaged, reproduced as a playtest scenario, fixed, and verified, with the scenario kept as a regression test
- Flake detection —
--repeat N classifies a bug as clean, intermittent, or consistent, and --seed separates an RNG bug from a timing bug. "It only happens sometimes" becomes actionable
- Full Phaser 4 renderer coverage — Filters (which replaced FX and masks), stencils, cone lights,
Mesh2D, SpriteGPULayer, tint modes, alpha strategies
- Headless Playtest Harness — a real, runnable Playwright script that boots the game, catches black screens, asset 404s, uncaught exceptions and FPS collapse, drives scripted input, and asserts on live game state
- 2 Claude Hooks — PreToolUse v3 API guard (catches deprecated APIs before code is saved) + SessionStart Phaser project detector
- 9 Game Archetypes — platformer, top-down RPG, space shooter, match-3 puzzle, tower defense, endless runner, card game, fighting game, racing — full specs with
/phaser-new
- Game Design Documents — generate comprehensive 13-section GDDs with
/phaser-gdd
- Project Analysis — analyze existing projects for architecture, performance, and code quality with
/phaser-analyze
- Device Profiles — platform-specific optimization guides for iOS, Android, desktop, Capacitor, and PWA
- Asset Sourcing — guides for finding free assets, creation tools, and placeholder-to-production workflows