npx skills add ...
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill phaser-core
Set up and debug a Phaser 4 game: the Game config, the Scene lifecycle (init/preload/create/update), the asset loader, cameras, and cross-scene communication. Use when building or debugging a Phaser game — when the user mentions Phaser, Phaser.Game, Phaser.Scene, preload/create/update, this.load, this.add, or scene transitions. For Arcade Physics movement/collisions use phaser-arcade-physics.
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill phaser-core
Set up the foundation of a Phaser game: the Game config, the Scene
lifecycle, asset loading, cameras, and passing data between scenes. Targets
Phaser 4.2 for new projects; keep an existing Phaser 3.90 project on its
pinned major unless the user explicitly asks for a migration.
Phaser.Game config, structuring
Scenes, loading assets in preload, or fixing scene transitions and shared
state.phaser in package.json or import Phaser from 'phaser',
and code uses preload()/create()/update().When not to use: movement, velocity, colliders, gravity, or overlap → use
phaser-arcade-physics. Complex rigid-body simulation uses Matter physics (a
separate concern). For cross-engine save/load patterns use save-systems.
package.json and the lockfile. Use
Phaser 4.2 for new work; do not silently rewrite a Phaser 3 project as Phaser 4.new Phaser.Game(config) with type: Phaser.AUTO (WebGL with Canvas fallback), a width/height, and a scene
array. The first scene (and any with active: true) starts automatically.Scene. Subclass Phaser.Scene, pass a unique
key to super, and implement the lifecycle: init(data) → preload() →
create(data) → update(time, delta).preload, use them in create. Queued assets are not
available until create. The loader is per-scene; the cache it fills is global.init(), not the constructor. A scene instance is
reused across restarts, so constructor-set fields keep stale values.this.scene.start/launch/switch/sleep/wake.
Share data through this.registry (global) or a sibling scene's event emitter.undefined in create/update → you forgot to queue them in
preload, or used the wrong key. The loader runs between preload and create.init() and clear arrays on shutdown.this.scene.start vs this.scene.launch → start stops the calling scene;
launch runs the target alongside it. Using start for a HUD hides the game.this is wrong in a callback → arrow functions keep the Scene's this; plain
function callbacks need a context argument or .bind(this).width/height
are set, and a scene actually started (check game.scene.dump() output).references/scene-flow.md.phaser-arcade-physics — velocity, gravity, colliders, overlap, and groups.input-systems — rebindable, multi-device input architecture (engine-agnostic).pixijs-rendering / threejs-scene-setup — other browser rendering stacks.platformer / puzzle — genre templates that compose Phaser skills.