Skip to content
Back to search

sprite-stacking

Agent skill: turn four pixel art views into fake-3D sprites you can spin. Works with Claude Code, Codex, Cursor, OpenCode, Gemini CLI, Pi.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/danielwh2--sprite-stacking/badge.svg)](/listings/danielwh2--sprite-stacking)

HTML

<a href="/listings/danielwh2--sprite-stacking"><img src="/api/listings/danielwh2--sprite-stacking/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx skills add danielwh2/sprite-stacking

Installs to the current project. Add `-g` for every project, `-a claude-code` (or `codex`, `cursor`, ...) to pick an agent. Uses the [skills CLI](https://github.com/vercel-labs/skills), Node 22.20 or later.

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

| Agent | Folder | | --- | --- | | Claude Code | `~/.claude/skills/` | | Codex, Cursor, OpenCode, Gemini CLI, Pi | `~/.agents/skills/` |

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 87 lines
  1. # sprite-stacking
  2. An agent skill that turns four pixel art views into fake-3D sprites you can spin. By Daniel White.
  3. ![MIT](https://img.shields.io/badge/licence-MIT-111?style=flat-square)
  4. ![Agent skill](https://img.shields.io/badge/agent-skill-111?style=flat-square)
  5. ![Python 3 + Pillow + NumPy](https://img.shields.io/badge/Python%203-Pillow%20%2B%20NumPy-111?style=flat-square)
  6. ![Works with](https://img.shields.io/badge/works%20with-Claude%20Code%20%C2%B7%20Codex%20%C2%B7%20Cursor%20%C2%B7%20OpenCode%20%C2%B7%20Gemini%20CLI%20%C2%B7%20Pi-111?style=flat-square)
  7. ![Six sprite-stacked assets spinning](media/showcase.gif)
  8. ## Install
  9. ```bash
  10. npx skills add danielwh2/sprite-stacking
  11. ```
  12. Installs to the current project. Add `-g` for every project, `-a claude-code` (or `codex`, `cursor`, ...) to pick an agent. Uses the [skills CLI](https://github.com/vercel-labs/skills), Node 22.20 or later.
  13. Or copy `skills/sprite-stacking` into your agent's skills folder:
  14. | Agent | Folder |
  15. | --- | --- |
  16. | Claude Code | `~/.claude/skills/` |
  17. | Codex, Cursor, OpenCode, Gemini CLI, Pi | `~/.agents/skills/` |
  18. ## Use
  19. Ask your agent:
  20. - "Make a rotatable pixel art car."
  21. - "Sprite stack this 4-view sheet and give me a turntable."
  22. - "Add a fake 3D pixel art tree to my Godot game."
  23. No image generator? The agent draws the views itself in a short Python script.
  24. ## How it works
  25. ![Sheet to slices to render](media/pipeline.png)
  26. 1. **Views:** top, side, front and back, orthographic, one row.
  27. 2. **Carve:** a voxel survives only where all four views cover it.
  28. 3. **Slices:** the volume is cut into a strip of flat layers, ground first.
  29. 4. **Render:** each layer is rotated, squashed for pitch and lifted 1 px.
  30. ## Slicer CLI
  31. ```bash
  32. python3 skills/sprite-stacking/scripts/views_to_slices.py views.png slices.png \
  33. --slices 36 --preview check.png --html viewer.html
  34. ```
  35. - `--slices N`: layer count. 15-20 chunky, 32-48 detailed.
  36. - `--order reading`: force TOP, SIDE, FRONT, BACK. Default matches views by proportion.
  37. - `--round`: towers, balloons, pots carve round, not square.
  38. - `--side-nose right`: the side view faces right.
  39. - `--colours N`: shared palette size, `0` keeps every colour.
  40. - `--normals path.png`: save a matching 3D normal-map slice strip.
  41. - `--emissive path.png`: save an auto-detected emissive mask strip (headlights, windows, neon).
  42. ## Viewer
  43. `--html` writes a standalone page:
  44. - **Modes:** Turntable, **Scene** (Living Diorama with **Neon Street** and **Meadow Island** procedural stacked props, unified Y-sorting, and multi-PNG drop / `+ Add Prop`), Slice scan, Exploded view, and **Play** mode (**Drive** with WASD/arrows + drift across infinite Street/Meadow/Grid worlds, **Wind** sway, **Shatter** & rebuild).
  45. - **Lighting & Weather:** Live **Time of Day** (Day → Sunset → Night with auto-emissive glow and ground light pools), draggable sun (`Shift+drag`) with projected 3D shadows, and **Weather** (**Rain** with pixel streaks, ground ripples, and wavy upside-down wet reflections; **Snow** with real-time snow cap accumulation on upward-facing voxels via `normZ`).
  46. - **Performance:** Vectorized NumPy carving, zero-allocation typed-array software rasterizer, and angle/lighting-keyed prop sprite caching (~0.2–1.5 ms/frame in Chrome).
  47. - **Export:** 16-direction baked PNG sprite sheet export. `skills/sprite-stacking/scripts/viewer.html` also opens on its own and accepts dropped slice strips.
  48. ## Requirements
  49. Python 3 with Pillow and NumPy (`pip install pillow numpy`).
  50. ## Contributing
  51. ```bash
  52. python3 tests/check.py
  53. ```
  54. Prints `ok`.
  55. ## Prior art
  56. Sprite stacking is a long-standing indie game technique, not invented here. This skill adds the four-view carving and the agent workflow.
  57. ## Licence
  58. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.