Agent skill

H3 Game Sprites

by gary149 in gary149/h3-game-sprites

Build 2D game sprite sheets by generating motion with MiniMax H3 (Hailuo) video, then cutting the footage into validated chroma-keyed sprite frames - the Mortal Kombat method with a video model…

MITAuto-check passedGame Development

Install H3 Game Sprites

skills CLI
$ npx skills add gary149/h3-game-sprites --skill h3-game-sprites -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install gary149/h3-game-sprites h3-game-sprites --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/gary149/h3-game-sprites.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/h3-game-sprites .claude/skills/h3-game-sprites && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
h3-game-sprites
GitHub stars
136
Token cost
~2.4k tokens
SKILL.md length
1,076 words
Files
4 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Build 2D game sprite sheets by generating motion with MiniMax H3 (Hailuo) video, then cutting the footage into validated chroma-keyed sprite frames - the Mortal Kombat method with a video model…

  • Works in 6 steps: The character still → Clip briefs, one per move → Decompose and validate → …
  • Wants game sprites
  • SKILL.md covers Why a 5-second clip becomes a…, 1. The character still, 2. Clip briefs, one per move and 3. Decompose and validate, plus 4 more sections
  • Runs Python scripts from its folder; calls python3

What it does

H3 Game Sprites is an agent skill from gary149/h3-game-sprites. Build 2D game sprite sheets by generating motion with MiniMax H3 (Hailuo) video, then cutting the footage into validated chroma-keyed sprite frames - the Mortal Kombat method with a video model instead of filmed actors. Covers the character-still recipe, the idle-pin trick that keeps every move on-model and loopable, per-move clip briefs, frame extraction with keying and numeric QC, seamless walk-cycle detection, and the atlas/render math that keeps a character planted and correctly sized in an engine. Use this…

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/build_atlas.py`, `scripts/gen_still.py` and `scripts/sprite_cut.py`). Compatibility notes: Requires ffmpeg, Python 3 with Pillow and numpy, and an OPENROUTERAPIKEY with credit for video and image generation.

It sits in Game Development, covering Sprites and pixel art and AI video generation. It works with MiniMax. The repository describes itself as: Agent Skill: turn AI-generated video into 2D game sprite sheets (the Mortal Kombat method, with MiniMax H3 as the actor). The licence is MIT.

When your agent uses it

  • Wants game sprites
  • An animated 2D game character
  • A fighting/platformer/beat-em-up character
  • Wants to turn AI video into game animation frames

Example prompts

  • “sprite”
  • “/h3-game-sprites”

Requirements

  • Python 3
  • A credential in OPENROUTER_API_KEY
  • Compatibility (from SKILL.md): Requires ffmpeg, Python 3 with Pillow and numpy, and an OPENROUTER_API_KEY with credit for video and image generation.

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. The character still
  2. Clip briefs, one per move
  3. Decompose and validate
  4. Atlas: one global scale
  5. Render
  6. Verify with pixels, in a browser

What it can do on your machine

Read from SKILL.md and the folder at commit d129557. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires ffmpeg, Python 3 with Pillow and numpy, and an OPENROUTER_API_KEY with credit for video and image generation.

    From compatibility in the SKILL.md frontmatter.

Context cost

H3 Game Sprites loads about 2.4k tokens when it runs. Until then it costs about 247 tokens; SKILL.md has 1,076 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~247
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from gary149/h3-game-sprites at commit d129557, republished under its MIT licence (© gary149). 1,076 words, ~2,419 tokens.

Download SKILL.mdSave it as .claude/skills/h3-game-sprites/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
h3-game-sprites
description
Build 2D game sprite sheets by generating motion with MiniMax H3 (Hailuo) video, then cutting the footage into validated chroma-keyed sprite frames - the Mortal Kombat method with a video model instead of filmed actors. Covers the character-still recipe, the idle-pin trick that keeps every move on-model and loopable, per-move clip briefs, frame extraction with keying and numeric QC, seamless walk-cycle detection, and the atlas/render math that keeps a character planted and correctly sized in an engine. Use this whenever the user wants game sprites, a sprite sheet, an animated 2D game character, a fighting/platformer/beat-em-up character, wants to turn AI video into game animation frames, or wants a character animated for a game - even if they never say H3, Hailuo, or "sprite". Also use it for chroma-keying generated video to transparent frames, choosing keyframes from footage, and debugging sprites that jitter, float, sink, or change size between animations.
compatibility
Requires ffmpeg, Python 3 with Pillow and numpy, and an OPENROUTER_API_KEY with credit for video and image generation.
license
MIT

H3 → Game Sprites

Mortal Kombat filmed actors and digitized the footage into sprites. Do the same with H3 as the actor: one 5 s clip per move (~$0.64), cut down to 8–16 pose extremes, keyed to transparency, validated with numbers rather than vibes.

Read the h3-video skill for H3 API mechanics (submitting, polling, frame pinning, the parallel runner). This skill is the sprite layer on top of it.

Why a 5-second clip becomes a quarter-second move

The video is source footage, not gameplay. 5 s at 24 fps is ~120 frames; a game move needs 8–16. H3's slow, deliberate performance is an advantage — more in-betweens to choose from, less blur per frame. Game timing (startup, active, recovery) is authored separately in frame data and never inherited from the clip.

1. The character still

Generate with scripts/gen_still.py (Nano Banana, ~$0.07, --batch for parallel style probes). The prompt must nail four things:

  • Side view facing right, full body including feet, centered, feet planted on an invisible ground line. Cropped feet make a character you cannot anchor.
  • Flat solid magenta #FF00FF, edge to edge, no gradient, no cast shadow, no ground line. This is your chroma key.
  • Clean cel: no film grain, no dust, no scratches, no paper texture, no vignette. Beautiful grain destroys the key — say so explicitly, because style prompts tend to add it.
  • Bold outlines and flat fills survive downscaling to sprite size.

Style choice is a motion question, not a taste question: some styles H3 simply won't animate. Probe several looks, then spend one clip motion-testing the finalist before committing to a full move set. Ink wash, claymation, rubber-hose and photoreal move well; flat vector and paper cutouts risk freezing.

Extra end-pose stills (KO, downed) are generated from the idle as a reference image. Say "EXACTLY ONE character, completely alone, no second figure, no duplicate" — asking for "knocked out" while showing a standing reference reliably returns both a standing and a lying character in one frame.

2. Clip briefs, one per move

The idle pin. Every move clip sets first_frame = last_frame = the idle still. This buys three things at once: the character cannot drift off-model (H3 keeps identity only when it is anchored in a locked frame), the animation returns exactly to neutral so it loops, and moves chain cleanly in a state machine. Moves that end elsewhere (KO) pin their own end frame instead.

Use the beat structure from h3-video, plus these sprite-specific guards — each one was learned by getting the opposite:

The character's hands and feet stay their normal size at all times - NO
ballooning, NO growing fists; limbs may stretch but hands and feet keep
constant scale.
Camera locked on a tripod, no zoom, no pan, no cut.
The background stays a perfectly flat uniform solid magenta at all times - no
gradient, no cast shadow, no ground line, nothing else enters the frame.
The character stays centered on the same ground level and does not travel
across the frame; everything not described stays static.
Audio: SFX only. NEVER generate music, melody, score or musical tones.
  • Walks are briefed in place ("as if on a treadmill") — the engine moves the transform, so a sprite that travels fights the engine.
  • Hit-stun and KO react to "an invisible blow", since no opponent is in frame.
  • Cartoon models love exaggeration. Unforbidden, fists balloon on impact frames.

A basic set — idle, walk forward, walk back, jump, crouch, punch, kick, block, hit-stun, KO — is ~$6.50 and submits as one parallel batch. Consider skipping the back-walk clip and playing the forward cycle in reverse (a classic 2D fighter trick): asked for a backward stride, H3 tends to give a wary sway.

3. Decompose and validate

bash
python3 scripts/sprite_cut.py clips/v_punch.mp4 sprites/punch --frames 12
python3 scripts/sprite_cut.py clips/v_walk.mp4  sprites/walk  --frames 8 --loop

Writes keyed/*.png (RGBA), strip.png, anim.gif (pose preview at source pacing) and report.json.

Keyframes are picked by cumulative motion arc-length — equal steps of accumulated frame-to-frame change, so frames concentrate where the action is. Uniform sampling looks mushy, and picking local motion maxima over-samples the idle bounce at the head of the clip.

--loop for cycles. Whole-clip picks include the start-up and the settle back to idle, which is exactly why a walk visibly resets instead of looping. Loop mode finds the closest-matching frame pair inside the sustained middle of the clip and samples between them, giving a true seam.

Read the summary before trusting anything:

metricwhat it tells you
worst_bg_purity~1.0 means every pixel is confidently background or character; lower means key leak
loop_diffmove returns to its start pose (or, in loop mode, the cycle seam)
first_vs_last_baselinefeet end where they began, in px
baseline_drift_pxfeet wandering — large is right for a jump, suspicious for a stance

Despill note: do not blend the fringe toward the off-channel, which visibly tints the character. Clamp the key channels against the off-channel instead, as the script does.

Show full SKILL.md (374 more words)Show less

4. Atlas: one global scale

The trap. Scaling each frame to a fixed on-screen height is the obvious thing and it is wrong: a crouch or jump tuck has a smaller bounding box, so per-frame normalization renders it bigger than standing. Derive one scale from the idle frame and apply it to every frame of every move.

bash
python3 scripts/build_atlas.py sprites/ atlas.json \
    --moves idle,walk,jump,crouch,punch,kick,block --ref idle --height 340

Frames are stored trimmed, at global scale, with offsets to a shared anchor: footOffset (feet vs the ground line), anchorOffset (stance-center column inside the crop), driftX (this frame's drift from the canonical center).

The anchor X comes from the ankle-region centroid, not the bbox center — a big arm or tail swing moves the bbox, and centering on it makes the character slide sideways between poses.

The script prints per-move on-screen heights. Crouch and jump-tuck must be shorter than idle; if they are taller, per-frame scaling has crept back in.

5. Render

js
ctx.translate(x + f.driftX, GROUND_Y + jumpY);
ctx.scale(facing, 1);              // player 2 is a flip, never a generative mirror
const foot = state === 'jump' ? 0 : f.footOffset;   // engine arc supplies the lift
ctx.drawImage(img, -f.anchorOffset, foot - img.height, f.w, f.h);

Two real bugs live in those four lines. drawImage's y is the top edge while footOffset positions the feet, so dropping - img.height sinks the character through the floor. And if the engine authors a jump arc, adding the frame's baked-in air offset on top double-lifts it.

Frame data stays separate from pixels — durations per frame, a loop flag, and for held states an enter/hold/release split so a key can be held:

js
punch:  { frames:[0..11], durations:[35,35,45,50,...], loop:false }
crouch: { enterFrames:[0,1,2], holdFrame:3, releaseFrames:[4..7], hold:true }

Roughly 35–70 ms per frame for attacks (fast startup, slower recovery) against ~150 ms for idle. Tune feel here; never regenerate video for timing.

6. Verify with pixels, in a browser

Asserting on atlas metadata is not verification — it passes happily while the render is broken. Measure the character on the actual canvas:

js
// drive the loop deterministically: requestAnimationFrame freezes in unfocused tabs
const drive = (n, codes) => {
  for (const c in keys) delete keys[c];
  for (const c of codes) keys[c] = true;
  for (let i = 0; i < n; i++) tick(g, keys, 16.7);
  draw();
};
// then getImageData, find the non-background bbox, compare against GROUND_Y

Confirm: idle feet sit on the ground line, crouch is shorter and still planted, jump lifts without resizing, landing returns to exactly idle.

Chrome extensions cannot open file:// URLs — serve the page with python3 -m http.server and drive localhost.

Costs and habits

Still ~$0.07, 5 s clip $0.64, a 10-move fighter ~$7, failed jobs free. Retakes are per-move, never the whole set, so diagnose before rerolling: a wrong-looking character means the locked frames were wrong, not the prompt. Keep superseded assets rather than deleting them — an earlier take is often the only surviving copy of a pose you end up wanting back.

© gary149, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in skills/h3-game-sprites of gary149/h3-game-sprites.

  • SKILL.md
  • scripts/build_atlas.py
  • scripts/gen_still.py
  • scripts/sprite_cut.py

Open the folder on GitHubat commit d129557

Compare with similar skills

H3 Game Sprites next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

H3 Game Sprites compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
H3 Game Sprites this skillgary149/h3-game-sprites136—~2.4kAutomated safety check: PassMIT
Sprite Genaldegad/sprite-gen2.6k—~4.8kAutomated safety check: PassApache-2.0
AI Game Art Pipelineybuild-ai/ai-game-art-pipeline-skill297—~1.1kAutomated safety check: PassMIT
Sprite Sheet PipelineLayrKits/Sprite-Pipeline595—~1.5kAutomated safety check: PassNone
Short Drama Directorlixiaoxiao9888-create/manju-laoli-skill1.1k—~6.4kAutomated safety check: PassMIT
Video-to-Sprite Animation Generator0x0funky/agent-sprite-forge4.4k—~3.8kAutomated safety check: PassMIT

Similar skills

  • Sprite Gen

    aldegad/sprite-gen

    Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation.

    2.6k GitHub stars~4.8k tokensUpdated yesterday
    Game DevelopmentAuto-check passed
  • AI Game Art Pipeline

    ybuild-ai/ai-game-art-pipeline-skill

    Provider-neutral open-source skill for planning and producing game-runtime art assets and animation: static props/icons, canonical character sheets, combat sprites, 3D/video motion references…

    297 GitHub stars~1.1k tokensUpdated 3 mo ago
    Game DevelopmentAuto-check passed
  • Sprite Sheet Pipeline

    LayrKits/Sprite-Pipeline

    Guide an AI assistant through this repo's 2D animation sprite-sheet workflow.

    595 GitHub stars~1.5k tokensUpdated 5 mo ago
    Game DevelopmentAuto-check passed
  • Short Drama Director

    lixiaoxiao9888-create/manju-laoli-skill

    【漫剧老李AIGC 全流程Skill · V6.9.8 轻量版 Multi-Agent】抖音与红果爆款短剧/漫剧工业化编剧与视听导演超级系统。全面支持 OpenClaw、WorkBuddy、豆包智能体/扣子(Coze)等多Agent平台,深度适配 Seedance 2.5/2.0(强制二选一,即梦为次选/历史兼容)+ MiniMax H3 格式支线(七段式→H3…

    1.1k GitHub stars~6.4k tokensUpdated 19 days ago
    Agent WorkflowsAuto-check passed
  • Video-to-Sprite Animation Generator

    0x0funky/agent-sprite-forge

    Turns one approved master still into a full set of animated action clips for a character, one image-to-video take per action, then packages them for a game engine.

    4.4k GitHub stars~3.8k tokensUpdated 3 days ago
    Media & CreativeAuto-check passed
  • MiniMax multimodal model skill — use MiniMax Multi-Modal models for speech, music, video, and image.

    1.4k GitHub stars~7.6k tokensUpdated 17 days ago
    Media & CreativeAuto-check passed

Works with

Questions about H3 Game Sprites

What does H3 Game Sprites do?

Build 2D game sprite sheets by generating motion with MiniMax H3 (Hailuo) video, then cutting the footage into validated chroma-keyed sprite frames - the Mortal Kombat method with a video model…. H3 Game Sprites is an agent skill from gary149/h3-game-sprites. Build 2D game sprite sheets by generating motion with MiniMax H3 (Hailuo) video, then cutting the footage into validated chroma-keyed sprite frames - the Mortal Kombat method with a video model instead of filmed actors.

When should I use H3 Game Sprites?

H3 Game Sprites fits situations like: wants game sprites; an animated 2D game character; A fighting/platformer/beat-em-up character; wants to turn AI video into game animation frames.

How do I install H3 Game Sprites in Claude Code?

Run `npx skills add gary149/h3-game-sprites --skill h3-game-sprites -a claude-code`. Or copy the skill folder (skills/h3-game-sprites in gary149/h3-game-sprites) into .claude/skills/h3-game-sprites in your project. Claude Code loads it when a task matches its description.

How do I install H3 Game Sprites in Codex?

Run `npx skills add gary149/h3-game-sprites --skill h3-game-sprites -a codex`. Or copy the skill folder (skills/h3-game-sprites in gary149/h3-game-sprites) into .agents/skills/h3-game-sprites in your project. Codex loads it when a task matches its description.

Can I use H3 Game Sprites in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add gary149/h3-game-sprites --skill h3-game-sprites -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/h3-game-sprites, .gemini/skills/h3-game-sprites, .github/skills/h3-game-sprites and .opencode/skills/h3-game-sprites in your project.

What does H3 Game Sprites need to run?

Going by SKILL.md and its folder, H3 Game Sprites needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3; A credential in OPENROUTER_API_KEY. Compatibility (from SKILL.md): Requires ffmpeg, Python 3 with Pillow and numpy, and an OPENROUTER_API_KEY with credit for video and image generation..

Does H3 Game Sprites access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is H3 Game Sprites safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does H3 Game Sprites use?

H3 Game Sprites is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does H3 Game Sprites use?

About 2.4k tokens (SKILL.md is roughly 9.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to H3 Game Sprites?

Skills that share tags, products or a category with H3 Game Sprites: Sprite Gen (aldegad/sprite-gen, 2.6k stars), AI Game Art Pipeline (ybuild-ai/ai-game-art-pipeline-skill, 297 stars), Sprite Sheet Pipeline (LayrKits/Sprite-Pipeline, 595 stars) and Short Drama Director (lixiaoxiao9888-create/manju-laoli-skill, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains H3 Game Sprites?

gary149 (a GitHub user) maintains it in gary149/h3-game-sprites, which has 136 GitHub stars. The repository was last updated on August 17, 2026.

Source: gary149/h3-game-sprites on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.