mcpField
P
phaser-coder

phaser-coder

github.com/yakoub-aiDevelopment29203 installsUpdated 9w ago
Repository

About phaser-coder

phaser-coder is a coding skill for TypeScript-first Phaser 4 projects. It guides agents to follow existing project conventions, use Phaser 4 APIs, and check types after substantial edits.

Key features

  1. 01Inspect existing code and conventions first
  2. 02Use Phaser 4 APIs only
  3. 03Prefer typed constants and enums
  4. 04Provide complete runnable implementations
  5. 05Run TypeScript checks when configured

Use cases

  1. 01Implement features in an existing Phaser 4 project
  2. 02Adapt code to established scene and state patterns
  3. 03Check TypeScript types after substantial edits

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/yakoub-ai/phaser4-gamedev --skill phaser-coder

After installing, type/phaser-coderin Claude Code to confirm it loaded.

Bundled filesreferences/agent-guidance.md

Details

From the project README

Phaser 4 Coder

Use this skill for TypeScript-first Phaser 4 implementation work.

Workflow

  1. Read existing code before editing. Inspect src/main.ts, scene files, related objects/managers, shared constants, and asset keys.
  2. Match existing naming, folder structure, scene key conventions, and state management patterns.
  3. Use Phaser 4 APIs only. Avoid removed Phaser 3 APIs such as Phaser.Geom.Point, Phaser.Math.PI2, Phaser.Structs, and deprecated texture generation patterns.
  4. Prefer typed constants/enums for scene keys, registry keys, event names, asset keys, and animation keys.
  5. Write complete runnable code. Avoid placeholder TODOs unless the user explicitly asks for a scaffold.
  6. After non-trivial edits, run npx tsc --noEmit when the project has TypeScript configured.

Implementation Defaults

  • Use class-based scenes extending Phaser.Scene.
  • Use Arcade Physics for typical platformer/top-down/shooter mechanics unless Matter.js is clearly required.
  • Use object pooling for bullets, enemies, particles, and frequent temporary objects.
  • Put shared types under src/types/ and reusable game objects under src/objects/ or the existing local equivalent.
  • Gate debug affordances behind development mode where possible.
  • Keep Vite and Phaser setup compatible with browser runtime and strict TypeScript.

Full Guidance

For the complete coding playbook, read references/agent-guidance.md. It is copied from the Claude subagent definition but should be applied as a portable skill; ignore Claude-only fields such as model, color, and tools.

Comments

Markdown supported