Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate and postprocess general 2D game assets and animation sheets: pixel-art sprites, clean HD map props, creatures, characters, NPCs, spells, projectiles, impacts, props, summons, and transparent GIF exports. Use when Codex should infer the asset plan from a natural-language request, match a reference or map art style, call built-in `image_gen` for solid-magenta raw sheets, and use the local processor only for chroma-key cleanup, frame extraction, alignment, QC, and transparent exports.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 80% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 71% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -27% | 0% |
Use this skill for self-contained 2D sprite or animation assets.
If the user wants a whole playable content pack, map, story, slideshow, or pack assembly, use generate2dgamepack.
Infer these from the user request:
asset_type: player | npc | creature | character | spell | projectile | impact | prop | summon | fxaction: single | idle | cast | attack | hurt | combat | walk | run | hover | charge | projectile | impact | explode | deathview: topdown | side | 3/4sheet: auto | 1x4 | 2x2 | 2x3 | 3x3 | 4x4frames: auto or explicit countbundle: single_asset | unit_bundle | spell_bundle | combat_bundle | line_bundleeffect_policy: all | largestanchor: center | bottom | feetmargin: tight | normal | safeart_style: pixel_art | clean_hd | pixel_inspired | retro_pixel | map_style | project-nativereference: none | attached_image | generated_image | local_fileprompt: the user's theme or visual directionrole: only when the asset is clearly an NPC rolename: optional output slugRead references/modes.md when the request is ambiguous.
image_gen for every raw image.view_image first; do not rely on a filesystem path in the prompt as the visual reference.$generate2dmap or when the user/project requests a different style. Match the map or reference style first.#FF00FF background rule unless the user explicitly wants a different processing workflow.Pick the smallest useful output.
Examples:
player + player_sheetnpc + single_asset or unit_bundlecreature + idle + 3x3spell_bundleline_bundleUse references/prompt-rules.md.
Choose art_style before writing the prompt:
pixel_art or retro_pixel for classic sprites, 16-bit RPG actors, and requests that explicitly ask for pixel art.clean_hd for map props or assets intended to match clean hand-painted HD maps.pixel_inspired only when the user wants a pixel-adjacent look without retro chunkiness.map_style or project-native when an existing map, game, or reference should define the style.If a reference is involved:
view_image; for freshly generated references, rely on the image already shown in context.Keep the strict parts:
#FF00FF backgroundUse built-in image_gen.
After generation:
$CODEX_HOME/generated_images/...Run scripts/generate2dsprite.py process on the raw image.
The processor is intentionally low-level. The agent chooses:
rows / colsfit_scalealignshared_scalecomponent_modecomponent_paddingedge_touch rejection strategyUse the processor to gather QC metadata, not to make aesthetic decisions for you.
Check:
If not, rerun with different processor settings or regenerate the raw sheet.
For a single sheet, expect:
raw-sheet.pngraw-sheet-clean.pngsheet-transparent.pnganimation.gifprompt-used.txtpipeline-meta.jsonFor player_sheet, expect:
For spell_bundle or unit_bundle, create one folder per asset in the bundle.
idle2x23x3cast -> prefer 2x3projectile -> prefer 1x4impact / explode -> prefer 2x2walk4x4 for four-direction walk2x2shared_scale by default for any multi-frame asset where frame-to-frame consistency matterslargest component mode when detached sparkles or edge debris make the main body unstablereferences/modes.md: asset, action, bundle, and sheet selectionreferences/prompt-rules.md: manual prompt patterns and containment rulesscripts/generate2dsprite.py: postprocess primitive for cleanup, extraction, alignment, QC, and GIF exportOther measured skills in the registry, with their headline benchmark lift.