0x0funky/agent-sprite-forge

▲ 39 stars today★ 5,746⑂ 559

Agent Skill for generating 2D sprite sheets and map, transparent PNG frames, and animated GIFs from prompts.

About 0x0funky/agent-sprite-forge

0x0funky/agent-sprite-forge is an open-source project on GitHub, mainly written in Python. Agent Skill for generating 2D sprite sheets and map, transparent PNG frames, and animated GIFs from prompts. It currently holds 5,746 stars and 559 forks with 14 open issues, and was last pushed on 2026-11-13 (repository created 2026-04-23).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #70 with 39 new stars today.

GitHub Repository Details

Repository 0x0funky/agent-sprite-forge · default branch main · size 105675 KB · watchers 18 · source: GitHub REST API and repository README

README

Agent Sprite Forge

Languages: English | 繁體中文 | 简体中文 | 日本語 | 한국어

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Agent Sprite Forge banner

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/0x0funky%2Fagent-sprite-forge | Trendshift

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Agent Sprite Forge 0.4 teaser
0.4 launch teaser: every frame is real ASF output.

One still → a whole game-ready sprite set

Approve one generated still. Get every action of the character, keyed, looped, timed and exported for your engine.

Agent skills for Claude Code (plugin), Codex and Grok. The agent generates a master still with the best image route you have, makes one image-to-video clip per action from it, and deterministic Python tools gate, key, register, loop, retime, finish and package every action for Godot, Aseprite or a web game.

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Aria, the approved master still: a young swordswoman with short dark hair, a teal cloak and a long red scarf, side view facing right
1. One approved master still
Generated by the local Codex CLI (image_gen), take 1 of 3.
https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Aria's six actions at real timing: idle, walk and run loops; attack, jump and hurt one-shots
2. Six actions, one image-to-video clip each
Grok image-to-video (local CLI), soft-matte keyed, registered, loops picked by measurement, one-shots retimed to game speed, HD finish with the colour lock. Real timing.

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Aria runs across a generated meadow, stops for a sword thrust and runs on
3. In a scene: the packaged run, attack and idle over a generated background. The run speed is measured from the contact foot, so the feet do not slide. Every frame comes from the 2026-10-06 live run; nothing is mocked up.

Pixel looks · Hibit style · What's new · Quickstart · Routes and providers · Pipeline · Maps · Showcase · Tools

New: pixel looks, 1x sprites that follow a reference

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/A fight on a 384x216 plate: a swordsman walks in and is struck by a skeleton knight, strikes back, a mage casts and the knight falls, a frost dragon roars and lunges, and after the last blow it falls and the swordsman raises his sword
A whole fight from pixel-look sprites, rendered at 1x and shown at 2x: four 1x characters (masters of 33x55 to 87x86) and 14 sets with 168 drawings read back from image-to-video clips. The plate behind them is a generated painting brought down to 384x216 and 40 colours. The white hit flashes and the knight's fade are the demo's; nothing else is added.

An image model asked for pixel art paints a picture of pixels: blocks of uneven size (15 to 30 px in the picture below), 88,410 colours in one small figure, soft edges. Shrinking it does not help: resized plainly to the sprite's size it still has 1,033 colours. Hibit gets round this by never asking for pixel art. Pixel looks go the other way, for the classic small sprite that follows a look you like: the look is never described in words, one sprite you like is the reference for the whole cast, and the picture the model paints is read back onto a real grid. pixel_look.py master finds the picture's own grid, takes one flat colour from every block, keeps the figure's proportions, brings the colours down to a palette and closes the outline by rule. What comes out can be counted: 33x55 pixels, 48 colours, alpha 0 or 255, a 2.5 KB PNG.

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/The picture an image model painted of a silver-haired swordsman in a dark coat, on a flat green ground: it looks like pixel art
What the image model painted
1254x1254 px. The figure alone has 88,410 colours and its blocks are 15 to 30 px: no grid fits it.
https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/The same picture resized plainly to 33x55 and shown at 7x: a smudged eye, uneven edges and green specks at the hair
Resized plainly to 33x55
Nearest sampling, shown at 7x: 1,033 colours, the ground's green left in 3 cells. Bilinear gives 1,275 colours and 413 soft pixels.
https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/The 1x sprite made from the same picture, shown at 7x: clean cells, a closed outline, a clear face
pixel_look.py master
The same picture read on its own grid, shown at 7x: 33x55, 48 colours, no soft pixel.

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/The same part of the face twice: in the picture the blocks have uneven sizes and soft, stained edges; in the sprite every cell is one flat colour
The same part of the face: the picture at 2x (left) and the sprite at 40x (right).

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/The swordsman, the mage, the skeleton knight and the frost dragon on one ground line; each idles and plays one action in turn: a sword strike, a cast, a strike, a roar
The cast follows the first sprite. Every further character is drawn beside the first sprite in one picture (ask-cast, cast), so it keeps the pixel size and stands as tall: a mage, a skeleton knight and a frost dragon, 48 colours each.

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/The swordsman's idle, walk, attack, hurt and victory sets and the dragon's roar, lunge and fall, each with its number of drawings
Poses, views and motion from the master. A pose is the master reproduced with one change (the sword pose: 217 cells changed, 91% of the master kept); a view is drawn beside the master. Motion comes from an image-to-video clip of that sprite: pixel_motion.py reads every frame back on the sprite's lattice and palette (the attack: 21 drawings picked from 145 video frames). The number is the drawings of each set.

