Skip to content
Back to search

h3-game-sprites

Agent Skill: turn AI-generated video into 2D game sprite sheets (the Mortal Kombat method, with MiniMax H3 as the actor)

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/gary149--h3-game-sprites/badge.svg)](/listings/gary149--h3-game-sprites)

HTML

<a href="/listings/gary149--h3-game-sprites"><img src="/api/listings/gary149--h3-game-sprites/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Copy the skill folder into wherever your agent looks for skills. For Claude Code:

git clone https://github.com/gary149/h3-game-sprites
cp -R h3-game-sprites/skills/h3-game-sprites ~/.claude/skills/

The format is portable across [skills-compatible agents](https://agentskills.io/clients); adjust the destination directory to match your client.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 90 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # h3-game-sprites
  2. An [Agent Skill](https://agentskills.io) for turning AI-generated video into 2D game sprite sheets.
  3. Mortal Kombat (1992) filmed actors and digitized the footage into sprites. This does the
  4. same thing with a video model as the actor: one short clip per move, cut down to its pose
  5. extremes, chroma-keyed to transparency, and packed into an atlas you can drop into an
  6. engine. A character with eight moves costs about $5 and lands in an afternoon.
  7. <p align="center">
  8. <img src="examples/punch.gif" width="220" alt="Animated punch, cut from a single generated clip">
  9. </p>
  10. <p align="center">
  11. <img src="examples/punch-strip.jpg" width="760" alt="Twelve keyed sprite frames selected from 124 video frames">
  12. </p>
  13. ## What it covers
  14. - The character-still recipe: side view, planted feet, flat magenta backdrop, and the
  15. "no grain, no dust, no vignette" clause that keeps the chroma key clean.
  16. - The **idle pin**: setting a move clip's first *and* last frame to the same idle still, so
  17. the character cannot drift off-model, every animation returns to neutral, and moves chain
  18. in a state machine.
  19. - Clip briefs, including the guards that stop cartoon models ballooning fists on impact and
  20. the in-place ("treadmill") walk phrasing that keeps the engine in charge of movement.
  21. - Frame extraction, keying with a despill that does not tint the character, and keyframe
  22. selection by cumulative motion arc-length rather than uniform sampling.
  23. - Seamless walk-cycle detection, because whole-clip keyframes include the start-up and the
  24. settle back to idle, which is what makes a walk visibly reset instead of loop.
  25. - The atlas and rendering math: one global scale (never per-frame normalization), anchoring
  26. from the ankle centroid, and the `drawImage` offset that decides whether your character
  27. stands on the floor or sinks through it.
  28. ## Install
  29. Copy the skill folder into wherever your agent looks for skills. For Claude Code:
  30. ```bash
  31. git clone https://github.com/gary149/h3-game-sprites
  32. cp -R h3-game-sprites/skills/h3-game-sprites ~/.claude/skills/
  33. ```
  34. The format is portable across [skills-compatible agents](https://agentskills.io/clients);
  35. adjust the destination directory to match your client.
  36. ## Requirements
  37. The local half of the pipeline (keying, keyframe selection, atlas building) needs only
  38. `ffmpeg` and Python 3 with `Pillow` and `numpy`. `sprite_cut.py` and `build_atlas.py` take
  39. an ordinary video file, so they work regardless of what produced it.
  40. Generation needs a video model and an image model, and neither is pinned to one vendor.
  41. H3 / Hailuo 3 is served by aggregators such as OpenRouter and fal, and by MiniMax directly.
  42. The character still can come from whichever image model you prefer, or from an illustrator,
  43. as long as it follows the pose and flat-backdrop recipe in the skill. Budget roughly
  44. $0.60-0.70 per five-second clip and a few cents per still, varying by provider.
  45. The bundled `gen_still.py` is a convenience, not a constraint: it defaults to Nano Banana
  46. (`google/gemini-3.1-flash-image`) through OpenRouter and reads `OPENROUTER_API_KEY`. Point
  47. the endpoint and model constants at the top of the file somewhere else, or skip the script
  48. and bring your own still.
  49. ## Scripts
  50. | Script | Does |
  51. | --- | --- |
  52. | `scripts/gen_still.py` | Generate character and pose stills, with reference images and a parallel batch mode for style probes |
  53. | `scripts/sprite_cut.py` | Extract, chroma-key, pick keyframes, emit a strip, a GIF and a metrics report; `--loop` finds a seamless cycle |
  54. | `scripts/build_atlas.py` | Pack frames into an atlas at one global scale with shared anchors |
  55. Each runs standalone, so the pipeline is usable without an agent driving it:
  56. ```bash
  57. python3 scripts/sprite_cut.py clips/punch.mp4 sprites/punch --frames 12
  58. python3 scripts/sprite_cut.py clips/walk.mp4 sprites/walk --frames 8 --loop
  59. python3 scripts/build_atlas.py sprites/ atlas.json --moves idle,walk,punch --ref idle
  60. ```
  61. ## Verifying, not vibing
  62. Every stage emits numbers you can check: key purity per frame, how closely a move returns
  63. to its starting pose, feet drift, and on-screen pose heights. The guidance leans on this
  64. hard, because the failure modes here are visual and quiet. A sprite that renders at the
  65. wrong scale, or one that hangs below the floor, will pass any assertion written against
  66. atlas metadata alone. Measure the rendered canvas.
  67. ## License
  68. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.