Sprite Stacking: four pixel art views in, a sprite you can spin out
Sprite Stacking is an agent skill by GitHub user danielwh2 for game makers who work in pixel art. Give it a top, side, front and back view of an object, or just an idea, and the agent builds a layered sprite that rotates like a 3D model.
npx skills add danielwh2/sprite-stacking -a claude-codeAsk your coding agent to "make a rotatable pixel art car" and this skill draws or takes four views of it, cuts them into flat layers and stacks the layers into a sprite that turns on screen. GitHub user danielwh2 publishes it under the MIT license. Anthropic doesn't publish it. For how skills load, see what Claude skills are.
How the stack gets built
The README describes four steps. You start with top, side, front and back views in one row. A voxel survives only where all four views cover it. The carved volume is cut into a strip of layers, ground first, and at draw time each layer is rotated, squashed for camera pitch and lifted one pixel above the one below.
The SKILL.md routes by what you bring: a finished slice strip goes straight to rendering, a four-view sheet is checked for orientation, proportions and soft edges before carving, and a bare idea runs the whole path. Without an image generator, the agent draws the views itself in a short Python script.
What you get back
- slices.png, the layer strip your game draws from.
- check.png, a sheet with the extracted views, turntable angles and an exploded view, which the SKILL.md tells the agent to read before writing any game code.
- viewer.html, a standalone page with turntable, scene, slice-scan, exploded and play modes, plus export to a 16-direction sprite sheet.
The slicer script also takes flags for layer count, round shapes, palette size and optional normal-map and emissive-mask strips. The README suggests 15 to 20 layers for chunky sprites and 32 to 48 for detailed ones.
How to install it
The README's install line uses the skills CLI, which needs Node 22.20 or later; -a picks the agent and -g installs it for every project:
npx skills add danielwh2/sprite-stacking -a claude-code
Or copy the skills/sprite-stacking folder into ~/.claude/skills/ for Claude Code, or ~/.agents/skills/ for Codex, Cursor, OpenCode, Gemini CLI and Pi. The scripts need Python 3 with Pillow and NumPy.
Example request
Use the sprite-stacking skill. Make a rotatable pixel art [object, for example a red pickup truck] in the [chunky retro / detailed] style for my [Godot / Phaser / web Canvas] game. [I've attached a 4-view sheet / I have no art yet.] Show me check.png before you touch my game code.
If your project already has a renderer, the SKILL.md tells the agent to read it and fit the stack into it rather than add a second drawing pipeline.
Limits
- Hollows don't carve. A cavity that none of the four silhouettes shows, like the inside of a cup, stays solid; the SKILL.md leaves it for you to fix by hand.
- Hard edges only. A sheet with soft or airbrushed edges gets regenerated or redrawn, not cleaned up.
- Pixel art, not models. The output is layered 2D art that looks 3D from above; for real meshes, see Open 3D Skills.
When to use it
Use it for top-down games with cars, trees or buildings that need to turn without drawing every angle. For spell effects and animated sprite sheets in the same style, pair it with pixelfx.
Sources
- danielwh2/sprite-stacking README on GitHub, accessed November 2026
- sprite-stacking SKILL.md on GitHub, accessed November 2026