{"id":"a53cc9ed-95e3-44de-b1f0-13ee09086b10","shortId":"kyWpzq","kind":"skill","title":"generate2dsprite","tagline":"Generate and postprocess general 2D pixel-art assets and animation sheets: 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, call built-in `image_gen`","description":"# Generate2dsprite\n\nUse this skill for self-contained 2D sprite or animation assets.\n\nIf the user wants a whole playable content pack, map, story, slideshow, or pack assembly, use `generate2dgamepack`.\n\n## Parameters\n\nInfer these from the user request:\n\n- `asset_type`: `player` | `npc` | `creature` | `character` | `spell` | `projectile` | `impact` | `prop` | `summon` | `fx`\n- `action`: `single` | `idle` | `cast` | `attack` | `hurt` | `combat` | `walk` | `run` | `hover` | `charge` | `projectile` | `impact` | `explode` | `death`\n- `view`: `topdown` | `side` | `3/4`\n- `sheet`: `auto` | `1x4` | `2x2` | `2x3` | `3x3` | `4x4`\n- `frames`: `auto` or explicit count\n- `bundle`: `single_asset` | `unit_bundle` | `spell_bundle` | `combat_bundle` | `line_bundle`\n- `effect_policy`: `all` | `largest`\n- `anchor`: `center` | `bottom` | `feet`\n- `margin`: `tight` | `normal` | `safe`\n- `prompt`: the user's theme or visual direction\n- `role`: only when the asset is clearly an NPC role\n- `name`: optional output slug\n\nRead [references/modes.md](references/modes.md) when the request is ambiguous.\n\n## Agent Rules\n\n- 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.\n- Write the art prompt yourself. Do not default to the prompt-builder script.\n- Use built-in `image_gen` for every raw image.\n- Use the script only as a deterministic processor: magenta cleanup, frame splitting, component filtering, scaling, alignment, QC metadata, transparent sheet export, and GIF export.\n- Treat script flags as execution primitives chosen by the agent, not user-facing hardcoded workflow.\n- If a generated sheet touches cell edges, drifts in scale, or breaks a projectile / impact loop, either reprocess with better primitive settings or regenerate the raw sheet.\n- Keep the solid `#FF00FF` background rule unless the user explicitly wants a different processing workflow.\n\n## Workflow\n\n### 1. Infer the asset plan\n\nPick the smallest useful output.\n\nExamples:\n\n- controllable hero with four directions -> `player` + `player_sheet`\n- healer overworld NPC -> `npc` + `single_asset` or `unit_bundle`\n- large boss idle loop -> `creature` + `idle` + `3x3`\n- wizard throwing a magic orb -> `spell_bundle`\n  - caster cast sheet\n  - projectile loop\n  - impact burst\n- monster line request -> `line_bundle`\n  - plan 1-3 forms\n  - per form, make the sheets the request actually needs\n\n### 2. Write the prompt manually\n\nUse [references/prompt-rules.md](references/prompt-rules.md).\n\nKeep the strict parts:\n\n- solid `#FF00FF` background\n- exact sheet shape\n- same character or asset identity across frames\n- same bounding box and pixel scale across frames\n- explicit containment: nothing may cross cell edges\n\n### 3. Generate the raw image\n\nUse built-in `image_gen`.\n\nAfter generation:\n\n- find the raw PNG under `$CODEX_HOME/generated_images/...`\n- copy or reference it from the working output folder\n- keep the original generated image in place\n\n### 4. Postprocess locally\n\nRun `scripts/generate2dsprite.py process` on the raw image.\n\nThe processor is intentionally low-level. The agent chooses:\n\n- `rows` / `cols`\n- `fit_scale`\n- `align`\n- `shared_scale`\n- `component_mode`\n- `component_padding`\n- `edge_touch` rejection strategy\n\nUse the processor to gather QC metadata, not to make aesthetic decisions for you.\n\n### 5. QC the result\n\nCheck:\n\n- did any frame touch the cell edge\n- did any frame resize differently than intended\n- did detached effects become noise\n- does the sheet still read as one coherent animation\n\nIf not, rerun with different processor settings or regenerate the raw sheet.\n\n### 6. Return the right bundle\n\nFor a single sheet, expect:\n\n- `raw-sheet.png`\n- `raw-sheet-clean.png`\n- `sheet-transparent.png`\n- frame PNGs\n- `animation.gif`\n- `prompt-used.txt`\n- `pipeline-meta.json`\n\nFor `player_sheet`, expect:\n\n- transparent 4x4 sheet\n- 16 frame PNGs\n- direction strips\n- 4 direction GIFs\n\nFor `spell_bundle` or `unit_bundle`, create one folder per asset in the bundle.\n\n## Defaults\n\n- `idle`\n  - small or medium actor -> `2x2`\n  - large creature or boss -> `3x3`\n- `cast` -> prefer `2x3`\n- `projectile` -> prefer `1x4`\n- `impact` / `explode` -> prefer `2x2`\n- `walk`\n  - topdown actor -> `4x4` for four-direction walk\n  - side-view asset -> `2x2`\n- use `shared_scale` by default for any multi-frame asset where frame-to-frame consistency matters\n- use `largest` component mode when detached sparkles or edge debris make the main body unstable\n\n## Resources\n\n- `references/modes.md`: asset, action, bundle, and sheet selection\n- `references/prompt-rules.md`: manual prompt patterns and containment rules\n- `scripts/generate2dsprite.py`: postprocess primitive for cleanup, extraction, alignment, QC, and GIF export","tags":["generate2dsprite","agent","sprite","forge","0x0funky","agent-skills","codex","pixel-art","sprite-generator"],"capabilities":["skill","source-0x0funky","skill-generate2dsprite","topic-agent-skills","topic-codex","topic-pixel-art","topic-sprite-generator"],"categories":["agent-sprite-forge"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/0x0funky/agent-sprite-forge/generate2dsprite","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add 0x0funky/agent-sprite-forge","source_repo":"https://github.com/0x0funky/agent-sprite-forge","install_from":"skills.sh"}},"qualityScore":"0.653","qualityRationale":"deterministic score 0.65 from registry signals: · indexed on github topic:agent-skills · 407 github stars · SKILL.md body (4,804 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-25T18:53:30.929Z","embedding":null,"createdAt":"2026-04-24T06:56:14.061Z","updatedAt":"2026-04-25T18:53:30.929Z","lastSeenAt":"2026-04-25T18:53:30.929Z","tsv":"'-3':370 '1':314,369 '16':576 '1x4':116,615 '2':381 '2d':6,54 '2x2':117,604,619,633 '2x3':118,612 '3':421 '3/4':113 '3x3':119,348,609 '4':457,581 '4x4':120,574,623 '5':506 '6':551 'across':404,412 'action':95,670 'actor':603,622 'actual':379 'aesthet':502 'agent':179,264,475 'align':246,481,688 'alreadi':204 'ambigu':178 'anchor':141 'anim':12,57,538 'animation.gif':566 'art':9,209 'assembl':73 'asset':10,32,58,83,128,161,183,317,338,402,594,632,644,669 'attack':99 'auto':115,122 'background':302,395 'becom':528 'better':290 'bodi':665 'boss':343,608 'bottom':143 'bound':407 'box':408 'break':282 'builder':219 'built':42,223,428 'built-in':41,222,427 'bundl':126,130,132,134,136,199,341,355,367,555,586,589,597,671 'burst':362 'call':40 'cast':98,357,610 'caster':356 'cell':276,419,516 'center':142 'charact':15,88,400 'charg':105 'check':510 'choos':476 'chosen':261 'cleanup':240,686 'clear':163 'codex':28,439 'coher':537 'col':478 'combat':101,133 'compon':243,484,486,654 'consist':650 'contain':53,415,680 'content':66 'control':325 'copi':441 'count':125,197 'creat':590 'creatur':14,87,346,606 'cross':418 'death':109 'debri':661 'decid':181 'decis':503 'default':214,598,638 'detach':526,657 'determinist':237 'differ':310,522,543 'direct':156,329,579,582,627 'drift':278 'edg':277,420,488,517,660 'effect':137,527 'either':287 'everi':228 'exact':396 'exampl':324 'execut':259 'expect':560,572 'explicit':124,307,414 'explod':108,617 'export':25,251,254,692 'extract':687 'face':268 'feet':144 'ff00ff':301,394 'filter':244 'find':434 'fit':479 'flag':257 'folder':449,592 'forc':188 'form':371,373 'four':328,626 'four-direct':625 'frame':121,196,241,405,413,513,520,564,577,643,647,649 'frame-to-fram':646 'fx':94 'gather':496 'gen':45,226,431 'general':5 'generat':2,273,422,433,453 'generate2dgamepack':75 'generate2dsprite':1,46 'gif':24,253,583,691 'hardcod':269 'healer':333 'hero':326 'home/generated_images':440 'hover':104 'hurt':100 'ident':403 'idl':97,344,347,599 'imag':44,225,230,425,430,454,466 'impact':19,91,107,285,361,616 'impli':205 'infer':30,77,315 'intend':524 'intent':470 'keep':298,389,450 'languag':38 'larg':342,605 'largest':140,653 'level':473 'line':135,364,366 'local':459 'loop':286,345,360 'low':472 'low-level':471 'magenta':239 'magic':352 'main':664 'make':374,501,662 'manual':385,676 'map':68 'margin':145 'matter':651 'may':417 'medium':602 'metadata':248,498 'mode':485,655 'monster':363 'multi':642 'multi-fram':641 'name':167 'natur':37 'natural-languag':36 'need':380 'nois':529 'normal':147 'noth':416 'npc':86,165,335,336 'npcs':16 'one':536,591 'option':168 'orb':353 'origin':452 'output':169,323,448 'overworld':334 'pack':67,72 'pad':487 'paramet':76 'part':392 'pattern':678 'per':372,593 'pick':319 'pipeline-meta.json':568 'pixel':8,410 'pixel-art':7 'place':456 'plan':33,184,318,368 'playabl':65 'player':85,330,331,570 'png':437 'pngs':565,578 'polici':138 'postprocess':4,458,683 'prefer':611,614,618 'primit':260,291,684 'process':311,462 'processor':238,468,494,544 'projectil':18,90,106,284,359,613 'prompt':149,210,218,384,677 'prompt-build':217 'prompt-used.txt':567 'prop':20,92 'qc':247,497,507,689 'raw':229,296,424,436,465,549 'raw-sheet-clean.png':562 'raw-sheet.png':561 'read':171,534 'refer':443 'references/modes.md':172,173,668 'references/prompt-rules.md':387,388,675 'regener':294,547 'reject':490 'reprocess':288 'request':39,82,176,203,365,378 'rerun':541 'resiz':521 'resourc':667 'result':509 'return':552 'right':554 'role':157,166 'row':477 'rule':180,303,681 'run':103,460 'safe':148 'scale':245,280,411,480,483,636 'script':220,233,256 'scripts/generate2dsprite.py':461,682 'select':674 'self':52 'self-contain':51 'set':292,545 'shape':398 'share':482,635 'sheet':13,114,194,250,274,297,332,358,376,397,532,550,559,571,575,673 'sheet-transparent.png':563 'side':112,630 'side-view':629 'singl':96,127,337,558 'size':195 'skill':49 'skill-generate2dsprite' 'slideshow':70 'slug':170 'small':600 'smallest':321 'solid':300,393 'source-0x0funky' 'sparkl':658 'spell':17,89,131,192,354,585 'split':242 'sprite':55 'still':533 'stori':69 'strategi':491 'strict':391 'strip':580 'structur':200 'summon':21,93 'theme':153 'throw':350 'tight':146 'topdown':111,621 'topic-agent-skills' 'topic-codex' 'topic-pixel-art' 'topic-sprite-generator' 'touch':275,489,514 'transpar':23,249,573 'treat':255 'type':84 'unit':129,340,588 'unless':304 'unstabl':666 'use':26,47,74,221,231,322,386,426,492,634,652 'user':61,81,151,190,267,306 'user-fac':266 'view':110,631 'visual':155 'walk':102,620,628 'want':62,308 'whole':64 'wizard':349 'work':447 'workflow':270,312,313 'write':207,382","prices":[{"id":"6b08e2f5-4602-42cc-ae33-87c0c406eee4","listingId":"a53cc9ed-95e3-44de-b1f0-13ee09086b10","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"0x0funky","category":"agent-sprite-forge","install_from":"skills.sh"},"createdAt":"2026-04-24T06:56:14.061Z"}],"sources":[{"listingId":"a53cc9ed-95e3-44de-b1f0-13ee09086b10","source":"github","sourceId":"0x0funky/agent-sprite-forge/generate2dsprite","sourceUrl":"https://github.com/0x0funky/agent-sprite-forge/tree/main/skills/generate2dsprite","isPrimary":false,"firstSeenAt":"2026-04-24T06:56:14.061Z","lastSeenAt":"2026-04-25T18:53:30.929Z"}],"details":{"listingId":"a53cc9ed-95e3-44de-b1f0-13ee09086b10","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"0x0funky","slug":"generate2dsprite","github":{"repo":"0x0funky/agent-sprite-forge","stars":407,"topics":["agent-skills","codex","pixel-art","sprite-generator"],"license":"mit","html_url":"https://github.com/0x0funky/agent-sprite-forge","pushed_at":"2026-04-25T15:56:29Z","description":"Agent Skill for generating 2D sprite sheets and map, transparent PNG frames, and animated GIFs from prompts.","skill_md_sha":"25154bc25b8c8eea411fe289414c29d10f5f5c05","skill_md_path":"skills/generate2dsprite/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/0x0funky/agent-sprite-forge/tree/main/skills/generate2dsprite"},"layout":"multi","source":"github","category":"agent-sprite-forge","frontmatter":{"name":"generate2dsprite","description":"Generate and postprocess general 2D pixel-art assets and animation sheets: 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, 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."},"skills_sh_url":"https://skills.sh/0x0funky/agent-sprite-forge/generate2dsprite"},"updatedAt":"2026-04-25T18:53:30.929Z"}}