/phaser4-gamedev:phaser-analyze runs instead · from phaser4-gamedev
Analyzes Phaser 4 projects for architecture quality, performance risks, and API correctness. Produces a prioritized improvement roadmap. Activated by phrases like 'analyze my game' or 'review my Phaser project'.
This skill never runs in Claude Code
It ships in phaser4-gamedev at skills/, but /phaser4-gamedev:phaser-analyze (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
Perform a comprehensive analysis of an existing Phaser 4 project to assess architecture quality, identify performance risks, flag API correctness issues, and produce a prioritized improvement roadmap.
Follow all five phases in order. Do not skip phases — each builds on the previous.
Gather raw facts about the project before making any judgments.
package.json for dependencies and Phaser version.ts/.js files in src/main.ts for GameConfiggrep "extends Phaser.Scene" across src/grep for this.scene.start, this.scene.launch, this.scene.stopgrep "extends Phaser.Physics" or grep "extends Phaser.GameObjects"Evaluate the structural quality of the codebase.
src/scenes/? Are there too many or too few for the game's complexity?window., module-level let/var declarations.PreloaderScene vs scattered preload() methods across scenes.scenes/, objects/, managers/ conventions?this.registry, this.events.emit, this.scene.get.Rate the architecture A through F based on findings:
Identify runtime performance risks.
classType/maxSize in group declarations. Flag physics groups created with this.physics.add.group() that lack maxSize — these leak objects.maxParticles. Uncapped emitters can spike frame time.staticGroup() (correct) vs group() (wastes physics cycles).update() method. Flag complex logic, object allocations (new), or heavy iteration inside update().this.load.image() calls vs this.load.atlas() calls. More than 15 individual image loads is a red flag — should be packed into atlases.this.physics.add.* calls.Check for deprecated, removed, or misused APIs.
Geom.Point, Math.PI2, Phaser.Structs, Camera3D, Layer3D, FacebookInstant, Create.GenerateTexture, TileSprite.setCrop.as any, @ts-ignore, untyped function parameters. These hide real bugs.this.load.* keys with this.add.*/this.physics.add.* keys. Mismatched keys cause silent texture-missing errors.GameConfig scene array in main.ts.this.add.sprite() calls that should be this.physics.add.sprite() (sprites expected to have physics but created without a body)..render() calls after drawing operations.Verify the project follows Phaser 4 best practices.
preload() should only load assets, create() should only build the scene, update() should be lean (no asset loading, no object creation).this.events.off, this.sound.stopAll(), timer destruction, this.events.on('shutdown', ...).this.cameras.main.setBounds and compare with world/map dimensions.this.input.keyboard can be null in Phaser 4. Check for this.input.keyboard! or proper null guards.debug: true in physics config should be false for production. Flag if present.console.log/console.warn/console.error calls. These should be gated behind import.meta.env.DEV or removed for production.Produce a structured report with these sections:
file:line references where possible./phaser-migrate to fix any Phaser v3 API issues found in Phase 4./phaser-physics for implementing object pooling and fixing physics group issues from Phase 3.references/analysis-checklist.md — Complete checklist with grep patterns, severity ratings, and fix references for all checks.references/performance-playbook.md — Nine-phase Phaser 4 performance playbook for mid-range mobile targets: measurement-first prompting, per-frame allocation elimination, registry throttling, audio lazy-load, VFX pooling, spatial grid, atlas packing, event throttling, AI tick-skip with real delta, tween cleanup. Read when FPS is below target or memory grows during gameplay.Before starting the manual deep review, run the automated analysis script:
bash "${CLAUDE_PLUGIN_ROOT}/skills/phaser-analyze/scripts/analyze-project.sh"
This provides baseline metrics and flags obvious issues. Use the script output as a starting point, then perform the full 5-phase analysis by reading actual source files.
What SKILL.md sets; muted values are Claude Code's defaults
26 skills in this plugin
/phaser-animationThis skill should be used when the user asks to "create animation", "animate sprite", "add tweens", "sprite animation not playing", "character animations", "easing", "tween timeline", "idle animation", "walk animation", "fade in", "fade out", or "scale animation"./phaser-architectThis skill should be used when the user asks to design a Phaser 4 game, plan game architecture, structure scenes, organize game state, define scene flow, choose module boundaries, or review/refactor an existing Phaser project architecture before implementation./phaser-asset-advisorThis skill should be used when the user asks about Phaser 4 asset loading, sprite sheets, texture atlases, image optimization, preloader scenes, loading bars, tile map assets, audio formats, bitmap fonts, free game assets, generated placeholder assets, asset organization, or asset pipeline performance.npx claudepluginhub yakoub-ai/phaser4-gamedev --plugin phaser4-gamedevOther plugins' skills for the same job