$npx -y skills add 0x0funky/agent-sprite-forge --skill generate2dspriteGenerate 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
| 1 | # Generate2dsprite |
| 2 | |
| 3 | Use this skill for self-contained 2D sprite or animation assets. |
| 4 | |
| 5 | When a larger game or playable prototype needs sprites, use this skill for the visible sprite assets and keep runtime/game assembly separate. Do not replace requested sprite assets with code-drawn placeholders. |
| 6 | |
| 7 | ## Parameters |
| 8 | |
| 9 | Infer these from the user request: |
| 10 | |
| 11 | - `asset_type`: `player` | `npc` | `creature` | `character` | `spell` | `projectile` | `impact` | `prop` | `summon` | `fx` |
| 12 | - `action`: `single` | `idle` | `cast` | `attack` | `shoot` | `jump` | `hurt` | `combat` | `walk` | `run` | `hover` | `charge` | `projectile` | `impact` | `explode` | `death` |
| 13 | - `view`: `topdown` | `side` | `3/4` |
| 14 | - `sheet`: `auto` | `2x2` | `2x3` | `2x4` | `3x3` | `3x4` | `4x4` | `5x5` | `custom_grid` | `strip_1x3` | `strip_1x4` |
| 15 | - `frames`: `auto` or explicit count |
| 16 | - `bundle`: `single_asset` | `unit_bundle` | `spell_bundle` | `combat_bundle` | `line_bundle` | `hero_action_bundle` | `engine_atlas` |
| 17 | - `effect_policy`: `all` | `largest` |
| 18 | - `anchor`: `center` | `bottom` | `feet` |
| 19 | - `scale_strategy`: `fit` | `preserve` |
| 20 | - `scale_profile`: `none` | `create_from_accepted_action` | `reuse_existing` |
| 21 | - `margin`: `tight` | `normal` | `safe` |
| 22 | - `art_style`: pixel_art | clean_hd | pixel_inspired | retro_pixel | map_style | project-native |
| 23 | - `reference`: `none` | `attached_image` | `generated_image` | `local_file` |
| 24 | - `layout_guide`: `none` | `geometry` | `character_anchor` |
| 25 | - `runtime_contract`: `none` | `godot_sprite3d` |
| 26 | - `world_height`: desired in-engine subject height when a runtime contract is requested |
| 27 | - `prompt`: the user's theme or visual direction |
| 28 | - `role`: only when the asset is clearly an NPC role |
| 29 | - `name`: optional output slug |
| 30 | |
| 31 | Read [references/modes.md](references/modes.md) when the request is ambiguous. |
| 32 | |
| 33 | ## Agent Rules |
| 34 | |
| 35 | - Decide the asset plan yourself. Do not force the user to spell out sheet size, frame count, or bundle structure when the request already implies them. |
| 36 | - Do not pack unrelated actions into one raw generated sheet just to satisfy a `4x4`, `5x5`, or custom engine atlas. A raw generated sheet should represent one action family, one continuous sequence, one canonical directional locomotion sheet, or one prop/asset pack. |
| 37 | - For controllable heroes, main characters, and high-value player assets with multiple actions, generate separate per-action grid sheets first, QC each action, then deterministically assemble the engine-required atlas only after the grids pass visual review. |
| 38 | - For controllable heroes, main characters, and high-value player body actions, default attack/shoot/cast body sheets to body-only. Do not include large slash arcs, muzzle flashes, projectiles, impact bursts, detached dust, long trails, or wide detached FX in the body sheet. Generate those as separate `fx`, `projectile`, or `impact` sheets and layer them in the game. |
| 39 | - Only include wide attack FX in the same raw body sheet when the target runtime explicitly supports wider per-action cells plus per-action origin/anchor metadata. Otherwise, a wide FX bbox will force the body to shrink inside the fixed cell. |
| 40 | - When a grounded hero/player attack must keep an integrated weapon in the body sheet and there is no runtime FX layer, process it with `scale_strategy=preserve` and `align=feet` by default. This preserves raw-cell scale, translates frames to a shared feet line, and avoids bbox-fit shrinking from long swords, spears, weapon trails, capes, or wide melee poses. |
| 41 | - Write the art prompt yourself. Do not default to the prompt-builder script. |
| 42 | - Use built-in `image_gen` for every raw image. |
| 43 | - Do not create raw sprite art with Three.js, Canvas, SVG, HTML/CSS drawing, PIL shape drawing, procedural geometry, placeholder primitives, or code-rendered screenshots. Runtime code may display finished generated assets, and scripts may make layout guides or postprocess generated images, but requested sprite art must originate from built-in `image_gen`. |
| 44 | - When the user provides or implies a visual reference, use built-in image edit/reference semantics only after the reference image is visible in the conversation context. If the reference is a local file, call `view_image` first; do not rely on a filesystem path in the prompt as the visual reference. |
| 45 | - Do not force pixel art when the asset is a map prop for `$generate2dmap` or when the user/project requests a different style. Match the map or reference style first. |
| 46 | - Use the script only as a deterministic pro |