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:

AreaWhat It Produces
Sprite sheetsCharacters, monsters, props, attacks, spells, projectiles, impacts, idles, walks, and reference-guided variants
Layered mapsGround-only bases, dressed references, prop packs, transparent props, y-sort placement, collision, zones, and previews
Engine handoffGodot scenes, editable TileMap layers, separated props, encounter grass, collision bodies, exits, and debug players
Local cleanupChroma-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:

SkillUse It ForOutputRuntime
$generate2dspriteSprites, animation sheets, props, spell bundles, FX, reference variants, optional layout guides for fixed-frame sheetsRaw sheet, cleaned transparent sheet, frames, GIFs, metadataCodex / Grok (image gen)
$generate2dmapBaked maps, layered raster maps, clean HD RPG maps, prop packs, collision/zones, Godot-editable scenesBase map, dressed reference, prop pack, extracted props, preview, scene metadataCodex / Grok (image gen)
$video2dspriteDenser motion sprites from video: base still to image_to_video to frame extraction to magenta chroma to multi-density sprite strips/GIFsVideo, raw/clean frames, 8/16/24/48 sprite sets, strips, preview GIFsGrok 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:

  1. The user asks Codex for a sprite, prop pack, map, or engine-ready prototype.
  2. The agent chooses the asset type, action, bundle shape, sheet layout, frame count, style, and alignment strategy.
  3. Built-in image generation creates the raw visual asset.
  4. Local scripts run deterministic post-processing: chroma-key cleanup, despill, frame extraction, alignment, prop-pack slicing, GIF/PNG export, and validation metadata.
  5. 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, and combat_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.

ProjectTypeHighlights
Summon SurvivorsUnity WebGLGenerated map art, hero sheets, summons, evolutions, enemies, bosses, pickups, HUD, FX, level-up choices, and WebGL deployment
Forest Pass DefenseGodot Tower DefenseMap, separated props, tower slots, towers, enemy sheets, boss/flying enemies, waves, HUD, build/upgrade/sell flow, projectiles, and targeting rules
Editable RPG MapGodot TileMapImage-generated tileset and prop sheet wired into editable TileMapLayer, Sprite2D props, encounter grass Area2D, StaticBody2D collision, exits, metadata, and debug player/camera
Neon BreachCyberpunk side-scrollerPlayable side-scroller built around generated character, attack, map, and gameplay assets
Sengoku EraJavaScript Pokemon-likeBrowser-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.

CriteriaAgent Sprite ForgeRaw Image-Gen PromptingManual Sprite Tools (Aseprite)Asset Marketplaces
Post-processingAutomated cleanup, slicing, alignmentNone, manual cleanup neededFull manual controlNone needed, pre-made
Engine integrationGodot scenes, Unity wiringNoneManual importManual import
UniquenessCustom, prompt-drivenCustom, prompt-drivenCustom, hand-drawnReused by others
Learning curveNatural languagePrompt engineeringArt software skillsNone
Consistency across framesReference-guided variantsHard to controlExact by constructionExact by construction
CostFree, MIT, agent API costsAgent API costsSoftware licensePer-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.