plugins/lisa-phaser/skills/phaser-assets/SKILL.md
This skill should be used when loading or organizing assets in a Phaser 4 game — the Loader (images, texture atlases, spritesheets, audio, fonts), asset-pack manifests via this.load.pack, the new PCT compact atlas format (load.atlasPCT), typed asset keys, and where files live in the Vite project. Use it when adding any asset, restructuring loading, fixing a missing-texture/green-square bug, or optimizing load size. Pairs with phaser-project-structure, phaser-scenes, and phaser-gameobjects.
npx skillsauth add codyswanngt/lisa phaser-assetsInstall 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.
All runtime assets live under public/assets/ (served verbatim by Vite — never
import game assets through the bundler) and are loaded by Phaser's Loader in a
scene's preload(). The opinionated pattern: one asset-pack manifest, loaded
by the Preloader, with every key defined as a typed constant.
A pack is a JSON manifest the Loader consumes wholesale:
{
"main": {
"files": [
{ "type": "atlasPCT", "key": "game-atlas", "url": "atlases/game.pct" },
{ "type": "image", "key": "background", "url": "images/background.png" },
{ "type": "audio", "key": "sfx-jump", "url": ["audio/jump.ogg", "audio/jump.m4a"] },
{ "type": "spritesheet", "key": "explosion", "url": "sheets/explosion.png",
"frameConfig": { "frameWidth": 64, "frameHeight": 64 } }
]
}
}
// Preloader.preload()
this.load.pack("game-pack", "assets/pack.json");
Why packs: loading is declared in one reviewable file instead of scattered
load.* calls; adding an asset never touches scene code beyond using the key.
Individual images break sprite batching. Everything that renders together ships in an atlas:
this.load.atlasPCT(key, url) — its manifests are 90–95% smaller than the
JSON-hash equivalent. JSON/XML/Unity/multi-atlas loaders still exist for
third-party toolchains.load.spritesheet) are acceptable only for uniform-grid
animation strips; anything else is an atlas..ogg + .m4a) in the url array; Phaser
picks the first the browser can play.load.audioSprite) for large sets of short SFX.Every key lives in src/assets.ts:
export const Tex = { GameAtlas: "game-atlas", Background: "background" } as const;
export const Sfx = { Jump: "sfx-jump" } as const;
export const SceneKeys = { Boot: "Boot", Preloader: "Preloader", Game: "Game" } as const;
Scenes use Tex.GameAtlas, never "game-atlas" inline. A bad inline key fails
at runtime as a green square or silent missing audio; a bad constant fails in
review and in tests that assert the pack manifest covers every constant.
this.load.on("progress", …) to a progress bar built from
Boot-loaded art ([[phaser-project-structure]]).loaderror: this.load.on(Phaser.Loader.Events.FILE_LOAD_ERROR, …) —
log the key and URL; a missing asset must fail loudly in dev, not render as a
placeholder in production.public/assets/ subdirs: atlases/, images/, audio/, sheets/, fonts/,
plus pack.json at the root of assets/.src/assets.ts appears in
pack.json (cheap manifest-coverage check; see [[phaser-testing]]).Asset changes are verified by booting the game and watching the network panel /
console: every file 200s, no FILE_LOAD_ERROR, and the new asset visibly renders
or audibly plays in the scene that uses it.
tools
Configure the official SonarQube plugin + MCP as Lisa's single Sonar substrate across every supported coding agent. Installs/updates the SonarQube CLI, authenticates (browser login on a dev machine, or SONARQUBE_CLI_TOKEN headless), selects the Test Manager target, runs `sonar integrate <agent>` for each supported agent (Claude, Codex, Cursor, Copilot, Antigravity) and wires the MCP for OpenCode, then writes only non-secret policy to .lisa.config.json. Separate from the CI SonarCloud scan gate, which is unchanged.
tools
Configure the official SonarQube plugin + MCP as Lisa's single Sonar substrate across every supported coding agent. Installs/updates the SonarQube CLI, authenticates (browser login on a dev machine, or SONARQUBE_CLI_TOKEN headless), selects the Test Manager target, runs `sonar integrate <agent>` for each supported agent (Claude, Codex, Cursor, Copilot, Antigravity) and wires the MCP for OpenCode, then writes only non-secret policy to .lisa.config.json. Separate from the CI SonarCloud scan gate, which is unchanged.
tools
Configure the official SonarQube plugin + MCP as Lisa's single Sonar substrate across every supported coding agent. Installs/updates the SonarQube CLI, authenticates (browser login on a dev machine, or SONARQUBE_CLI_TOKEN headless), selects the Test Manager target, runs `sonar integrate <agent>` for each supported agent (Claude, Codex, Cursor, Copilot, Antigravity) and wires the MCP for OpenCode, then writes only non-secret policy to .lisa.config.json. Separate from the CI SonarCloud scan gate, which is unchanged.
tools
Configure the official SonarQube plugin + MCP as Lisa's single Sonar substrate across every supported coding agent. Installs/updates the SonarQube CLI, authenticates (browser login on a dev machine, or SONARQUBE_CLI_TOKEN headless), selects the Test Manager target, runs `sonar integrate <agent>` for each supported agent (Claude, Codex, Cursor, Copilot, Antigravity) and wires the MCP for OpenCode, then writes only non-secret policy to .lisa.config.json. Separate from the CI SonarCloud scan gate, which is unchanged.