agentleFS
joet203joet203/claude-code-toolkit/skills/codex/game-sprite-pipeline/SKILL.md

game-sprite-pipeline

Skill0 starsChanged 2 months agoMITView on GitHub

Generate, clean, align, and integrate consistent game-ready character sprite sheets from AI image outputs. Use when working on 2D/2.5D game character sprites, animation sheets, transparent-background sprite assets, frame slicing, alpha cleanup, fixed frame boxes, baseline/pivot alignment, idle/walk/action animation loops, or image-model prompts for consistent game sprites.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 11 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to turn image-model sprite-sheet outputs into usable game assets.

    line 8
  2. Distinctive:

    Do not trust raw AI sprite sheets as game-ready.

    line 12
  3. Distinctive:

    Prefer one sheet containing related animations for the same character.

    line 24
  4. Distinctive:

    Ask for fixed rows: for example, row 1 idle, row 2 walk.

    line 25
  5. Distinctive:

    Ask for transparent background, but expect fake checkerboard and clean it later.

    line 27
  6. Distinctive:

    Place every pose into the same frame size.

    line 39
  7. Distinctive:

    Add transparent gutters to prevent browser/game texture bleed.

    line 41
  8. Distinctive:

    Use one fixed display box per character.

    line 45
  9. Distinctive:

    Test idle, movement, direction flip, clipping, size popping, and console errors.

    line 48
  10. Distinctive:

    Keep original generated source next to processed sheets.

    line 52
  11. Distinctive:

    Use a strict prompt like:

    line 56
  12. Very specific:

    Use scripts/process_sprite_sheet.py when converting a generated sprite sheet into separate animation sheets.

    line 85
  13. Very specific:

    Read references/sprite-framework.md for the complete project framework and decision checklist.

    line 99

≈ “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

Game Sprite Pipeline

Use this skill to turn image-model sprite-sheet outputs into usable game assets. Treat generated sheets as source material, then apply deterministic cleanup before integrating them into a game.

Core Rule

Do not trust raw AI sprite sheets as game-ready. Always post-process them into fixed-size RGBA sheets with stable frame dimensions, transparent gutters, consistent baseline, and matching metadata.

Workflow

  1. Define a character bible:
    • Species/body/proportions.
    • Outfit and accessories.
    • Camera angle and facing direction.
    • Rendering style.
    • Forbidden variations, such as outfit changes or collar appearing too early.
  2. Generate a unified source sheet:
    • Prefer one sheet containing related animations for the same character.
    • Ask for fixed rows: for example, row 1 idle, row 2 walk.
    • Require same character, outfit, scale, angle, foot baseline, and full body in every frame.
    • Ask for transparent background, but expect fake checkerboard and clean it later.
  3. Inspect the source:
    • View the image before processing.
    • Confirm frame count, pose order, outfit consistency, and whether feet/heads are cropped.
    • Reject or regenerate if the character identity changes heavily across frames.
  4. Process into game sheets:
    • Convert fake checkerboard/near-white background to alpha.
    • Detect each character pose as a connected component.
    • Crop each pose, keeping only the main component.
    • Normalize height while preserving proportions.
    • Place every pose into the same frame size.
    • Bottom-align feet to one baseline.
    • Add transparent gutters to prevent browser/game texture bleed.
    • Export separate sheets per animation.
  5. Integrate and test:
    • Use one fixed display box per character.
    • Swap only the inner sprite sheet/animation class, not the outer character box.
    • Change animation state only when movement starts/stops, not every frame.
    • Test idle, movement, direction flip, clipping, size popping, and console errors.
  6. Persist metadata:
    • Record frame width, height, frame count, frame duration, pivot point, and baseline.
    • Keep original generated source next to processed sheets.

Prompt Pattern

Use a strict prompt like:

Game-ready sprite sheet, transparent background, one consistent character only:
[character bible].

Same exact character, same outfit, same proportions, same camera angle, same scale,
full body visible, feet on same baseline, no cropping, no text.

Grid: [row/column layout].
Row 1: [animation and frames].
Row 2: [animation and frames].
[Facing direction]. Clear readable motion. Stable head/nose. Even spacing between frames.

Recommended Animation Order

Build animations in this order:

  1. Idle: 4 frames.
  2. Walk: 8 frames, including passing/crossover poses.
  3. Happy/celebrate: 4 frames.
  4. Think/listen: 4 frames.
  5. Pray/solemn: 4 frames.
  6. Startled: 4 frames.
  7. Receive item: 4 frames.

Scripts

Use scripts/process_sprite_sheet.py when converting a generated sprite sheet into separate animation sheets. It expects rows with known frame counts and exports cleaned RGBA sheets plus previews.

Example:

python3 ~/.codex/skills/game-sprite-pipeline/scripts/process_sprite_sheet.py \
  --input /path/to/generated.png \
  --output-dir /path/to/assets/generated/character/sprites \
  --prefix young-wilson \
  --rows idle:4,walk:8 \
  --frame-width 320 \
  --frame-height 363

Read references/sprite-framework.md for the complete project framework and decision checklist.

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.