Aug 30, 2026
agent-sprite-forge: Generate Game-Ready 2D Sprites and Maps With Codex
A 3,950-star Codex skill set that turns natural-language requests into engine-ready 2D assets — sprite sheets, layered maps, and prop packs — with deterministic local scripts doing the cleanup that image generation always gets wrong.
AI image generation produces beautiful game art that is useless in an engine: frames drift in size, backgrounds refuse to go transparent, and a "walk cycle" never lines up. agent-sprite-forge (3,950 stars) attacks exactly that gap — the agent plans the asset, built-in image generation draws it, and deterministic local scripts handle the chroma-key cleanup, frame extraction, and export so what lands on disk is a usable game asset.
Why This Skill Matters
The repo ships three skills. $generate2dsprite produces sprite sheets, animation strips, props, spell bundles, and FX — with cleaned transparent sheets, extracted frames, GIFs, and metadata. $generate2dmap builds baked or layered maps, RPG scenes, and prop packs, and can hand off Godot-editable scenes with collision, zones, and y-sort placement. $video2dsprite samples a short generated video into denser frame sets for smoother run cycles — but it is Grok Build only, because it depends on Grok's native image_to_video tool that Codex does not have. The design principle throughout: the model decides the plan, scripts guarantee the output format.
Installation
Local processors need Python, Pillow, and numpy on PATH (ffmpeg as well for the video skill). On macOS or Linux:
git clone https://github.com/0x0funky/agent-sprite-forge.git
cd ./agent-sprite-forge
python3 -m pip install -r ./requirements.txt
mkdir -p ~/.codex/skills
cp -R ./skills/* ~/.codex/skills/
For Grok Build, copy into ~/.grok/skills instead — the README marks that as required for $video2dsprite. Start a new Codex or Grok Build session after installation so the skills reload.
Real Workflow: A Side-View Attack Animation
You are building a 2D action game and need a lightning-knight attack animation.
- Open a Codex session in any working directory and prompt:
Use $generate2dsprite to create a side-view lightning knight attack animation.
- The agent picks the sheet layout and frame count, generates the raw art, then runs the local pipeline: magenta chroma-key removal, despill, frame extraction, and alignment.
- Collect the outputs: a cleaned transparent sheet, individual frames, a preview GIF, and validation metadata you can check before importing.
If a frame looks off, re-run with a reference image — the skills' wrapper rule makes the agent view a local reference with view_image first so generation preserves the character's identity and style.
Real Workflow: An RPG Map With Collision
For environment work, the map skill layers the same discipline:
Use $generate2dmap to create a top-down RPG forest shrine map. Use a layered raster pipeline, a 3x3 prop pack for small environmental props, precise collision, encounter grass zones, a rest point, and actors that can walk in front of and behind tall props.
The output includes Godot-editable scenes with TileMap layers and collision bodies — the repo's showcase games (including a Unity WebGL survivor-like) were assembled from exactly these pipelines.
Tips
- Small environmental props batch into 2x2, 3x3, or 4x4 prop packs and get sliced into individual transparent PNGs — cheaper than generating each prop separately.
$video2dspritetrades crispness for density: smoother intermediate poses, but softer pixels and possible identity drift. For production sheets, the README says to keep using$generate2dsprite.- The repo documents itself in English, traditional and simplified Chinese, Japanese, and Korean.
- Run
view_imageon any local reference before asking for style-matched variants — it is the documented way to preserve sprite lineage.
When Not to Use This
This is a Codex/Grok pipeline, not a general image tool: no npx installer, no Claude Code marketplace — you copy folders and bring your own Python environment. If you need hi-res concept art or non-pixel styles, a plain image model serves you better; and if your sprites must be hand-tuned frame by frame, a drawing tool still wins.
See the leaderboard for more skills.