0x0funky/agent-sprite-forge/video2dsprite
Claude Code and agent skill by 0x0funky/agent-sprite-forge
- community
Checking that the SKILL.md file is still in the repository.
Turn one approved master still into a character's whole animated sprite set - one image-to-video clip per action (idle, walk, run, attack, jump, hurt, cast and so on), all from that still, generated through generate2dmedia route_media.py (the xAI API when a key is configured, else the local Grok CLI) - then gate each take, key it with a soft matte, register it to the master, pick loops or retime actions, finish (HD by default, pixel on request) and package fixed-canvas frames, alpha WebM, packed MP4 for iPhone and a PNG fallback with engine metadata and a JS runtime. Also processes a supplied clip. Use for character and creature animation, fluid motion and any video-to-sprite work. Not for FX, icon or prop sheets (generate2dsprite), maps or plate loops (generate2dmap), code-drawn animation (codeart2d, only on request) or calling a video API by itself (generate2dmedia).
Install
npx vskill@latest install 0x0funky/agent-sprite-forge/video2dspriteSKILL.md
The same SKILL.md was published earlier as 0x0funky/agent-sprite-forge/video2dsprite.
Video to 2D Animation
An approved still sets identity and geometry, a video model supplies motion, and deterministic tools prepare it for the engine. Video is not promised to be smaller, seamless or cheaper than sheets.
Use when
- Animating a character or creature: every action comes from one approved master still, one clip per action.
- Fluid motion from an accepted master: idle breathing, walks, runs, attacks, casts, hair, capes, creatures.
- A supplied clip must become transparent, registered, looped frames and engine video.
Do not use when
- FX, icon or prop sheets: generate2dsprite.
- Water, fire or mist inside a still scene plate: generate2dmap. Only an API or CLI call: generate2dmedia.
- Code-drawn animation the user asked for: codeart2d.
Capability check (once per session)
Run python "<skill-dir>/../generate2dmedia/scripts/forge_doctor.py" --host-tools <tools> --save <output>/doctor.json, where <tools> lists the media tools in your own tool list (image_gen, image_edit, image_to_video) or none. Its ROUTES block shows which API keys are configured (yes or no), the local readiness and the resolved order. If encoding.stdout fails, set PYTHONUTF8=1. python "<skill-dir>/scripts/video2dsprite.py" doctor checks ffmpeg (5.1+, VP9 alpha round trip).
Art source
The master still comes from generate2dsprite (image generation, approved by the user) or from the user. Motion is image-to-video, one clip per action from that master; record the route as art_source and name it in your reply:
- API, when a key is configured: xAI Grok Imagine Video (
XAI_API_KEY), BytePlus Seedance (ARK_API_KEY) or fal.ai (FAL_KEY: Kling v3, Veo 3.1, Luma Ray 3.2, MiniMax H3, Wan 3.0, Vidu Q3, LTX) (route-media.md). The configured key is the owner's consent, so there is no per-call question.--last-frame <still>pins idle and attack clips to end on their first pose. - Local: your own image-to-video tool (Grok's native
image_to_video) when you have one, otherwise the user's Grok CLI in ACP mode (it cannot pin a last frame; the result sayslastFrameUsed). - A clip the user supplies (no account needed).
- codeart2d only when the user explicitly asks for code-drawn animation, or when
route_media.pyprintsno-route(exit 3); otherwise prepare the job and prompt, explain the gap, and never invent a successful generation.
Every clip goes through one command: python "<skill-dir>/../generate2dmedia/scripts/route_media.py" video --prompt-file <job>/prompt.txt --reference <job>/input.png --last-frame <job>/input.png --duration 6 --resolution 720p --out-dir <new>. It prints one JSON line with route, artifact, sha256, estimateUsd and lastFrameUsed. The finish is HD by default; the pixel finish is an option when the user asks for pixel art.
A whole sprite set from one still
For a character's game set, use sprite_set.py: one approved master (generate2dsprite master.json) in, one image-to-video clip per action out, keyed, gated, registered, cut, finished and packaged. For one clip or a supplied video, use the pipeline below. Details: sprite-set.md. Prompts and fix clauses: motion-prompts.md.
- Plan.
python "<skill-dir>/scripts/sprite_set.py" plan --master <art>/master.json --output-dir <set>. Defaults:--actions idle,walk,run,attack,jump,hurt,--finishfrom the master (hd default; pixel or hibit),--target-height256 hd or 80 pixel and hibit. Jump gets a 3:4 canvas with 34% headroom and attack a 16:9 one; idle and attack pin the end frame to the master. Read each action'spromptin<set>/set_plan.json, and editmotion,negativesorgatesthere before the run if needed. - Run.
python "<skill-dir>/scripts/sprite_set.py" run --plan <set>/set_plan.json. Clips come from generate2dmediaroute_media.py, then:
- soft-matte keying;
- numeric gates: area 0.72-1.32, feet, identity (a warning unless the design is lost), zoom, turning around, edge, background, extra objects, motion, end pose, colour bleed, one-shot timing;
- up to 3 takes, each retake carrying the fix clause for the gate that failed; if every take fails, the best usable window is kept;
- registration, then a loop, or a one-shot retimed to game length from its motion energy (attack 0.7 s with the hit at 40%, jump 0.9 s, hurt 0.5 s, cast 0.9 s; set in the plan's
timing); finish_frames.pyhd, pixel or hibit, with the colour lock to the master on by default for hd and pixel (plan --no-colour-lock; hibit never locks);- png, webm and packed packages, verified.
Run it again to resume; nothing is generated twice.
- No route (exit 3). Make the clip with your own image-to-video tool from the input and prompt that the summary names, save it as the named
media/clip.mp4, and run again. - Review.
python "<skill-dir>/scripts/sprite_set.py" review --plan <set>/set_plan.json, then LOOK at every-sheet.png, every-final.pngand thelineup(Read in Claude Code, view_image in Codex). The numbers cannot see identity, facing, a changed weapon, text or a covered face. - Decide each action.
- Approve:
accept --plan <set>/set_plan.json --action <id> --take <n>. Add--window START:ENDto keep part of a failed take. The verdict goes into the package: an already packaged take is updated in place (engine_export.py review:animation.jsonreviewStatusbecomesaccepted), otherwise the nextrunpackages it with--review.review,acceptandretakemay run while arunworks: every verb reads and writesset_state.jsonunderset_state.lock(so doesforge_index.py scan) and the run keeps their decisions. - Reject:
retake --plan <set>/set_plan.json --action <id> --fix <clause id or text>, thenrunagain. Clause ids include never-turn, weapon-shape, face-visible, no-text, no-flares and keep-colours.
- Report.
python "<skill-dir>/scripts/sprite_set.py" report --plan <set>/set_plan.jsonlists the routes, takes, QC numbers, loops, timing and package paths. In your reply, name the route that made each clip. Never call an action approved before you have looked at its sheet.
Host notes
- Codex: no native image-to-video tool;
route_media.pytakes the xAI API or the Grok CLI. Look at review images withview_image. - Claude Code: no media tools;
route_media.pytakes the route. Look at review PNGs and contact sheets with Read; run tools with Bash;<skill-dir>is${CLAUDE_SKILL_DIR}. - Grok: its native
image_to_videotool is your own tool; the samegrokexecutable is the "Grok (local CLI)" route for other hosts.
Commands
Run each tool as one line from the user's project root: python "<skill-dir>/scripts/<tool>.py" .... <skill-dir> is this skill's folder; sibling skills sit beside it. Keep inputs and outputs inside the project. Every verb writes a new --output-dir: it refuses an existing one and publishes only after its checks (--strict fails on residue). Success prints one JSON line; errors print error: ... and exit 1 (nothing usable is published); usage errors exit 2; a result published for inspection with QA status fail exits 4 (sprite_set.py run: some actions packaged, others failed). sprite_set.py run, finish_frames.py hd, pixel and hibit, and engine_export.py package and verify take --progress-file <jsonl> (or FORGE_PROGRESS_FILE): one JSON line per stage for a host, never on stdout. Needs Python 3.10+, numpy, Pillow and ffmpeg 5.1+. --help lists every flag.
Pipeline (one clip)
- Key plan.
video2dsprite.py key-plan --master <master.png>: pastebackground_sentenceinto the prompt; protect or recolourdesign_colours_at_risk. - Prepare.
prepare_i2v_input.py prepare --master <art> --action <idle|walk|run|attack|cast|guard|hurt|victory|defeat|ambient|fx> --output-dir <job>; sendinput.pngandprompt.txt;registration_job.jsonkeeps the transform. An opaque master on a flat magenta, green or blue backdrop is keyed first (--master-keynames another backdrop; the job recordsmasterKeying).--subjectis the whole identity phrase; the background line names its head ("adventurer with a scarf" gives "behind the adventurer"). Check a hand-written prompt withprepare_i2v_input.py lint. - Generate with
route_media.py video(Art source above). - Accept the take.
register_clip.py qc --job <job>/registration_job.json --video <take>; thenvideo2dsprite.py triage --video <take> --output-dir <new>. A border touch inside the action means regenerate, never pad. - Key.
video2dsprite.py process --video <take> --output-dir <new> --reference <master.png>(soft matte); readframes-clean/matte-report.jsonand look at frames over light and dark. Same keying for every clip of a character:--matte-profile <character-profile.json>. A design colour near the key:--protect-color #rrggbb. Already decoded frames (frame_*.pngorraw_*.png, one frame keys a still):video2dsprite.py clean --raw-dir <dir> --output-dir <new>. - Register.
register_clip.py apply --job <job>/registration_job.json --frames <out>/frames-clean --output-dir <new>; feet drift or jumps:--lock feet; spell or hit FX:--profile fx; one scale per character:register_clip.py profile, then--character-profile. - Loop or retime. Walks, runs, idles:
gait_loop.py select --frames-dir <reg>/frames --fps N --output-dir <new>(--kind idleorhover); playaids/loop3x.gif. Attacks, casts, FX:retime.py --frames-dir <reg>/frames --fps N --output-dir <new> --spans <spans>(impact, hold, ticks), or for a slow-motion one-shot--range 0:N --auto-oneshot --duration 700 --key hit=<impact>@0.4+80(cuts frozen holds, pins the hit, compresses to game length); walk cadence:gait_loop.py measure-stride. - Finish and package. Finish the registered frames (Finish, below), then
engine_export.py package --clean-dir <fin>/frames --output-dir <new> --selection <selection.json> --source-size W,H --source-anchor X,Y --formats png,webm,packed --tiers actor(W,H and X,Y fromfinish.json). Refused for key residue: re-key;--allow-key-residueonly with a recorded override. - Verify.
engine_export.py verify --package <dir>, thenvalidate_animation.py <character dir> --require-states idle,walk --require-verify.--require-statesmatches each package's--name(a package namedhero-runneeds--require-states hero-run, notrun).
Details: pipeline.md, keying matte.md, review and cuts animation-review.md, prompts prompt-rules.md.
Finish (HD default, pixel option)
Finish every registered action before packaging. Finished frames keep the source names, so gait_loop and retime selections still apply. Details: finishing.md.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/video2dsprite/SKILL.md
Popularity
- Repository stars
- 3,717
- Repository forks
- 361
- 7-day trend score
- 41
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/0x0funky/agent-sprite-forge/video2dsprite)