ClaudeMap

sprite-stacking

An agent skill that turns four pixel-art views into a carved voxel volume and renders it as a fake-3D sprite you can spin — with a standalone viewer and PNG export

Skills & Commandsskillpixel artfake 3dpythongamedev

sprite-stacking is an agent skill for the classic indie-game rendering trick of stacking flat layers to fake depth. The pipeline takes four orthographic views (top, side, front and back, one row), carves a voxel volume that survives only where all four views cover it, cuts the volume into a strip of flat layers ground-first, then renders each layer rotated, squashed for pitch and lifted one pixel. The skill ships a slicer CLI (views_to_slices.py) with flags for layer count (15-20 chunky, 32-48 detailed), view-order matching by proportion or forced reading order, round carving for towers, balloons, pots, side-view facing and shared palette size, plus a standalone viewer.html with a turntable, slice scan, exploded view, drag-to-orbit and 16-direction PNG export; the viewer also accepts a dropped slice strip. If the agent has no image generator it draws the four views itself in a short Python script. Ask for a rotatable pixel-art car, a turntable from a 4-view sheet, or a fake-3D tree for a Godot game. Requires Python 3 with Pillow and NumPy; the skills CLI path needs Node 22.20 or later. The README is explicit that sprite stacking is a long-standing technique — this skill adds the four-view carving and the agent workflow, not the invention. By Daniel White.

What it does

  • Four-view pipeline: orthographic top/side/front/back views carve a voxel volume (kept only where all four views cover it), then slice it ground-first into a renderable strip
  • views_to_slices.py CLI: --slices N for layer count (15-20 chunky, 32-48 detailed), --order reading, --round for round carving, --side-nose, --colours N for the shared palette
  • Standalone viewer.html: turntable, slice scan, exploded view, drag-to-orbit, and 16-direction PNG export; opens on its own or takes a dropped slice strip
  • Agent-first workflow: no image generator needed — the agent draws the four views itself in a short Python script, then runs the slicer
  • Host breadth per its badge: Claude Code, Codex, Cursor, OpenCode, Gemini CLI and Pi; copy into ~/.claude/skills/ or ~/.agents/skills/ respectively

When to use it

Use when a game, toy page or asset pack needs rotatable fake-3D props from a handful of pixel views, or when you want the agent to produce sprite-stack assets end to end without an image model. Skip it for true 3D pipelines or photoreal renders — it is deliberately fake depth.

Getting started

Via the skills CLI (installs to the current project; -g for every project, -a <agent> to pick one; needs Node 22.20+):

npx skills add danielwh2/sprite-stacking

Or copy skills/sprite-stacking into your agent's skills folder:

Claude Code: ~/.claude/skills/
Codex, Cursor, OpenCode, Gemini CLI, Pi: ~/.agents/skills/

Requirements: python3 with Pillow and NumPy (pip install pillow numpy).

Run the slicer directly:

python3 skills/sprite-stacking/scripts/views_to_slices.py views.png slices.png --slices 36 --preview check.png --html viewer.html

Things to know

Rendering rotates and squashes every layer, so a higher --slices count renders proportionally more layers; the README example uses 36. View-order matching runs by proportion by default; use --order reading to force TOP, SIDE, FRONT, BACK. The README credits sprite stacking as prior art and scopes this repo to the four-view carving plus agent workflow. Contributing check: python3 tests/check.py prints ok. MIT. 69 stars as of writing (2026-11-21).

Repository

danielwh2/sprite-stacking

Charted

Related on the map

  • An instruction-only skill that makes agents research before they ask, plan before they build, and verify before they call anything done.

    • workflow
    • verification
    • quality
    • skill
  • Guizang's agent skill turns your repo's recent updates into a finished promo video — real components, code-rendered animation, an original code-written soundtrack — no video editor involved.

    • agent-skill
    • video
    • promo
    • marketing
  • An agent skill that geolocates a photo with nothing readable in it — OSM geometry, elevation skylines and satellite tiles turn “where was this taken?” into a measured answer with an error radius.

    • agent-skill
    • geolocation
    • osint
    • openstreetmap