Agent Sprite Forge
Codex skills for game-ready 2D sprites, layered maps, and engine-ready prototypes, with deterministic local post-processing.
Introduction
Agent Sprite Forge is an open-source skill collection that turns AI coding agents into a full 2D game asset pipeline. It is built for Codex-first workflows: you ask in natural language, the agent plans the asset pipeline, built-in image generation renders the raw visuals, and deterministic local Python scripts clean, split, validate, and export assets for Godot, Unity, or raw 2D game workflows.
The project is developed by 0x0funky and hosted on GitHub at github.com/0x0funky/agent-sprite-forge. It has gathered over 3,600 stars and 352 forks since its release in April 2026, and is licensed under the MIT license with READMEs available in English, Traditional Chinese, Simplified Chinese, Japanese, and Korean.
Agent Sprite Forge is not just a folder of prompts. It is a complete workflow where the agent decides the plan, image generation creates the raw visuals, and scripts turn those visuals into reusable game assets: sprite sheets, layered RPG maps, prop packs, transparent PNG/GIF exports, collision metadata, and even editable Godot scenes.
Key Features
The workflow covers four main capability areas:
| Area | What It Produces |
|---|---|
| Sprite sheets | Characters, monsters, props, attacks, spells, projectiles, impacts, idles, walks, and reference-guided variants |
| Layered maps | Ground-only bases, dressed references, prop packs, transparent props, y-sort placement, collision, zones, and previews |
| Engine handoff | Godot scenes, editable TileMap layers, separated props, encounter grass, collision bodies, exits, and debug players |
| Local cleanup | Chroma-key removal, frame extraction, alignment, transparent PNG/GIF export, prop-pack slicing, and QA metadata |
Included Skills
Agent Sprite Forge ships three skills that the agent loads inside your coding session:
| Skill | Use It For | Output | Runtime |
|---|---|---|---|
$generate2dsprite | Sprites, animation sheets, props, spell bundles, FX, reference variants, optional layout guides for fixed-frame sheets | Raw sheet, cleaned transparent sheet, frames, GIFs, metadata | Codex / Grok (image gen) |
$generate2dmap | Baked maps, layered raster maps, clean HD RPG maps, prop packs, collision/zones, Godot-editable scenes | Base map, dressed reference, prop pack, extracted props, preview, scene metadata | Codex / Grok (image gen) |
$video2dsprite | Denser motion sprites from video: base still to image_to_video to frame extraction to magenta chroma to multi-density sprite strips/GIFs | Video, raw/clean frames, 8/16/24/48 sprite sets, strips, preview GIFs | Grok Build only |
$video2dsprite is a Grok Build exclusive skill. It depends on Grok's native image_gen / image_edit plus image_to_video tools (still to short clip). Codex and other agents do not have image_to_video, so they cannot run the generation half of this pipeline. Use it when you want smoother intermediate poses (for example run/walk cycles) by sampling dense frames from a 6-second in-place motion clip. The tradeoffs are softer pixels, possible identity drift, and chroma fringe; for crisp production sheets, keep using $generate2dsprite.
How It Works
The pipeline runs in five stages:
- The user asks Codex for a sprite, prop pack, map, or engine-ready prototype.
- The agent chooses the asset type, action, bundle shape, sheet layout, frame count, style, and alignment strategy.
- Built-in image generation creates the raw visual asset.
- Local scripts run deterministic post-processing: chroma-key cleanup, despill, frame extraction, alignment, prop-pack slicing, GIF/PNG export, and validation metadata.
- For maps and prototypes, Codex can also assemble placement metadata, collision, trigger zones, Godot scenes, or Unity project wiring.
The script is not the creative brain. The agent makes the visual and pipeline decisions; the Python tools only perform repeatable pixel and export operations. When a visual reference is involved, the image skills follow a wrapper rule: make the image visible in the conversation first. Attached and freshly generated images are already visible; local files should be opened with view_image before asking built-in image generation to preserve identity, style, map layout, or sprite lineage.
What It Can Generate
- Creatures, characters, players, NPCs, props, and monsters
- Spell casts, projectiles, impacts, explosions, and FX sheets
- Small bundles such as
unit_bundle,spell_bundle, andcombat_bundle - Reference-guided sprite variants, animation sheets, and evolution lines
- Single baked maps, clean HD layered maps, prop-pack maps, and flattened previews
- Collision and zone metadata for playable maps
- Godot-ready editable maps with
TileMapLayer, separate props, encounter grass, collision, exits, and debug player scenes - Prototype-scale Godot and Unity scenes when the user asks Codex to wire assets into an engine project
Installation
Local processors need Python, Pillow, numpy, and (for $video2dsprite) ffmpeg on PATH.
Option 1: Windows PowerShell
git clone https://github.com/0x0funky/agent-sprite-forge.git
cd .\agent-sprite-forge
python -m pip install -r .\requirements.txt
# Codex
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.codex\skills" | Out-Null
Copy-Item -Recurse -Force ".\skills\*" "$env:USERPROFILE\.codex\skills\"
# Grok Build (required for $video2dsprite video generation)
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.grok\skills" | Out-Null
Copy-Item -Recurse -Force ".\skills\*" "$env:USERPROFILE\.grok\skills\"
Option 2: macOS / Linux
git clone https://github.com/0x0funky/agent-sprite-forge.git
cd ./agent-sprite-forge
python3 -m pip install -r ./requirements.txt
# Codex
mkdir -p ~/.codex/skills
cp -R ./skills/* ~/.codex/skills/
# Grok Build (required for $video2dsprite video generation)
mkdir -p ~/.grok/skills
cp -R ./skills/* ~/.grok/skills/
Start a new Codex or Grok Build session after installation so the skills reload. $generate2dsprite and $generate2dmap work wherever built-in image generation is available; the $video2dsprite full pipeline only works in Grok Build. The Python postprocessor can still re-sample already-exported frames on any machine with ffmpeg and Pillow.
Showcase Projects
The README documents several playable prototypes assembled with Codex using the workflow. They demonstrate the full loop: generated assets, structured scene data, and playable prototype wiring.
| Project | Type | Highlights |
|---|---|---|
| Summon Survivors | Unity WebGL | Generated map art, hero sheets, summons, evolutions, enemies, bosses, pickups, HUD, FX, level-up choices, and WebGL deployment |
| Forest Pass Defense | Godot Tower Defense | Map, separated props, tower slots, towers, enemy sheets, boss/flying enemies, waves, HUD, build/upgrade/sell flow, projectiles, and targeting rules |
| Editable RPG Map | Godot TileMap | Image-generated tileset and prop sheet wired into editable TileMapLayer, Sprite2D props, encounter grass Area2D, StaticBody2D collision, exits, metadata, and debug player/camera |
| Neon Breach | Cyberpunk side-scroller | Playable side-scroller built around generated character, attack, map, and gameplay assets |
| Sengoku Era | JavaScript Pokemon-like | Browser-based RPG with generated characters, starter selection, map flow, and battle UI |
Example prompt for a full game: "Use $generate2dsprite to create a 2D side-scrolling game similar to Mega Man. It should include attack mechanics, map elements, and all the essential features. I would like you to design it, and all the necessary assets should be created using this skill. It needs to be an actually playable game, with a cyberpunk story setting."
Comparison with Alternatives
Agent Sprite Forge sits between raw image-generation prompting, manual sprite workflows, and other AI game-asset tooling.
| Criteria | Agent Sprite Forge | Raw Image-Gen Prompting | Manual Sprite Tools (Aseprite) | Asset Marketplaces |
|---|---|---|---|---|
| Post-processing | Automated cleanup, slicing, alignment | None, manual cleanup needed | Full manual control | None needed, pre-made |
| Engine integration | Godot scenes, Unity wiring | None | Manual import | Manual import |
| Uniqueness | Custom, prompt-driven | Custom, prompt-driven | Custom, hand-drawn | Reused by others |
| Learning curve | Natural language | Prompt engineering | Art software skills | None |
| Consistency across frames | Reference-guided variants | Hard to control | Exact by construction | Exact by construction |
| Cost | Free, MIT, agent API costs | Agent API costs | Software license | Per-asset fees |
Agent Sprite Forge vs Raw Image-Gen Prompting: prompting an image model directly gives you a single picture, but game assets need transparent backgrounds, consistent animation frames, and engine-ready layouts. Agent Sprite Forge adds the deterministic pipeline that turns raw generations into usable sheets and scenes.
Agent Sprite Forge vs Aseprite: Aseprite and similar editors give pixel-perfect manual control, which remains the best path for hand-crafted art. Agent Sprite Forge trades that granular control for speed: describe what you need and get production assets in minutes, with the agent handling layout and cleanup.
Agent Sprite Forge vs Asset Marketplaces: marketplaces offer polished, ready-to-use packs, but they are shared with every other game using the same pack. Forge generates assets unique to your project and adapts them to your specific characters, story, and engine setup.
Community and Ecosystem
Agent Sprite Forge is an active open-source project with over 3,600 stars and 352 forks on GitHub. The MIT license makes it free to use, modify, and redistribute, and the multi-language README (English, Traditional Chinese, Simplified Chinese, Japanese, Korean) signals a broad international audience.
The ecosystem it plugs into includes Codex and Grok Build as agent runtimes, Godot and Unity as target engines, and the Python imaging stack (Pillow, numpy, ffmpeg) for post-processing. The showcase prototypes, including playable builds deployed on Vercel, demonstrate what the workflow produces end to end.