Generate animated 2D game sprites and seamless tileable textures from plain English — powered by Claude Code.
Describe a character, get a game-ready sprite sheet. Describe a wall, get a seamless texture.
/sprite-forge dragon flying left, breathing fire
/sprite-forge a seamless mossy brick wall texture
→ animated SVG → baked frames → PNG sprite sheet + GIF + metadata, in any orientation (side-scroller, top-down, or a full directional set) — or a seamlessly-tiling Doom/Duke-3D-style surface texture at multiple power-of-two sizes. Ready to drop into Unity, Godot, Phaser, LÖVE, or whatever engine you're using.
Every sprite below was generated from a single text description. No art skills, no asset store, no subscription fees beyond Claude Code itself.
The sprites above are the animated SVGs themselves, rendered inline by your browser — no GIF conversion, no video player. Each source file is 1–3 KB, vector, infinitely scalable, and auto-plays without click-to-start controls. The pipeline also produces 64×64 PNG sprite sheets (JSON metadata, animated GIFs, and optional flipped/directional siblings via --flip-to) for game-engine import. Sources in showcase/ — tweak and re-run the pipeline.
Describe a surface, get a seamlessly tileable texture — Doom/Duke-3D-style walls and floors. Each image below is a 3×3 tiling of one generated tile, so you can see the edges wrap with no seam. Every tile is built from edge-wrapped geometry and numerically seam-checked at bake time.
brick |
stone block |
cobblestone |
wood planks |
metal plate |
floor tiles |
sci-fi panel |
woven fabric |
dirt ground |
concrete |
organic (moss/rust) |
…and they animate. Looping textures are seamless in space (edges wrap) and time (the loop returns to its start). These are 3×3 tilings, playing live:
"flowing water, animated" — scrolling caustics |
"energy barrier, animated" — pulsing (transparent decal) |
Thirteen seam-correct starting templates ship with the skill, restyleable to any palette. Sources in showcase/textures/. See the Textures section below for how it works.
curl -fsSL https://raw.githubusercontent.com/gididaf/sprite-forge/main/install.sh | bashThat's it. The installer sets up the CLI tool, the Claude Code skill, and all dependencies.
Requirements: Claude Code, Python 3.10+, Pillow, librsvg. The install script handles the last three.
Open Claude Code in any directory and type:
/sprite-forge goblin warrior with a club, walking left
Claude generates the SVG, runs the conversion pipeline, and hands you:
goblin_warrior_walk_left.svg ← animated source (editable)
goblin_warrior_walk_left_spritesheet.png ← 8-frame horizontal strip
goblin_warrior_walk_left.gif ← animated preview
goblin_warrior_walk_left_spritesheet.json ← frame data for your engine
Need the right-facing version too? One render produces both:
goblin_warrior_walk_right_spritesheet.png ← flipped sibling via --flip-to
goblin_warrior_walk_right.gif
goblin_warrior_walk_right_spritesheet.json
The SVG is the source of truth — tweak it and re-run the pipeline anytime.
No flags to memorize. Just describe what you want.
/sprite-forge make the eyes glow red, modify skeleton_walk_left.svg
/sprite-forge now make it run, based on skeleton_walk_left.svg
/sprite-forge add a shield, based on skeleton_walk_left.svg
Claude reads the existing SVG, applies your change, and regenerates the sprite sheet. No re-prompting from scratch.
Want a sprite grounded on real concept art instead of drawn from priors? Sprite Forge can generate a few reference images with a local image model, let you pick one, and ground the sprite on it — so a specific request comes out as that, not a generic stereotype.
/sprite-forge a Byzantine cataphract, use a reference
Claude generates a few candidates, you pick one (or blend two in plain words), and it lifts the palette, gear, and silhouette into the sprite. It's design-level grounding — Claude draws a fresh, clean, animatable SVG from the reference, never traces it.
- Local & free — runs
mflux(FLUX on Apple-MLX) on-device. No API keys, no per-image cost, nothing leaves your machine. - Optional & off by default — only engages when you ask ("use a reference", "make it look like a real X") or supply your own image. Plain requests stay fast and dependency-free.
- Apple Silicon only, one-time setup:
bash .claude/skills/sprite-forge/reference/install.sh(pulls the model, ~9.6 GB, cached); the first generation downloads it. If it isn't installed, Sprite Forge just falls back to normal generation.
Sprite Forge also generates seamlessly tileable surface textures — the kind you'd wrap around a Duke Nukem 3D / Doom wall (see the Texture Showcase above for the full gallery). Describe a material; get a tile that repeats with no visible seam, at multiple power-of-two sizes, plus a 3×3 verification grid.
/sprite-forge a worn brick wall, seamless texture
Thirteen seam-correct starting templates ship with the skill (brick, stone, cobblestone, wood, metal, tile, fabric, sci-fi panel, dirt, concrete, organic moss/rust/marble, plus animated water/lava and a force field), restyleable to any palette. Seamlessness is built from edge-wrapped geometry — the baker numerically self-checks every tile ([seam] edge-wrap error mean=0.0 (seamless)) so a broken wrap never slips through. Textures can be opaque walls/floors or transparent decals (grates, vines, cracks) that sit on top of another surface.
Each bake produces <name>_64/128/256.png, a <name>_tilecheck.png grid, and a <name>_texture.json for your engine.
Textures can also loop — flowing water, bubbling lava, scrolling glow, a pulsing force field:
/sprite-forge a seamless flowing water texture, animated
An animated texture is seamless on two axes: space (edge-wrapped geometry, checked per frame) and time (a cyclic loop that returns to its start — the baker measures the loop and warns if it pops). --tileable --animated bakes a flipbook sprite sheet per size, a looping GIF, and an animated 3×3 seam-check (shown in the Texture Showcase above).
Already have an animated SVG? Convert it directly:
# Default: 8 frames, 64×64, sprite sheet + GIF + metadata
sprite-forge hero_walk_left.svg
# Also emit a flipped right-facing sibling (sheet + gif + meta) in one render
sprite-forge hero_walk_left.svg --facing left --flip-to hero_walk_right
# Higher resolution, more frames, with HTML preview
sprite-forge hero_walk_left.svg --frames 12 --size 128 --preview
# Texture mode: seamless tile at 64/128/256 + a 3×3 seam-check grid
sprite-forge brick_wall_texture.svg --tileable --material brick| Flag | Default | Description |
|---|---|---|
--frames N |
8 | Number of animation frames |
--size N |
64 | Frame size in pixels (square) |
--output PATH |
auto | Output PNG path |
--flip-to NAME |
— | Emit a complete flipped sibling deliverable (sheet + gif + meta) named NAME_* — preferred for right-facing directions |
--facing LABEL |
— | Record facing (left, down, up, downleft, …) in the metadata |
--mirror / --no-mirror |
off | Generate a generic _mirror.png flipped sheet (legacy — prefer --flip-to) |
--meta / --no-meta |
on | Emit JSON metadata |
--gif / --no-gif |
on | Animated GIF (great for READMEs / Discord / wikis) |
--preview |
off | Generate animated HTML preview |
--silhouette |
off | Black-on-white silhouette of frame 0 (readability check) |
--keep-frames |
off | Keep individual frame PNGs |
--duration SECS |
auto | Override animation duration |
Texture mode (--tileable) renders a seamless surface instead of a sprite sheet:
| Flag | Default | Description |
|---|---|---|
--tileable |
off | Texture mode — emit a seamlessly tiling surface (no sprite sheet, no facing) |
--sizes A,B,C |
64,128,256 |
Power-of-two sizes to emit (supersedes --size) |
--tile-grid N |
3 | Emit an N×N seam-check grid PNG (0 disables) |
--material NAME |
— | Material label recorded in the metadata |
--animated |
off | Bake a looping animated texture from the SVG's cyclic SMIL (flipbook sheet per size + GIF + animated seam-check) |
Sprite Forge leans on Claude Code's native ability to generate SVG — no external APIs, no subscription on top of Claude Code, no training pipeline.
The pipeline:
- Parse — read the SVG and auto-detect animation duration
- Bake — sample
<animate>/<animateTransform>values at N evenly-spaced time points, producing N static SVG snapshots - Render — rasterize each snapshot via
rsvg-convert - Stitch — combine frames into a horizontal sprite sheet
- Flip (
--flip-to, optional) — flip each frame individually to derive the opposite-facing direction (preserving per-frame geometry, unlike a blanketscale(-1,1)transform) - Emit — metadata JSON + optional animated HTML preview
The /sprite-forge skill bundles a visual review loop: Claude reads its own generated sprite sheet, grades it against a correctness spec, and iterates until it looks right (hard cap: 3 iterations). For subjects involving directional physics (archers, casters) it can spawn a fresh-eyes subagent reviewer to catch blind spots.
If you're hand-editing SVGs or extending the skill:
- Orientation: the skill is orientation-aware — side-scroller (left/right), top-down 4-/8-way, or single/non-directional. Draw the non-flippable directions; derive the right-facing twins with
--flip-to. - ViewBox:
0 0 64 64standard,0 0 80 64for wide characters (spiders, dragons). - Animation: SMIL only (
<animate>,<animateTransform>). CSS animations aren't baked. - Layering: back limbs (darker) → body → front limbs for depth.
- Body width in profile: ≤ 7px — wider torsos read as front-facing regardless of head detail.
- Limb thickness: ≥ 5px — thinner disappears at 64×64.
- Animation pitfalls: keep rotation pivots constant across keyframes; don't nest more than one
additive="sum"rotate per hierarchy branch (the frame baker doesn't resolve them cleanly).
PRs welcome — especially new sprite archetypes for the showcase, or improvements to the baking engine. Keep SVGs small and hand-editable; no binary assets in the repo except the showcase PNGs.
MIT