plugins/lisa-phaser-copilot/skills/phaser-v3-migration/SKILL.md
This skill should be used when migrating a Phaser 3 game to Phaser 4, reviewing code that contains Phaser 3 idioms, or answering "does this v3 API still exist" questions — pipelines→render nodes, preFX/postFX/BitmapMask→Filters, tintFill→TintModes, removed namespaces (Geom.Point, Struct, Mesh/Plane, Camera3D, bundled Spine), config default changes, and texture-orientation changes. Pairs with phaser-rendering and phaser-project-structure.
npx skillsauth add codyswanngt/lisa phaser-v3-migrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Phaser 4.0.0 "Caladan" (April 2026; current line v4.1 "Salusa") keeps the core
game-facing API stable — scenes, input, Arcade/Matter physics, tweens,
animations, audio, and the scale manager are unchanged — and replaces the
rendering internals. The official estimate for a standard-API game is hours,
not weeks. The npm package is still phaser; v4 ships its own
types/phaser.d.ts.
Upstream references for deeper detail: the official migration guide in the
phaser repo (changelog/v4/4.0/MIGRATION-GUIDE.md) and the shader-specific
guide. This skill is original Lisa content written against those primary
sources — it is not a port of any upstream plugin or skill package.
Scene lifecycle (init/preload/create/update), this.scene control, Loader
API (plus new atlasPCT), Input, Arcade & Matter physics, Tweens/Timelines,
anims, Scale Manager, Sound managers, Groups, Containers, particle emitter
API (v3.60 style).
| Phaser 3 | Phaser 4 |
| --- | --- |
| setPipeline(...) / setPostPipeline(...) / resetPipeline() | RenderNodes (render.renderNodes config) — rewrite required |
| preFX / postFX controllers | Unified Filter system (internal/external lists) |
| BitmapMask / GeometryMask | Mask filter; Phaser.Actions.AddMaskShape() |
| Bloom/Shine/Circle FX | Actions.AddEffectBloom() / AddEffectShine() |
| Gradient FX | Gradient GameObject |
| setTintFill(c) / tintFill | setTint(c) + setTintMode(Phaser.TintModes.FILL) |
| setPipeline('Light2D') | gameObject.setLighting(true); lights gained z |
| Phaser.Geom.Point | Removed — Phaser.Math.Vector2 (geometry returns Vector2) |
| Phaser.Struct.Set / Struct.Map | Native Set / Map |
| Shadertoy-style Shader uniforms | Rewritten Shader: ShaderQuadConfig, setUniform(), #pragma |
| RenderTexture/DynamicTexture draw-executes-immediately | Buffered — call render(); preserve(), renderMode |
| Bundled Spine 3/4 plugins | Removed — Esoteric's official Phaser Spine runtime |
| Mesh, Plane, OBJ loader, Camera3D, Layer3D | Removed, no replacement |
| Math.TAU = π/2 (wrong) | Math.TAU = 2π (correct); PI_OVER_2 added; PI2 removed |
| Create.GenerateTexture, polyfills, IE9 entry | Removed |
roundPixels default flipped true → false. If a pixel-art game looks
blurry after porting, set pixelArt: true (or render.smoothPixelArt) —
don't blanket-restore roundPixels.Camera#matrix no longer includes position (matrixExternal does;
matrixCombined removed) — affects code doing manual camera-space math.Grid "outline" properties renamed to "stroke". TileSprite was rebuilt
(atlas frames, tileRotation; cropping removed). DOMElement without a
container parent now throws.phaser to ^4.1.0; remove any @types/phaser.Light2D, tintFill,
Math.TAU, custom shader GLSL, compressed-texture loads.render() calls after DynamicTexture drawing.rex users:
the v4 line is the separate phaser4-rex-plugins package, which also ships
p3-fx ports of the dropped v3 FX).This stack's lint config hard-bans the left column of the table in src/** —
a migration is not complete until lint passes with those rules on, with zero
disables.
development
Prepare a machine — a fresh laptop or a throwaway container — to run coding agents, before any repository exists. Detects which of Lisa's supported agents (Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot) are already installed, asks which credential manager the machine uses (Bitwarden, 1Password, Doppler, Vault, AWS, or none), and installs only what is missing, each by its vendor's own preferred method. Idempotent, headless by default, and emits a Dockerfile for a spin-up/spin-down environment. Run it on a new machine, in a container, or before cloning anything.
tools
Provision and verify a remote execution environment for a host project — Codex Cloud today, other remote surfaces as they are added. Generates a repository-owned setup script that installs the declared toolchain, materializes secrets through lisa-secrets-access, and runs the project's own hook. Provisions by API where one exists, by driving the vendor console where one does not, and by emitting exact config otherwise — then proves the result with the same read-back regardless of which tier did the work. Use before dispatching any work with executionEnv.
tools
Bring a developer's machine in line with the toolchain the project declares. Reports every tool in remoteEnv.tools that is missing, outdated, or unpinned for this platform, and installs the missing ones into ~/.local/bin from the same pinned, checksummed entries the remote surfaces use — but only when asked. Same manifest, same pins, same installers as lisa-setup-remote-env; what differs is consent and that the pin is a floor rather than an equality. Run it on a fresh checkout, after a manifest change, or when a tool fails at the moment of use.
tools
Route one unit of work to a remote execution surface. Reads the executionEnv parameter (local by default, codex-cloud or claude-web today), verifies the environment is provisioned and bound to this repository, submits a thin skill invocation, records the task identifier to .lisa/remote-dispatch.json, and exits without polling. Routing only — the remote runs the identical skill from the identical repository. Composable and inline: other skills invoke it via the Skill tool rather than users calling it directly.