/hildegard:hildegard-motionfrom hildegard
Creates animated video from a JSON spec: title cards, promos, explainers, kinetic type, data reveals, slideshows, and lower thirds. Renders frames and encodes MP4 with built-in validation.
Ships in hildegard. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
This skill makes video from a JSON spec: scenes, layers of text, shapes and photos, and named moves. scripts/motion.py
checks the spec, draws every frame (anti-aliased, sRGB) and encodes an MP4. No GPU, no browser, no model. The script
refuses the mistakes weak models make: text off the edge, text too brief to read, low contrast, overlapping words. The
user's request wins over every default here. For footage use hildegard-video-edit; for generated shots
hildegard-film.
HG in a command is the folder that holds the Hildegard skills (this skill's folder sits in it).
You need python3 (3.10 or later), numpy, Pillow, and either ffmpeg on PATH or PyAV. Check once:
python3 -c "import numpy, PIL; print('ok')" && (command -v ffmpeg >/dev/null && echo "ffmpeg ok" || python3 -c "import av; print('av ok')")
If something is missing, say so and give the install line (python3 -m pip install "numpy>=1.26" "pillow>=10.1" "av>=12";
leave out "av>=12" when ffmpeg is on PATH); do not install for the user. These are minimums, not pins; the script's
tests pass on Python 3.10 through 3.13. Fonts download once from Google Fonts (pinned, checked, cached) the first time a
template needs them.
If you read nothing else, do these steps.
No shell or tools here (a chat, or tools turned off)? Then you are writing a plan: give the user the commands in order, with their file names, and the checks to run after. Never write tool-call markup or claim a result you did not get.
cp <skill>/templates/promo.json work/promo.json. Never start from a blank file.node "$HG/hildegard-sound/scripts/voice.mjs", effects with
node "$HG/hildegard-sound/scripts/sfx.mjs", placed by second in the spec's audio list (see Narration and sound
below). A plan, or audio onto a finished video, writes out that section's FFmpeg mix in full, one input and
adelay per line or effect.result: clean: python3 <skill>/scripts/motion.py work/promo.json --check. Read each
line and do what its Fix: says. Never use --force to get past a problem.python3 <skill>/scripts/motion.py work/promo.json work/promo.mp4 --preview work/promo-sheet.jpg.
Open the 8-frame sheet and answer Looking at the sheet below. Fix the spec and render again (--scale 0.5 for
drafts).--check result and the sheet) and what you
couldn't (you can't hear audio; motion is judged from frames).Planning only (no render): give the beat table (start, end, on-screen words, narration, sound cue at a second), the spec changes and the commands in order, and say it is unrendered.
| The request | Template | Length |
|---|---|---|
| a title, an opener, a name and role over a photo | title-card.json | 9 s |
| a short ad for an event, product, ministry or app | promo.json | 15 s |
| a verse, a quote, a line of poetry, a thought for the day | quote-card.json | 10 s |
| numbers that need to be seen: a chart and one takeaway | data-reveal.json | 10 s |
| photos with slow moves and captions, a memory reel | slideshow.json | 16 s |
| an announcement in big type, a lyric, one phrase per beat | kinetic.json | 13 s |
| custom motion, physics, data-driven batches, in Rust | templates/fframes-title/src/main.rs, with references/fframes.md | any |
templates/README.md says which words, colors and numbers each one takes. The photos in the slideshow, promo and title
card are sample: placeholders drawn in code. Replace them with the user's photos ("file": "photos/one.jpg",
relative to the spec), and say so in the delivery if you could not: a video still showing sample landscapes is not
finished.
Words. Use only the words the brief gives you. Do not invent names, dates, prices, quotes, statistics or claims. If the brief lacks a piece a template needs (a date, a place), ask the user, or cut that layer. Numbers in a chart are the user's numbers, never rounded or made up. Scripture and quotations are word for word from a source you name.
One idea per scene. A scene says one thing. Two ideas are two scenes. No scene has more than about 12 words, and
--check warns past 3.6 words per second.
Timing. How long words must be fully on screen (animation time does not count):
| Words in the scene | At least | Comfortable |
|---|---|---|
| 1 to 3 | 1.5 s | 2.5 s |
| 4 to 6 | 2.0 s | 3.5 s |
| 7 to 10 | 3.0 s | 5.0 s |
| more than 10 | split the scene |
The hard floor --check enforces is 0.25 s per word and never under 1.2 s. A whole video: 15 s for an ad, under 10 s for a
card, never longer than the words need. Hold the final frame 1 s with nothing moving (--check warns if you do not).
Type sizes are percent of the frame height, so they hold at any resolution:
| Use | size |
|---|---|
| a giant word or two (condensed fonts like Bebas Neue) | 16 to 34 |
| a title or headline | 8 to 13 |
| a subhead or a name | 4.5 to 6 |
| a line of body or a caption | 3.4 to 4.2 |
| the smallest anything may be | 3 |
At most three sizes in one scene. A headline is at least twice the size of the line under it. Text stays inside the 5% safe margin on every side. Left-aligned or centered, never mixed in one scene.
Color. Two or three colors per video: a background, a text color, one accent. Text is light on dark or dark on light;
never mid-tone on mid-tone. On a photo, put a dark gradient under the text (the title-card template shows how) or use
"dim". Contrast is checked: 4.5:1 for small text, 3:1 for large.
Motion.
linear except for typing and counters.rise for headlines and fade for the line under).crossfade (0.6 s) for mood and continuity, slide for a sequence of steps, wipe and cut for energy,
dip for a hard break. Use one or two kinds in a video.All free. Write the narration per beat, then make one file per beat so a bad line can be redone alone:
node "$HG/hildegard-sound/scripts/voice.mjs" --file beat1.txt --out vo1.wav # Kokoro, Apache-2.0, offline
node "$HG/hildegard-sound/scripts/sfx.mjs" --engine freesound --prompt "bicycle chain whir" --seconds 2 --out fx1.wav
Kokoro needs Node 22 or newer; its first run downloads the model once. Freesound returns CC0 recordings and needs a free
FREESOUND_API_KEY; the default tangoflux engine is for personal and school work only. Engines, licenses and exit
codes: HG/hildegard-sound/references/free-voice-and-sfx.md; premium voices through the listener's own account:
HG/hildegard-sound/references/puter-voice.html. Label an AI voice as AI.
Place every file by second in the spec, and the script mixes and normalizes it:
"audio": [
{"file": "vo1.wav", "start": 0.5},
{"file": "fx1.wav", "start": 4.0, "volume_db": -8},
{"file": "music.wav", "start": 0, "volume_db": -14, "fade_in": 1, "fade_out": 2}
]
The mix is normalized to -14 LUFS unless "loudnorm": false.
A video rendered elsewhere, or a plan the user runs with FFmpeg alone: give this tested command, never a script
they don't have. Each narration line and effect starts at its beat's second (adelay in ms), effects sit 10 dB under
the voice, the mix is normalized to -14 LUFS, and the picture is copied, not re-encoded:
ffmpeg -i explainer.mp4 -i vo1.wav -i vo2.wav -i fx1.wav -filter_complex "[1:a]adelay=500:all=1[v1];[2:a]adelay=5500:all=1[v2];[3:a]adelay=4000:all=1,volume=-10dB[f1];[v1][v2][f1]amix=inputs=3:normalize=0,loudnorm=I=-14:TP=-1.5:LRA=11,apad[a]" -map 0:v -map "[a]" -c:v copy -c:a aac -b:a 192k -shortest out.mp4
Add one input and one adelay per line or effect, and raise inputs=. Tested on a 10 s 1080p clip: -14.0 LUFS, true
peak -1.5 dB, video stream copied. The voice and effect scripts above come with the Hildegard skills
(git clone https://github.com/Students-of-Local/hildegard; HG is its skills folder).
| It says | Do this |
|---|---|
unknown field "colour" | spell it as the message suggests; field names are in references/spec.md |
text runs off the edge or sits inside the 5% safe margin | set "box" (the message says what) so it wraps, lower size, or move x and y toward the middle |
the word ... is wider than its box | widen box, lower size, or use a shorter word |
is fully on screen for X s but N words need Y s | lengthen the scene, or shorten its entrance, or cut words |
has contrast X:1 ... needs 4.5:1 | change the text color, add "backing": {"color": "#00000099"}, or "dim": 0.4 on the photo |
overlaps ... | move one with y, or show them at different times |
is covered by ... | move the covering layer earlier in layers (the last layer is on top) |
has animation running until X s but the scene ends | lengthen the scene or shorten the animation |
the camera move shows past the edge of the photo | lower the camera amount |
duration says X but the scenes add up to Y | set duration to Y (scene lengths minus transition overlaps) |
font "Inter" is missing | needs the network once; or give a font file in "fonts" |
A message that still fails after two fixes: read the layer it names in references/spec.md, and change one thing at a time.
Open the --preview sheet and answer each before you deliver:
If any answer is no, fix the spec and render again.
When a brief asks for camera, zoom, shake, beat-to-frame, timing, framing, seam, animation-principle, logo sting or
review-pass numbers, or you drive procedural animation yourself, follow references/sync-checks.md and check with
python3 scripts/check_sync.py --camera spec.json and python3 scripts/check_sync.py --video out.mp4. Compute every
frame as round(t * fps) from the brief's own fps.
Everything the script can draw is in references/spec.md: text with wrapping, letter spacing, shadow, outline and backing;
rectangles, circles, lines, polygons and paths; photos with cover or contain fit; a bar chart that takes real numbers;
counting numbers; typewriter and word-by-word text; keyframed moves with 21 named easings; crossfade, slide, wipe and dip
transitions; Ken Burns camera moves; SRT or inline captions; music with fades, mixed and normalized to -14 LUFS. A
weak model should add one of these to a template only when the brief needs it, and run --check after each change.
For a strong model: when a request is past what a spec can say (real layout, a chart library, a shader, a physics
sim), write your own renderer and keep the spec path's bars: the 5% safe margin, max(1.2, 0.25 * words) seconds of
reading time, 4.5:1 contrast on rendered pixels, no overlap, eased moves, identical frame hashes on a rerun, and an
8-frame sheet you look at. references/going-further.md has a Playwright capture loop, a Pillow frame loop, the
ffmpeg line, and how to extend scripts/motion.py itself. A hybrid still uses the checker: render what a spec can say
as the base layer, then put your own frames over it with ffmpeg's overlay.
Fonts are Google Fonts under the SIL Open Font License, pinned to one google/fonts commit and verified by SHA-256 in
scripts/motion.py (python3 scripts/motion.py --fonts lists them and what is cached). Nothing is bundled: a font
downloads once into a cache and is never fetched again while the cached file matches its pin. Pinned families: Inter,
Montserrat, Space Grotesk, Playfair Display, Lora, EB Garamond, Bebas Neue, Oswald, DM Serif Display, JetBrains Mono (Latin
text). Any other font is a file the user has the right to use, named in "fonts".
references/fframes.md (opens in a new tab)references/going-further.md (opens in a new tab)references/spec.md (opens in a new tab)references/spec.schema.json (opens in a new tab)references/sync-checks.md (opens in a new tab)scripts/check_sync.py (opens in a new tab)scripts/motion.py (opens in a new tab)templates/README.md (opens in a new tab)templates/data-reveal.json (opens in a new tab)templates/fframes-title/Cargo.toml (opens in a new tab)templates/fframes-title/README.md (opens in a new tab)templates/fframes-title/src/main.rs (opens in a new tab)templates/kinetic.json (opens in a new tab)templates/promo.json (opens in a new tab)templates/quote-card.json (opens in a new tab)templates/slideshow.json (opens in a new tab)templates/title-card.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
motion-graphics, video-generation, json-spec, animation, mp4-rendering
Other plugins' skills for the same job
npx claudepluginhub students-of-local/hildegard --plugin hildegard17 skills in this plugin
/hildegardUse for /hildegard, /art, /vus, /mus, /suno and any request to make, edit or write creative work; routes images, video, sound, music, 3D, games, web and every kind of writing./hildegard-3dUse when making a 3D model, sculpture, figurine, game asset, relief or lithophane in Blender, OpenSCAD or code, checked each round for views, watertightness and size./hildegard-artUse when making art, an image, illustration, key art, mood board or visual style with the user's image model; posters and covers with words go to hildegard-design.