| Measured on the run (2026-11-12) | | |---|---:| | The swordsman's generated picture (the figure) | 1254x1254, 88,410 colours, blocks 15-30 px | | The same picture resized to 33x55: nearest / bilinear | 1,033 colours / 1,275 colours and 413 soft pixels | | pixel_look.py master | 33x55, 48 colours, 0 soft pixels, 2.5 KB | | The cast: mage / skeleton knight / frost dragon | 45x56 / 50x55 / 87x86, 48 colours each | | The sword pose from the master | 217 cells changed, 91% of the master kept | | The attack set from one clip | 21 drawings from 145 video frames | | The fight | 14 sets, 168 drawings; every drawing has only its sprite's own colours and no soft pixel |

What's new:

New: hibit, real pixel art from flat AI art

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Pip's Star Grove: Pip the fox mage casts falling stars at magma slimes crawling in from both sides while coins drop
Pip's Star Grove, a one-screen demo built only from hibit output: autopilot gameplay captured from the game canvas (480x270, shown at 2x). FX: pixelfx by Patch (MIT).

Never ask an image model for "pixel art": it paints fake, uneven pixels. The hibit style asks it for clean flat lineless art (at most 3 tones per material, no outlines) and makes the pixels afterwards: one palette per character learned from the source pixels, an 8x8 majority-vote downscale (every pixel is the palette colour that covered most of its cell, never a blend), hysteresis against flicker, eyes and glints kept, binary alpha, and a 1 px outline whose colour comes from the sprite itself.

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Pip's flat lineless master still, the hibit finish of her idle at 80 px shown at 4x, and her 17-colour palette with the outline colour
Flat art in, pixel art out
The approved master (Codex) and the hibit finish of the idle at 80 px: 16 colours learned from the source plus the outline colour, which --outline auto takes from the sprite's dominant hue (#380500, a deep red-brown from the orange fur). Never a fixed orange.
https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Pip idle, walk, cast and hurt, and the magma slime idle, crawl and attack, at 2x and real timing
Whole sets, one palette per character
Pip (idle, walk, cast, hurt) and a magma slime (idle, crawl, attack): Grok image-to-video clips through sprite_set.py --finish hibit, 12 fps. Every action reuses the first action's palette and outline.

FX: pixelfx (recommended) or the image route

