by WU-HAOTIAN34
Agent skill for converting 2D character into style-consistent transparent animation sequences and spritesheets for game engines | 用于将静态 2D 角色/物体图片,通过 agent 转化为一致的透明背景游戏动画序列帧。
# Add to your Claude Code skills
git clone https://github.com/WU-HAOTIAN34/2dimg2motion2dimg2motion is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by WU-HAOTIAN34. Agent skill for converting 2D character into style-consistent transparent animation sequences and spritesheets for game engines | 用于将静态 2D 角色/物体图片,通过 agent 转化为一致的透明背景游戏动画序列帧。. It has 52 GitHub stars.
2dimg2motion's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/WU-HAOTIAN34/2dimg2motion" and add it to your Claude Code skills directory (see the Installation section above). 2dimg2motion ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
2dimg2motion is primarily written in Python. It is open-source under WU-HAOTIAN34 on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh 2dimg2motion against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Convert one baseline character, creature, vehicle, weapon, or prop image into a style-consistent transparent game-animation sequence. Motion artwork must be generated by the model: by default, use built-in image_gen to directly generate whole-character key poses and in-between frames.
Core principle: first analyze the baseline frame's subject, body parts, weapons, and art style; establish an identity lock; write detailed prompts for keyframes 02/05/08/11; then use image_gen to generate shared key poses and in-betweens. Do not use scripts, Pillow, canvas, SVG, or affine transforms to draw or synthesize motion artwork.
Before generating animation assets, read references/keypose-redraw.md. When designing action timing or prompt wording, also consult references/motion-prompt-patterns.md, which distills reusable patterns from the local motion/ reference library.
If project knowledge exists in img2mo-knowledge/, read img2mo-knowledge/index.md before prompt writing. Then read only the relevant knowledge files for the requested action or style: action-patterns.md, style-patterns.md, prompt-patterns.md, failures.md, or matching records in learnings.jsonl. Project knowledge is guidance, not ground truth: never let it override the current baseline identity, current user request, or hard failure constraints.
Collect or infer:
Ask only for information that materially changes the result. Default to 14 transparent RGBA frames per action with a seamless return to the source pose.
image_gen. Unless the user explicitly requests a CLI/API path, do not switch to script-based image generation or custom SDK calls.image_gen from prompts and visual references.image_gen output has the wrong cell count, wrong background, or identity inconsistency, rewrite the prompt and call image_gen again. Do not "fix" it into a new pose with scripts; scripts may only clean backgrounds and organize generated images.If any of the following appears, treat the batch as failed. Re-prompt and call image_gen again; do not hide the problem with post-processing:
screen-left hand to the screen-right hand, or the reverse, reject the batch. Prompts must explicitly state: "the weapon always remains in the same screen-space hand; the other hand remains empty/anchoring/counterbalancing and must not hold the weapon."#ff00ff; for pink/purple/magenta subjects, avoid #ff00ff and prefer #00ffff or another pure color absent from the subject. If matting removes body, weapon, eyes, armor, horns, or outlines, change the key color and regenerate the source image.01-06 and 07-12, or regenerate with larger spacing.scripts/standardize_baseline.py. Do not start image generation from a huge or edge-hugging source; it causes crowded source sheets, clipped cells, forced local resizing, scale popping, and long runtimes.*-imagegen-* intermediates in the final output unless the user explicitly requests process drafts.OK, inspect contact-sheet.png and preview.gif. If there is hand swapping, slicing, missing colors, fragments, scale popping, or unreadable motion, do not claim completion.Before designing poses, establish limb identity:
screen-left or screen-right. If anatomy matters, record both forms, such as character-left (screen-right).activeLimb, its activeShoulder, the opposite anchorLimb, and any distinctive markings or spikes that identify both sides.activeWeapon, weaponHand, emptyHand, and screen-space side. Do not write only "right hand swings sword" or "left hand swings sword"; write locks such as screen-right sword hand remains the sword hand in every frame; screen-left hand remains empty/counterbalance.active=screen-left; anchor=screen-right.coordinateSpace, activeLimb, activeShoulder, and anchorLimb in manifest.json. Do not mix anatomical and screen-space naming inside one animation.Before prompt writing, classify non-body elements and non-human motion drivers:
activeWeapon, carriedProp, passiveAccessory, and detachedProp separately. A held torch, shield, embedded arrow, helmet crest, and thrown weapon need different rules.weaponHand, propHand, mouth, tail, harness, or body socket. It must not switch sides, duplicate, float, or detach unless a release beat explicitly says so.activeFeature and anchorSurface instead of forcing activeLimb: horn, jaw, tail, branch, shell, belly mass, root feet, bottom puddle, or whole-body charge.Use six immutable anchors in this order: 00 -> 02 -> 05 -> 08 -> 11 -> 13.
| Index | Role | Rule |
|---|---|---|
| 00 | baseline start | Place the exact source image on the final canvas; do not redraw or rescale it. |
| 01 | in-between | Interpolate 00 -> 02. |
| 02 | keyframe 1 | First generated defining pose. |
| 03-04 | in-betweens | Interpolate 02 -> 05 in chronological order. |
| 05 | keyframe 2 | Second generated defining pose. |
| 06-07 | in-betweens | Interpolate 05 -> 08 in chronological order. |
| 08 | keyframe 3 | Third generated defining pose. |
| 09-10 | in-betweens | Interpolate 08 -> 11 in chronological order. |
| 11 | keyframe 4 | Fourth generated defining pose. |
| 12 | in-between | Interpolate 11 -> 13. |
| 13 | baseline end | Exact copy of frame 00. |
Generate exactly four keyframes at indices 02, 05, 08, and 11. Save exact copies of those images into both keyframe/ and the matching positions in fullframe/. Never redraw keyframes during the in-between stage. Insert 1 frame near each baseline endpoint and 2 frames between each pair of generated keyframes.
Persist frameCount: 14, keyframeIndices: [2, 5, 8, 11], anchorIndices: [0, 2, 5, 8, 11, 13], and segmentInsertions: [1, 2, 2, 2, 1] in manifest.json.
Persist previewBackground: "#FFFFFF" in manifest.json.
The local motion/ library shows these practical timing patterns:
guard -> anticipation -> acceleration -> contact -> contact hold/follow-through -> recovery. The contact pose should be the clearest silhouette. Attacks commonly widen to about 1.5x-1.6x the neutral width while keeping character scale stable.5% width/height variation.In every pose-sheet prompt, include the stable canvas rules:
Same apparent character size in every cell.
Same foot/bottom baseline in every cell.
Body center stays near the same cell center except for intentional lunges.
Complete character, weapons, horns, ears, tails, claws, and effects remain inside the cell.
Allow the silhouette to widen for attacks, but do not scale the character smaller or larger.
For local post-processing, use one shared scale and one fixed foot/bottom baseline. Never auto-fit each frame independently. If a generated pose needs more horizontal or vertical room, enlarge the output canvas instead of shrinking the character.
Use these beat templates when the user gives only a broad action request:
| Action | Key pose 02 | Key pose 05 | Key pose 08 | Key pose 11 |
|---|---|---|---|---|
| Compact melee slash | crouch/wind up; weapon draws up/back on locked side | fastest slash/chop; clear contact silhouette | low/front follow-through; body overcommitted | weapon returns to ready guard |
| Horn/body bash | body compresses; head/horn pulls back; side limbs brace | forward/down lunge; horn/shell/face leads | lowest compressed impact hold | body rises and re-centers |
| Claw swipe | active claw pulls back; anchor claw visible | active claw maximum extension | torso twist and follow-through | active claw returns to guard |
| Ground smash | body rises or fists/weapon lift overhead | hard drop to ground line | lowest squash; widest impact silhouette | heavy rebound upward |
| Idle | settle | rise | settle | neutral loop return |
| Move/walk | contact | down | passing/up | opposite contact |
| Block | begin guard raise | guard silhouette readable | hold guard | return to neutral |
| Hit/suffer | impact | recoil | squash/stretch | recovery |
| Death | imbalance | fall | impact | rest |
| Born/spawn | seed/egg/portal/curled shape | unfolding | nearly full form | neutral identity |
| Skill/cast | anticipation | charge | peak cast/hold | recovery |
For the /img2mo-std baseline standardization sub-skill and command reference, read skills/img2mo-std/SKILL.md.
When the user invokes /img2mo-std 图片名/位置, resolve the image path, run the standardization step, and use the standardized output as the baseline for later animation generation.
Before baseline analysis or any image_gen call, check whether the input frame is a usable animation baseline:
300-400 px;Use the bundled script when the image is too large, too tight, or has a white background:
python scripts\standardize_baseline.py sample\s7.png
Default output is sample/<name>-standard.png. Use that standardized file as the animation baseline unless the user explicitly wants to keep the original. The script trims transparent/near-white background, resizes the visible subject so its longest side is 360 px by default, preserves aspect ratio, and adds transparent margins on all sides.
Useful options:
python scripts\standardize_baseline.py sample\s7.png --subject-max 380 --margin-ratio 0.8
python scripts\standardize_baseline.py sample\s7.png --output sample\s7-standard.png
python scripts\standardize_baseline.py sample\s7.png --check-only
Treat the standardized baseline as the 00/13 source for validation. Keep the original file unchanged unless the user explicitly asks to overwrite it.
Before baseline analysis and prompt writing, check whether img2mo-knowledge/index.md exists.
If it exists:
img2mo-knowledge/index.md;img2mo-knowledge/action-patterns.md if present;img2mo-knowledge/style-patterns.md if present;img2mo-knowledge/prompt-patterns.md if present;img2mo-knowledge/failures.md if present;img2mo-knowledge/learnings.jsonl only for matching action types, character styles, or source tags when detailed examples are useful.Use learned knowledge to improve beat choices, prompt clauses, canvas margins, style wording, and rejection checks. Do not copy old prompts blindly and do not reuse old generated output unless the user explicitly asks.
Inspect the source image at original resolution. Before generating images, write a reusable baseline-frame analysis that records every invariant that must survive redraw:
Record uncertain or occluded regions explicitly. Use this analysis as the fixed identity block for all later keyframe prompts. Keep the source image visible during every generation and correction pass.
Before generating images, choose readable motion beats:
Choose exactly four generated key poses for indices 02, 05, 08, and 11. For attacks, use anticipation, acceleration/contact, contact hold/follow-through, and recovery. Frames 00 and 13 provide the neutral guard or baseline pose. The contact pose should have the clearest silhouette.
For one-limb actions, describe both sides in every beat: how the active limb remains connected to the locked shoulder, and how the anchor limb stays fixed. Track the full shoulder-to-hand trajectory, not only the hand tip.
Before calling built-in image_gen, write detailed prompt briefs for keyframes 02, 05, 08, and 11. Each prompt must derive from the same baseline-frame analysis and must not reinterpret the character identity on the fly.
Prompts are not the only input. The four keyframe prompts are pose specifications, not the identity source. Do not let the model redraw keyframes independently from text alone; generation must also reference the baseline image as the visual identity anchor. If the current UI or tool cannot pass the baseline image as a reference input to image_gen, the prompt must request a reference identity cell in the output pose sheet: the first cell reproduces the baseline appearance for identity comparison only, and the next four cells are 02/05/08/11. Discard the reference cell during splitting; it is not an animation frame.
Each keyframe prompt must include:
If a prompt cannot clearly explain how a body part, weapon, side marker, or art-style constraint inherits from the baseline frame, do not generate images yet; return to the baseline analysis and fill the gap. The prompt stage designs keyframes only, not in-betweens.
Required sub-skill: use built-in image_gen for whole-character key-pose redraw.
Use the four keyframe prompts from step 3 plus the baseline visual reference to generate all key poses at once in one evenly divided pose sheet. Redraw the complete character in every cell. Natural squash/stretch, perspective, foreshortening, overlap, and newly visible surfaces are allowed while preserving the identity lock.
Do not generate 02, 05, 08, and 11 in four independent calls. Independent calls make the model resample the character every time, commonly causing small drift in the face, eyes, weapon length, armor patterns, outline weight, body proportions, or colors. Unless the user explicitly requests only a single concept draft, key poses must be generated in one shared sheet with the same baseline image, identity block, chroma key, canvas, and gutter constraints.
The pose-sheet prompt must explicitly include identity-alignment rules:
use the provided baseline image as the visual identity source, not as loose inspiration;preserve the exact silhouette language, color palette, outline weight, facial features, markings, weapon size, and body-part count from the baseline;only change pose, weight, limb angles, squash/stretch, and motion timing;do not redesign, simplify, beautify, add details, remove details, change proportions, or reinterpret the character.Generating the key-pose sheet must call image_gen. Do not use scripts to rotate limbs, move local cutouts, or procedurally deform the baseline into fake key poses.
The key-pose sheet must have enough gutters. The prompt must require: exactly 4 separate full-body sprites, centered in equal slots, large flat chroma-key gutters, no overlap, no neighboring fragments. If any key pose swaps weapon hands, makes the anchor hand hold the weapon, crops the subject, or contaminates neighboring cells, regenerate the whole key-pose sheet.
After approval, split the pose sheet into four transparent files named with their final indices: _02, _05, _08, and _11. These files become immutable anchors for in-betweens.
Before approval, perform a baseline-difference review: compare the four key poses side by side with the baseline frame. Confirm that subject identity, head/face/eyes, signature silhouette, clothing/armor/shell markings, weapon or prop, outline weight, main colors, and highlight colors have not drifted. Pose-driven overlap, perspective, and stretching may change; identity features, body-part count, weapon ownership, art style, and proportion language may not. If the sheet looks like "same series, new variant" rather than "same character in a new pose," the whole sheet fails and must be regenerated.
Use a perfectly flat chroma-key background, generous gutters, and no labels, borders, shadows, effects, debris, or fused cells. Prefer #ff00ff when the subject contains green or blue.
Reject the pose sheet if any pose changes identity, loses details, duplicates limbs, reverses hand order, crops the subject, breaks the stable foot baseline, obscures active-shoulder attachment, or moves/hides the anchor limb. A limb crossing the torso must still be traceable to its locked shoulder.
Required sub-skill: use built-in image_gen while referencing both the original baseline image and the approved key-pose sheet.
Generate in-betweens together in chronological order. Specify the exact beat for each cell, identical cell geometry, stable character scale, coherent limb trajectories, and intended contact hold.
Generate five anchor-to-anchor segments with fixed insertion counts: 00->02 gets 1 inserted frame; 02->05, 05->08, and 08->11 each get 2 inserted frames; 11->13 gets 1 inserted frame. Use the two adjacent anchors, the baseline image, and the full key-pose set as references. Do not include generated substitutes for any anchor index.
Repeat side locks verbatim in in-between prompts: name the active limb in screen space, require it to connect to the same shoulder in every cell, and state that the anchor limb must remain visible and stable. Even if a single frame looks plausible, shoulder-connection switching or ambiguity is a generation failure.
When a single 14-frame strip is likely to be crowded, contaminated, inconsistent in scale, or hard to split, do not force it. Prefer two short four-cell source sheets: 01/03/04/06 and 07/09/10/12. Frames 00 and 13 still use the exact baseline image, and 02/05/08/11 still come from the approved key-pose sheet. All source batches must share the same identity lock, side/topology lock, same chroma key, same apparent character size, same foot/bottom baseline, and same canvas/gutter constraints.
In-betweens must be generated by image_gen. Never generate each frame independently. Do not accept an in-between batch that is inconsistent with the approved key poses in style or identity. Do not replace model-generated in-betweens with procedural interpolation, image warping, or copied keyframes.
Remove the flat chroma-key background locally and inspect soft-edge alpha and chroma residue. Split cells in reading order. Local processing may only clean and organize images already generated by image_gen; it may not add or change character poses.
Before key removal, confirm the key color is absent from subject colors, weapon colors, highlights, and outlines. After matting, inspect subject coverage: body main colors, weapon, eyes, armor, horns, teeth, and black outlines should remain. If subject colors are hollowed out, outlines break, or a weapon disappears, stop post-processing and regenerate with a non-conflicting key color.
Place every frame on the same RGBA canvas with one shared scale and alignment transform. Do not auto-fit frame by frame. Maintain stable foot/bottom baseline and facing. Place the exact source image into frame 00 by translation only, then byte-copy frame 00 as frame 13.
If splitting cells creates neighboring-cell fragments, only remove small disconnected alpha components separated from the subject. Do not use brushes, paintovers, rotation, stretching, or copied limbs to repair the subject. If fragments are connected to the subject, the subject is cut, or the weapon is cropped, regenerate the source image.
Keep all PNG frames transparent. When building preview.gif, composite every RGBA frame over a pure white #FFFFFF background. Do not use transparent, checkerboard, gray, or dark preview backgrounds.
Use the repository helper to build or rebuild GIF previews from delivered full frames:
python scripts\fullframes_to_gif.py output\<action-id>\fullframe --output output\<action-id>\preview.gif --duration-ms 75
Adjust --duration-ms when the user asks for a slower or faster preview. The GIF is a playback preview only; the transparent deliverables remain fullframe/*.png and spritesheet.png.
Name full frames contiguously, for example hero-attack_00.png through hero-attack_13.png. Keyframes use the same prefix and preserve indices: _02, _05, _08, and _11.
Compare adjacent frames. Correct only failing regions or failing poses. If a key pose changes, regenerate all affected in-betweens.
Inspect face, emblems, palette, silhouette, accessories, limb count, markings, weapon size, proportions, center, baseline, trajectory, and silhouette continuity.
If the active limb switches shoulders, becomes ambiguous behind the torso, or inherits the anchor limb's markings, reject the affected pose. Regenerate the key pose and all dependent in-betweens. Do not fix limb switching by mirroring a single frame, renaming sides, or tracking only hand-tip motion while ignoring shoulder origin.
Run deterministic validation for the 14-frame relationship:
python scripts/validate_14frame_pattern.py --baseline source.png --keyframes-dir output/keyframe --fullframes-dir output/fullframe --preview output/preview.gif --prefix hero-attack
Inspect the contact sheet and playback loop. Confirm:
preview.gif contains exactly 14 frames and uses a pure white #FFFFFF background;Correct failures and repeat both visual inspection and deterministic validation. Always inspect contact-sheet.png first, then preview.gif, then report exact output paths and evidence.
When the user approves a final animation or finishes requested revisions, offer or perform a short retrospective. For durable lessons, invoke the project sub-skill img2mo-learn or follow its storage contract:
output/<action-id>/retro.md when useful;img2mo-knowledge/learnings.jsonl;img2mo-knowledge/action-patterns.md, style-patterns.md, prompt-patterns.md, or failures.md.Do not write normal learning records into the installed Codex skill directory. Keep project-specific knowledge in img2mo-knowledge/.
output/
|-- keyframe-prompts.md # prompts for 02, 05, 08, 11 derived from baseline analysis
|-- keyframe/ # exact generated anchors at 02, 05, 08, 11
|-- fullframe/ # contiguous transparent RGBA sequence 00-13
|-- spritesheet.png # packed sequence
|-- contact-sheet.png # visual consistency review
|-- preview.gif # 14-frame playback loop on solid white #FFFFFF
`-- manifest.json # source, canvas, side/topology lock, key indices, segment plan, frame order
The final directory must not contain model source images, alpha sources, failed drafts, temporary splits, *-imagegen-* process images, or debug files. Those may exist only in a temporary directory and must be cleaned before delivery.
| Stage | Gate |
|---|---|
| Baseline analysis | Subject, body parts, weapon, art style, invariants, screen-space side mapping, and limb topology are recorded |
| Keyframe prompts | 02, 05, 08, 11 each have one detailed prompt and all inherit the same identity block |
| Key poses | Exactly four anchors occupy 02, 05, 08, and 11 |
| In-betweens | Fixed 1/2/2/2/1 insertions fill the five anchor segments |
| Normalization | One scale, canvas, facing, and stable foot/bottom baseline |
| Correction | Adjacent frames preserve identity and trajectory continuity |
| Delivery | Deterministic validation, contact sheet, and playback loop pass |
User: "Use this golem image to make a heavy ground-smash attack animation."
Analyze the baseline frame's subject, body parts, weapon, and art style; record the identity lock; write four keyframe prompts for 02/05/08/11; generate the four anchors together; fill frames with the 1/2/2/2/1 insertion plan; place the exact baseline at 00 and 13; inspect contact sheet and playback; validate the 14-frame relationship; deliver the transparent sequence.
image_gen; scripts are only for matting, splitting, packing, and validation.fullframe/; do not redraw them during in-between generation.image_gen for failed key poses or in-between batches.#ff00ff on pink/purple characters can remove body colors or soft edges. Inspect subject colors before choosing the key.OK only proves file structure, not motion, art, or topology. Inspect the contact sheet and GIF.#FFFFFF.
2dimg2motion.skill is a 2D game-animation generation skill for Codex / Claude Code / Agent Skills. It takes one static character, creature, vehicle, weapon, or prop image and generates a style-consistent transparent action sequence that can be packed into a spritesheet.
It is not a "single-image motion filter". Filters usually translate, rotate, scale, or warp local image layers; the core of this skill is whole-character key-pose redraw: first lock the character identity, then let the model redraw complete key poses, then generate in-between frames, with local scripts handling transparency, canvas normalization, packing, and validation.
AI can easily draw characters that look like they belong to the same series, but it is much harder to draw continuous motion for the same character. Game animation adds more requirements:
This repository turns those lessons into an executable workflow: analyze the baseline image, establish the identity lock, design action beats, generate a shared key-pose sheet, generate in-betweens, remove the background, normalize frames, pack assets, validate structure, and visually inspect the result.
Put the repository into your Agent Skills directory. Keep the repository structure intact, because the main skill, sub-skills, scripts, references, and project knowledge files refer to each other.
Codex example:
git clone https://github.com/WU-HAOTIAN34/2dimg2motion.git $env:USERPROFILE\.codex\skills\2dimg2motion
Claude Code example:
git clone https://github.com/WU-HAOTIAN34/2dimg2motion.git ~/.claude/skills/2dimg2motion
You can also run it directly from this repository during local development. Confirm the dependency:
python -m pip install pillow
In Codex or Claude Code, provide a baseline image and describe the motion:
/2dimg2motion use sample/s3.png to generate an arm-swing attack animation
Or:
Generate a walk action from this character image.
/2dimg2motion use sample/s7.png to generate a sword-slash action.
/2dimg2motion use sample/s1.png to make a heavy ground-smash attack animation.
The main skill runs the full workflow: analyze the baseline image, establish the identity lock, design key poses at 02/05/08/11, generate in-betweens, remove the background, normalize frames, pack the spritesheet, and output preview.gif and manifest.json.
If the input image is too large, tightly cropped, visibly white-backed, or lacks enough transparent margin for attacks or walking motion, call the standardization sub-skill first:
/img2mo-std s7
/img2mo-std sample\s7.png
It resolves the image path and calls the script to create a standardized baseline image:
python scripts\standardize_baseline.py sample\s7.png
Useful options:
python scripts\standardize_baseline.py sample\s7.png --check-only
python scripts\standardize_baseline.py sample\s7.png --subject-max 360 --margin-ratio 0.75
python scripts\standardize_baseline.py sample\s7.png --output sample\s7-standard.png
Default output:
sample\<input-stem>-standard.png
The standardized image should become the 00 and 13 baseline frame for later animation generation.
If you have reference videos, existing outputs, failed attempts, GIFs, spritesheets, Spine assets, or frame folders, the skill can extract reusable project knowledge from them:
/img2mo-learn output\s3-arm-swing-attack
/img2mo-learn motion\some-reference-folder
/img2mo-learn sample\attack-reference.mp4
Learned notes are written to:
img2mo-knowledge/
|-- index.md
|-- learnings.jsonl
|-- action-patterns.md
|-- style-patterns.md
|-- prompt-patterns.md
`-- failures.md
Future animation generations read this project-level knowledge first, improving action timing, prompt clauses, canvas margins, and failure checks.
Scripts are for non-creative post-processing and validation only. They do not draw motion.
Standardize a baseline image:
python scripts\standardize_baseline.py sample\s7.png
Convert transparent fullframe PNGs into a white-background GIF preview:
python scripts\fullframes_to_gif.py output\s3-arm-swing-attack\fullframe --output output\s3-arm-swing-attack\preview.gif --duration-ms 75
Validate the 14-frame delivery structure:
python scripts\validate_14frame_pattern.py --baseline sample\s3-standard.png --keyframes-dir output\s3-arm-swing-attack\keyframe --fullframes-dir output\s3-arm-swing-attack\fullframe --preview output\s3-arm-swing-attack\preview.gif --prefix s3-arm-swing-attack
On success, it prints:
OK
The input is usually one static PNG:
sample/s3.png
Describe the action you want:
use sample/s3.png to generate an arm-swing attack animation
The output is a standard delivery bundle:
output/<action-id>/
|-- keyframe-prompts.md # prompts and identity lock for 02/05/08/11
|-- keyframe/ # 4 keyframes at fixed indices 02, 05, 08, 11
|-- fullframe/ # 14 transparent RGBA sequence frames, fixed indices 00-13
|-- spritesheet.png # horizontal packed spritesheet
|-- contact-sheet.png # visual review sheet
|-- preview.gif # 14-frame white-background playback preview
`-- manifest.json # canvas, frame order, topology lock, keyframe indices, and processing notes
fullframe/*.png contains the transparent frames you should import into your engine. preview.gif is only a human-readable playback preview.
Before generation, record the character invariants: face, eyes, silhouette, proportions, palette, outline, clothing, weapon, horns, tail, wings, claws, markings, and other accessories. Every later prompt inherits this identity lock.
For attacks, waves, sword swings, tail sweeps, and similar actions, the skill records the active limb and anchor limb in screen space, for example:
activeLimb: screen-right arm
anchorLimb: