agentleFS
Ar9avAr9av/game-exa/skills/manifest-auditor/SKILL.md

manifest-auditor

Skill4 starsChanged 7 months agoMITView on GitHub

Static analysis of Game.js that cross-references every animation key and texture key against manifest.json. Catches "Animation not found" and "Texture not found" bugs before the browser is opened. Run after codesmith, before playtester.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After codesmith writes src/scenes/Game.js, before starting the dev server.

    line 12
  2. Very specific:

    Run scripts/audit_manifest.mjs <project-dir> after codesmith writes Game.js.

    line 70
  3. Very specific:

    If errors: surface to refiner as manifest-key-mismatch failures.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Manifest Auditor — Key Consistency Check

Scans the codesmith-generated Game.js for every string literal used as an animation key or texture key, then checks each against the manifest. Catches the most common class of silent Phaser failures — mismatched key names — in milliseconds without a browser.

When to use

After codesmith writes src/scenes/Game.js, before starting the dev server. Also run after refiner patches to catch regressions.

What it checks

Animation keys

Patterns: .play('KEY'), .play("KEY"), .chain('KEY'), .chain("KEY")

Valid animation keys are derived from manifest.sprites:

for each sheet s:
  for each row r in s.rows:
    for each col c in s.cols:
      valid key = `${r}-${c.toLowerCase()}`

Example: KNIGHT-walk, SLIME-idle, ORB-idle.

Texture keys

Patterns: this.add.sprite(x, y, 'KEY'), this.add.image(x, y, 'KEY'), this.physics.add.sprite(x, y, 'KEY'), this.textures.get('KEY'), this.load.image('KEY', ...), this.load.spritesheet('KEY', ...)

Valid texture keys:

  • Each s.textureKey from manifest.sprites (e.g. entities-1)
  • 'tiles' — always present
  • 'bg' — present when manifest.bg exists

Frame indices

Pattern: setFrame(N) or .frame = N — warns if N is out of range for the sprite sheet cell count (rows.length * cols.length).

Output contract

{
  "ok": true,
  "errors": 0,
  "warnings": 2,
  "total": 2,
  "issues": [
    {
      "kind": "unknown-anim-key",
      "key": "KNIGHT-run",
      "line": 87,
      "suggestion": "Did you mean KNIGHT-walk?",
      "severity": "error"
    },
    {
      "kind": "unknown-texture-key",
      "key": "Player",
      "line": 34,
      "suggestion": "Texture keys are case-sensitive. Manifest has: entities-1",
      "severity": "error"
    }
  ]
}

Exit code 0 = all OK, 5 = errors found, 3 = missing files.

Process

  1. Run scripts/audit_manifest.mjs <project-dir> after codesmith writes Game.js.
  2. If errors: surface to refiner as manifest-key-mismatch failures. Refiner fixes key strings.
  3. Re-run. If clean, proceed to playtester.

Feed errors into refiner as:

{ "kind": "manifest-key-mismatch", "message": "KNIGHT-run not in manifest (line 87). Use KNIGHT-walk." }

Scripts

  • scripts/audit_manifest.mjs <project-dir> [--fix] — static analysis. --fix applies best-guess corrections in-place.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.