Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add 0xheycat/isometric-game-skills --skill spritesheet-atlas-packing -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/spritesheet-atlas-packing/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/spritesheet-atlas-packing/

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

Similar skills

All skills for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set21

using-isometric-skills A meta-skill that picks the right specialized skill for an isometric game task and sets the order to run them, before any code or art gets written. CX Codex +1 ★ 41repo stars transparent-cutout-cleanup Removes halos, fringes, and leftover background pixels from AI sprites to produce clean straight-alpha cutouts. CX Codex +1 ★ 41repo stars tilemap-data-format This skill guides the design of JSON tilemaps with layers and gameplay metadata. Use it when maps live in source code or need walkability data alongside visuals. CX Codex +1 ★ 41repo stars tile-picking-interaction Turns a pointer or touch position into the exact isometric tile under it, with camera pan and zoom taken into account. Useful when clicks land on the wrong cell. CX Codex +1 ★ 41repo stars seamless-isometric-terrain This skill helps generate isometric terrain tiles in ComfyUI and assemble maps without visible gaps, edge mismatches, or color drift. CX Codex +1 ★ 41repo stars isometric-pathfinding A pathfinding skill for isometric games: A* over the walkable tile layer, diagonal moves that never cut blocked corners, results returned as grid tiles. CX Codex +1 ★ 41repo stars isometric-object-sprites Creates isolated 2:1 isometric game props like trees and rocks with matching scale, contact shadows, and defined tile ground anchors. CX Codex +1 ★ 41repo stars isometric-grid-math This skill guides an agent through grid-to-screen and screen-to-grid math for a 2:1 isometric projection. Use it to place tiles or pick a tile with the mouse. CX Codex +1 ★ 41repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor