<p align="center">
<img src="./src/banner.png" alt="Agent Sprite Forge banner" width="900" />
</p>
<p align="center">
<strong>Codex skills for game-ready 2D sprites, layered maps, and engine-ready prototypes.</strong>
</p>
<p align="center">
Ask in natural language. Codex plans the asset pipeline, renders with built-in image generation, then local processors clean, split, validate, and export assets for Godot, Unity, or raw 2D game workflows.
</p>
<p align="center">
<a href="#showcase">Showcase</a> ·
<a href="#included-skills">Skills</a> ·
<a href="#install">Install</a> ·
<a href="#suggested-prompts">Prompts</a> ·
<a href="#star-history">Star History</a>
</p>
What Makes It Different
Agent Sprite Forge is not just a folder of prompts. It is a Codex-first 2D game asset workflow where the agent decides the plan, image generation creates the raw visuals, and deterministic scripts turn those visuals into reusable game assets.
These examples were assembled with Codex using agent-sprite-forge workflows. They are meant to show the full loop: generated assets, structured scene data, and playable prototype wiring.
Use $generate2dsprite when you need animated units, playable characters, monsters, props, spell bundles, projectile/impact FX, or reference-guided variants.
Layered RPG Map Pipeline
Use $generate2dmap when you need maps instead of isolated sprites. For readable layered raster maps, the current workflow prefers a clean hand-painted HD game-map style: ground-only base first, dressed reference second, prop pack third, then transparent prop extraction and layered preview composition.
$generate2dmap can also produce an editable Godot map project instead of a single flattened image. This showcase uses an image-generated tileset and 3x3 prop sheet, then wires them into a Godot 4.5 scene.
Godot output includes editable TileMapLayer nodes, independent Sprite2D props, encounter grass Area2D zones, StaticBody2D collision blockers, exit Area2D zones, and a debug player/camera.
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.
Link: <a href="https://sengoku-era.vercel.app/">Play the JavaScript browser build</a>
Use $generate2dsprite to create a 2D game similar to Pokemon. You only need to build one scene for now. It must include a starter monster selection mechanic, a battle screen, and all basic gameplay functions. I would like you to design all the elements and the story, and you can also decide which game engine to use. Use this skill to create any assets you need. The story should be set in the Sengoku period.
$video2dsprite is a Grok Build exclusive skill. It depends on Grok's native image_gen / image_edit + image_to_video tools (still → 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 (e.g. run/walk cycles) by sampling dense frames from a 6s in-place motion clip. Tradeoffs: softer pixels, possible identity drift, chroma fringe — for crisp production sheets, keep using $generate2dsprite.
Install for Grok Build by copying skills into ~/.grok/skills (see Install). On Codex, install is still ~/.codex/skills; $video2dsprite will load but must refuse the video step if tools are missing.
Case study: Ryo run (16 denser frames)
Pipeline: base still → image_to_video (6s) → chroma key → 16-frame strip.
Note: GitHub README does not reliably render <video> tags (especially inside tables). Motion is shown as GIF previews; MP4 files are still in the repo for download / local play.
| Base still | Motion (image_to_video) | Sprite result (16f) |
| --- | --- | --- |
| <img src="./src/video2dsprite-ryo/base.png" alt="Ryo base still on magenta" width="220" /> | <img src="./src/video2dsprite-ryo/run-6s-preview.gif" alt="Ryo 6s run video preview" width="240" /><br />Download MP4 | <img src="./src/video2dsprite-ryo/preview-16.gif" alt="Ryo 16-frame run loop" width="160" /> |
src/video2dsprite-ryo/
base.png # identity still (docs size)
run-6s.mp4 # image_to_video clip (compressed)
run-6s-preview.gif # same motion as GIF for README display
strip-16.png # denser sprite strip
preview-16.gif # sprite loop for README
intro.mp4 # short skill explainer
We intentionally do not commit raw 145-frame dumps or full-resolution working folders.
$generate2dmap only uses $generate2dsprite when the selected map pipeline needs reusable transparent props. Small environmental props can be batched into 2x2, 3x3, or 4x4 prop packs, then extracted into individual transparent props. Simple maps can stay as a single baked image.
When a visual reference is involved, the image skills follow the same wrapper rule: make the image visible in the conversation first. Attached images 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.
How It Works
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.
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
Install
Local processors need Python, Pillow, numpy, and (for $video2dsprite) ffmpeg on PATH.
Option 1: Windows PowerShell
Clone the repo, install dependencies, then copy skills into the agent skills directory you use:
Start a new Codex or Grok Build session after installation so skills reload.
Note:$generate2dsprite and $generate2dmap work wherever built-in image generation is available. $video2dsprite full pipeline only works in Grok Build (image_to_video). The Python postprocessor can still re-sample already-exported frames on any machine with ffmpeg + Pillow.
Python Requirements
The local post-processors depend on:
Pillow
numpy
ffmpeg (CLI on PATH) for $video2dsprite frame extraction
They are listed in requirements.txt (Python only). Image/video generation is provided by the host agent; these packages handle magenta cleanup, frame splitting, alignment, GIF/PNG export, prop-pack slicing, and video-frame sampling.
Use $generate2dsprite to create a 3x3 idle for an ultimate earth titan.
Use $generate2dsprite to create a side-view lightning knight attack animation.
Use $generate2dsprite to create a late-Sengoku player_sheet for a wandering fire swordsman.
Use $generate2dsprite to create a wizard spell bundle with cast, projectile, and impact sprites.
Video → dense sprites (Grok Build only)
Use $video2dsprite with my existing side-view hero PNG as base. Generate a 6s in-place run on #FF00FF, extract frames, chroma key, and export 8/16/24/48 sprite sets + preview GIFs. Do not wire into the game; just report paths.
Use $video2dsprite to create a smooth side-scroller walk cycle from a new magenta-background still, 6 seconds, then sample 24 feet-aligned frames.
Map
Use $generate2dmap to create a small fixed-screen pixel-art battle arena with simple collision.
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.
Use $generate2dmap to create a Godot-editable RPG map with separated props, encounter grass Area2D zones, collision StaticBody2D blockers, exit zones, and a debug player scene.
What You Get
For a typical sprite sheet output:
raw-sheet.png
raw-sheet-clean.png
sheet-transparent.png
Frame PNGs
animation.gif
prompt-used.txt
pipeline-meta.json
For player walk sheets, you also get direction strips and per-direction GIFs.
For a map output, the result depends on the chosen pipeline:
Single baked map: complete map image, optional prompt file, and optional collision metadata.
Layered raster map: base map, dressed reference, prop folders or prop-pack extraction manifest, prop placement metadata, collision/zones metadata, and flattened layered preview.
Godot editable map: tileset/prop assets, scene files, layer metadata, collision/zones, exits, and debug player setup.
Notes
Best results come from prompts that clearly specify view, action, and desired motion style.
Large creatures often work better as 3x3 idle.
Small spells and projectiles often work better as 1x4, 2x2, or 2x3.
Layout guides are useful for fixed-frame action sheets and prop packs, but they are not always better for compact attack sheets.
For commercial projects, prefer original characters or IP that you control.