spritesheet-atlas-packing — Claude Code skill: how it works
Packs individual isometric sprites into a power-of-two texture atlas and emits a frame coordinate JSON map.
npx skills add 0xheycat/isometric-game-skills --skill spritesheet-atlas-packing -a claude-codeWhat spritesheet-atlas-packing does
Rendering 200 distinct PNGs triggers 200 texture binds and delays asset loading. This skill outlines steps to pack transparent sprites into a power-of-two sheet, such as 2048x2048, using bin-packing. Each frame receives 1-2px padding to prevent bleeding artifacts when rendering under fractional zoom levels.
The output includes a JSON descriptor with frame rects and source anchors: name -> {x, y, w, h, anchorX, anchorY}. Dropping anchor points during packing breaks in-game alignment, so the skill mandates checking coordinates against original frames before shipping.
What it helps with
- cut down texture binds caused by hundreds of loose sprite files
- prevent sprite edge bleeding under fractional camera zoom
- preserve frame anchor points across bin-packing iterations
- export named rect JSON coordinates for game renderers
Example prompts for the agent
- Pack isometric character frames into a 2048x2048 atlas with 2px padding and generate JSON anchors
- Build a power-of-two spritesheet from clean PNGs preserving anchorX and anchorY offsets
- Verify the atlas map matches sprite names and inspect for bleeding issues
How to install spritesheet-atlas-packing
1Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill spritesheet-atlas-packing -a claude-code2Manually: put the files in place
~/.claude/skills/spritesheet-atlas-packing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/spritesheet-atlas-packing/
1Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill spritesheet-atlas-packing -a codex2Manually: put the files in place
.agents/skills/spritesheet-atlas-packing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill spritesheet-atlas-packing -a cursor2Manually: put the files in place
.cursor/skills/spritesheet-atlas-packing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install 0xheycat/isometric-game-skills spritesheet-atlas-packing2Manually: put the files in place
.github/skills/spritesheet-atlas-packing/SKILL.md1Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill spritesheet-atlas-packing -a gemini-cli2Platform CLI
gemini skills install https://github.com/0xheycat/isometric-game-skills --path skills/spritesheet-atlas-packingManually: put the files in place
.devin/skills/spritesheet-atlas-packing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add 0xheycat/isometric-game-skills --skill spritesheet-atlas-packing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about spritesheet-atlas-packing
How to install spritesheet-atlas-packing in Claude Code?
Run npx skills add 0xheycat/isometric-game-skills --skill spritesheet-atlas-packing -a claude-code in your terminal.
Why does the packing process enforce frame padding?
A 1-2px margin prevents color bleeding across neighbor frames at non-integer camera zoom.
What data fields appear in the generated JSON map?
Each entry contains rectangle bounds x, y, w, h alongside reference points anchorX and anchorY.
Source text
SKILL.md · MIT
---
name: spritesheet-atlas-packing
description: Use when packing many isometric sprites into a texture atlas with a JSON map so the engine draws from one image with correct frame coordinates.
license: MIT
---
# Spritesheet & Atlas Packing
## Overview
Drawing 200 separate images means 200 texture binds and slow load. An atlas packs sprites into one image plus a JSON of frame rects. This skill produces an atlas the renderer can index by name.
## When to Use
- You have many individual sprite PNGs to ship.
- Load times or draw calls are high because of separate images.
- The renderer needs named frame lookups.
## Process
1. Collect all cleaned, transparent sprites into one folder.
2. Pad each frame by 1-2px to prevent texture bleeding between neighbors.
3. Pack into a power-of-two atlas (e.g. 2048x2048) using a bin-packer.
4. Emit a JSON map: name -> {x, y, w, h, anchorX, anchorY}.
5. Keep anchors from the source sprites so placement stays correct.
6. Verify every sprite is found by name and renders at the right anchor.
7. Regenerate the atlas automatically in the build (see `asset-pipeline-automation`).
```json
{ "tree_oak": { "x": 0, "y": 0, "w": 128, "h": 160, "anchorX": 64, "anchorY": 150 } }
```
## Rationalizations (Stop Lying to Yourself)
| Excuse | Reality |
|---|---|
| "I will just load images individually" | Hundreds of texture binds kill performance. Pack an atlas. |
| "Padding is unnecessary" | Without padding, neighbors bleed at non-integer zoom. Always pad. |
## Red Flags - STOP if you catch yourself:
- No padding between packed frames (texture bleeding).
- Atlas not power-of-two.
- Anchors lost during packing so placement breaks.
## Verification
You are NOT done until every box is checked:
- [ ] All sprites packed into a power-of-two atlas with padding.
- [ ] JSON map resolves every sprite by name with correct anchor.
- [ ] No texture bleeding at fractional zoom.
© 0xheycat · MIT · 0xheycat/isometric-game-skills