For hibit effects we recommend pixelfx by Patch: a library of code-driven pixel-art effects (fire, arcane, impacts, weather, pickups, UI) that fits the style and renders for free on your machine. It is a separate MIT project: clone it yourself (git clone https://github.com/patch-gg/pixelfx, Node 18+) and the skill finds it. fx_pixelfx.py check picks the route; a route you name wins.

| | A: pixelfx installed (recommended) | B: image route (always available) | |---|---|---| | Frames per effect | 16-91 at 30 fps | 4 (one 2x2 sheet) | | Cost | free (local Node) | one generated image per effect | | Look | pixelfx's own style, recoloured with --ramp and --snap | your game's flat style and palette | | Credit | every render ships CREDITS.txt (pixelfx's MIT license and notice) | the image route, like every sprite |

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Route A: pixelfx star-fall recoloured to Pip's palette hits the slime, then a hit spark, a smoke poof and spilling coins
A: pixelfx
arcane/star-fall recoloured to Pip's palette, impacts/hit-spark, spawn/poof, spawn/coin-drop.
https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Route B: image-generated falling stars hit the slime with a ground burst, then white puffs and bouncing coins
B: image route
Codex 2x2 FX sheets, keyed and registered by process, made pixel art by the hibit_fx.py step (Pip's palette for the stars and coins, 6 learned colours for the spark and the poof).

Full 50 s of autopilot play, same seed: with pixelfx FX (MP4) · with image-route FX (MP4).

| Measured on the live run (2026-11-06) | | |---|---:| | Pip: palette (learned from the source pixels) | 16 + outline | | Noise flicker removed by the hysteresis (vs the same majority without it): Pip's 4 clips / the slime's 3 | 32-40% / 10-24% | | Auto outline colour: Pip / magma slime / Forge Bot | #380500 / #380500 / #002131 | | Colours in the whole game scene: route B / route A (pixelfx light blending; only the star-fall snapped) | 65 / about 6,700 | | Frames per effect: route B / route A | 4 / 16-91 |

What's new:

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Forge Bot idle: the earlier bold pixel finish next to hibit with the auto, selective and fixed orange outlines
Forge Bot: the earlier bold pixel finish, then hibit with the outline from the image (auto), the palette's shades (selective) and a fixed studio orange.

What's new in 0.4 — the big upgrade

Before 0.4, character animation meant cutting frames out of an image-generated sheet, or keying a single clip by hand. 0.4 turns one approved still into the whole set: one image-to-video clip per action, and a measured pipeline from every clip to the engine. Before and after, measured on real outputs:

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Old pixel fox run cut from one image-gen sheet next to the new 0.4 pixel fox run, 4x nearest, 80 ms per frame
Pixel finish: the 48x64 fox run
Old: one image-gen sheet cut 1/8 (594–709 colours per frame, soft alpha). New: master still → Grok clip → pixel finish (16–19 colours, binary alpha, selective outline). 4x nearest, both at 80 ms.
https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/2x crop of the same Grok frame: a magenta outline with the old keyer, a clean edge with the 0.4 soft matte
Soft-matte keyer: no purple fringe
Same Grok clip, same frame, 2x crop. Fringe 0.704 → 0, leaked key pixels 7,780 → 0, keying 271 s → 44 s for 145 frames.
https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Aria's attack at the generator's slow-motion speed next to the auto-retimed attack at game speed
One-shots retimed to game speed
Image-to-video plays a quick attack as a slow-motion clip. retime --auto-oneshot cuts the frozen holds and pins the hit: 4.1 s → 0.7 s, hit at 292 ms.
https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Aria's run loop without and with the HD colour lock; without it the boots shimmer olive and maroon
HD colour lock
Video models drift colours on fast limbs. The lock holds every design colour on the master's (OKLab chroma, lightness kept): hue flips halve and most of the boot shimmer goes away.

| Measured on the live runs | before | 0.4 | |---|---:|---:| | Pixel fox (48x64, 8 frames): colours per frame | 594–709 | 16–19 | | Pixel fox: alpha levels | 199 | 2 | | Pixel fox: lone pixels per frame (mean) | 732 | 75 | | Keyer: purple fringe (outer-ring spill, mean) | 0.704 | 0 | | Keyer: key pixels leaked over 145 frames | 7,780 | 0 | | Keyer: time for 145 frames | 271 s | 44 s | | Attack: one-shot length | 4.1 s | 0.7 s | | Colour lock: hue flips per frame pair (run loop) | 352 | 170 | | QC: good takes wrongly rejected | 18 of 24 | 0 of 24 |

What changed:

Everything in the CHANGELOG. The live record, weak points included: docs/validation-2026-10-06.md.

Quickstart

1. Install

Claude Code (plugin)

claude plugin marketplace add 0x0funky/agent-sprite-forge --sparse .claude-plugin skills
claude plugin install agent-sprite-forge@agent-sprite-forge
python -m pip install "numpy>=1.26" "Pillow>=10.1" "scipy>=1.11"

--sparse checks out only the plugin manifest and the skills, not the showcase media.

Codex

git clone https://github.com/0x0funky/agent-sprite-forge.git
cd agent-sprite-forge
python -m pip install -r requirements.txt
python tools/install_skills.py --apply --host codex

Grok: from the same clone, python tools/install_skills.py --apply --host grok (~/.grok/skills). --host agents writes ~/.agents/skills and --dest any skills folder.

--apply backs up an installed copy and writes a sha256 manifest; python tools/install_skills.py --check --host codex reports drift later. Video needs ffmpeg 5.1+ on PATH. Start a new agent session so the skills load.

Optional: configure an API key (Setting API keys). Without one, the agent uses your signed-in Codex or Grok CLI.

2. Make the master still

Use $generate2dsprite to make a master still of Aria, a young swordswoman hero: short dark hair, a teal hooded cloak, a long red scarf and one steel sword. Side view, facing right, HD.

The agent runs master_still.py generate --takes 3 (every take through route_media.py), shows you the takes, fixes a near-miss with master_still.py edit ("THE ONLY CHANGE: ..."), and approves one: the still is keyed, padded to the class framing (a hero stands 788 px tall on 1024x1024) and recorded in master.json.

https://github.com/0x0funky/agent-sprite-forge/blob/HEAD/Three master takes of Aria side by side on the magenta key colour; take 1 was approved

3. Make the sprite set

Use $video2dsprite to animate the approved Aria master: idle, walk, run, attack, jump and hurt. Package them for Godot and the web.

Under the hood (` is the installed video2dsprite` folder):

python "/scripts/sprite_set.py" plan --master art/aria-master/master.json --output-dir art/aria-set
python "/scripts/sprite_set.py" run --plan art/aria-set/set_plan.json
python "/scripts/sprite_set.py" review --plan art/aria-set/set_plan.json
python "/scripts/sprite_set.py" accept --plan art/aria-set/set_plan.json --action run --take 2
python "/scripts/sprite_set.py" report --plan art/aria-set/set_plan.json

run resumes where it stopped and never generates a clip twice. The agent looks at every review sheet before it accepts an action, because the numbers cannot see a changed weapon or a covered face. Each action ends as a verified package; export_engine.py adds Godot and Aseprite files.

Routes and providers

Every generated image or clip goes through generate2dmedia/scripts/route_media.py. It walks this order and names the route it used:

| Order | Route | Images | Video | Used when | |---|---|---|---|---| | 1 | API: a key you configured | OpenAI, Google Gemini, xAI, BytePlus Seedream, fal.ai (reference edits) | xAI, BytePlus Seedance, fal.ai (Kling v3, Veo 3.1, Luma, MiniMax, Wan, Vidu, LTX) | A key is configured. The key is your consent, so there is no per-call question | | 2 | Local CLI: your own signed-in Codex or Grok | Codex image_gen (up to 8 references); Grok one-shot image or edit | Grok image-to-video in ACP mode (6 or 10 s) | No key, or every API route refused for an account reason (no key, auth, quota, rate limit). Uses your subscription quota, never an API key | | 3 | Code art (codeart2d) | Code-drawn pixel sprites, vector art, FX, tiles | Rigged animation | The last resort: only when no route exists (no-route, exit 3) or when you ask for code-drawn art. Always disclosed as code-drawn |

python "/scripts/route_media.py" resolve --kind image prints the route that would run, and forge_doctor.py lists which keys are configured (yes or no, never the key) and the resolved order. A moderation refusal, or an outcome that may have cost money, is never

GitHub Stars & Activity

5,746Stars
559Forks
14Open issues
PythonLanguage

GitHub Popularity

GitHub stars5,746
Forks559
Open issues14
Primary languagePython
LicenseMIT
Stars gained today39
Created2026-04-23
Last pushed2026-11-13

Trending History

Daily boardrank #70 · ▲ 39 stars

Related GitHub Projects

1

headroomlabs-ai / headroom

Python★ 79,693⑂ 6,241▲ 93 stars
→
2

Alishahryar1 / free-claude-code

Python★ 70,378⑂ 10,927▲ 366 stars
→
3

anthropics / claude-plugins-official

Python★ 47,345⑂ 4,918▲ 136 stars
→
4

mukul975 / Anthropic-Cybersecurity-Skills

Python★ 36,171⑂ 4,428▲ 59 stars
→
5

andrewyng / openworker

Python★ 19,274⑂ 2,751▲ 100 stars
→
6

LibreTranslate / LibreTranslate

Python★ 17,737⑂ 1,860▲ 130 stars
→
7

dreammis / social-auto-upload

Python★ 16,555⑂ 2,809▲ 34 stars
→
8

elementalsouls / Claude-BugHunter

Python★ 5,882⑂ 902▲ 124 stars
→

More Trending Repositories