Make a short narrated explainer video on one topic, in the style of animated math explainers: a beat-by-beat script, animated scenes, narration from a local voice or a provider the user supplies, captions, and one MP4. Use only when the user explicitly asks for a video explainer. Experimental: behavior and inputs may change in any release.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Hl Explainer Video?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hugolopes45-hl-explainer-video)
---
name: hl-explainer-video
description: "Make a short narrated explainer video on one topic, in the style of animated math explainers: a beat-by-beat script, animated scenes, narration from a local voice or a provider the user supplies, captions, and one MP4. Use only when the user explicitly asks for a video explainer. Experimental: behavior and inputs may change in any release."
---
# Explainer Video
Input: `[topic] [--length <minutes>] [--voice local|<provider>]`
Rules for every run:
Do not retry a permission-denied action through another command, tool, path, or environment. Report the blocker.
Ground factual claims in supplied evidence or results you observed in this session.
- Take line numbers from numbered reads, not list-item numbers. Copy hashes, quotes, and errors exactly; verify stated counts.
- Report each check's command, directory, and actual execution count. Count runs, not tool calls or test cases; include failures, exclude denied attempts. Reconcile counts with observed results.
- Report another agent's findings only after its result returns and you check them.
- Separate observations, inferences, and estimates. An outside fact without a checked source is unverified, not an estimate.
- Scope all, only, and none to what you checked. A code-backed prediction is not an observed run.
- Missing evidence: say what is unknown. Name a file or function instead of inventing a line number.
Deliver the video and its supporting artifacts. Report actual media checks and narration limits, not the render log; keep unchecked viewing or listening explicit.
Defaults: length under 3 minutes; voice local. No topic: ask. Work in a fresh permitted temporary directory; never write into the repository unless the user names a path.
## 1. Script
State the one question the video answers and the audience. Take facts from the repository or checked sources. Mark unchecked factual claims unverified and invented teaching examples illustrative. Never invent evidence or quotes. When the docs and the code disagree, the code wins: state each discrepancy in the reply, and check claims against the code.
Write the beats as a table: beat, narration, visual, estimated seconds. One idea per beat. Narration: plain words and short, complete sentences. Visuals follow the explainer method: start from one concrete example with real numbers, build up, keep one idea on screen.
## 2. Tools
Check what is installed before writing commands: `ffmpeg -version`, `ffprobe -version`, and `manim --version`. Do not install or download a tool just to check its version. Check the installed version's documentation before using an API you have not seen work.
For offline rendering, disable Manim's automatic version lookup before rendering. Find the option in the installed version's documentation and pass it on the render command; if it lists none, say so under the media checks.
Local voice, first usable and permitted: the platform's speech command (`say -o <file>.aiff` on macOS), `piper`, `espeak-ng`. None usable: produce captions only and say so, unless narration is required; then stop. A denied invocation is not missing software; do not bypass its denial.
A provider voice (for example ElevenLabs) only when the user asks for it and has put the key in an environment variable. Read the key only from that variable; never print, log, or write it to a file. Use the provider's current documentation for the request. Paid usage needs the user's approval of the estimated cost first.
Name only tools confirmed missing, including ffprobe; distinguish tools not checked or denied. Offer an install command only after checking permitted documentation for the target environment; otherwise label it unverified. Ask before installing.
## 3. Narration first
With narration, generate one audio file per beat. Measure each with `ffprobe -v error -show_entries format=duration -of csv=p=0 <file>`. Each narrated beat's scene lasts its audio duration; the script estimates do not set timing. With captions only, use the script's estimated beat lengths and label them estimated.
## 4. Scenes
Style the scenes by [references/visual-design.md](references/visual-design.md): its art direction sets the palette, type, and motif; its motion and chart rules apply to every beat. Write one Manim scene per beat, or one scene that waits per measured duration. A beat's wait is its planned duration minus its animation run time; shorten animations that exceed it.
Render at low quality first (`-ql`). Verify the preview's stream, duration, and one frame per beat before a final render (`-qh`). A denied required check: immediately report `Stopped` with the exact observed error and partial artifacts, then end tool use. Missing preview verification: stop before the final render. Take each rendered file's path from Manim's log or a confirmed filesystem entry, not a guessed path. Run every render and encode in the foreground, never as a background job, and wait for it to finish before the next step. If the host limits command time, raise the limit or render one scene per command so each finishes within it.
Keep each scene a pure function of its beat's time: no unseeded randomness. Re-render only a changed beat or sub-range to check a fix. If a render still hits the host's command time limit, retry it once, raising that entry's execution count; a second timeout is `Failed`. Stop only the render processes you started, by process ID; never stop processes by name.
When the user supplies a screen capture for a scene, check it for personal data (names, contact details, account or ID numbers, or anything else that identifies a person) before the scene uses it. Leave out a capture that shows personal data or that you cannot view, name it under line 1, and ask in **Next:** for a redacted or viewable capture.
Settle each on-screen label at least 0.4 s before the action it names (heuristic default). Cut between beats or move the camera; within a beat, transform shapes instead of cutting. Do not use long crossfades.
## 5. Assemble
Use fresh output paths and `ffmpeg -n` to preserve existing files. Join the beats in order. With narration, mux: `ffmpeg -n -i <video> -i <narration> -c:v copy -c:a aac -shortest <out>.mp4`. With captions only, keep the video without an audio stream. Write an `.srt` from the script and the actual assembled beat timings.
## 6. Check
- `ffprobe` shows a video stream. With narration, it also shows an audio stream; their durations differ by under 0.5 seconds (heuristic default). With captions only, verify the video duration and caption timing; no audio stream is required.
- Extract one frame per beat (`ffmpeg -n -ss <t> -i <out>.mp4 -frames:v 1 <beat>.png`) and look at each: no clipped or overlapping text, body text legible on a 1080p frame, and the visual matches the narration.
- Verify caption intervals are ordered, non-overlapping, within the final video duration, and cover every beat.
- With narration, measure the final audio's integrated loudness and true peak. Compare them with the current official delivery specification of the destination, and report the values with the source and date read. If they fall outside it, normalize in two passes with the installed tool and measure again. Without a checked source, or when the values stay outside it after normalizing, say so under the media checks as a limitation; it does not change the verdict.
- Watching the whole video with sound is the user's check; never claim you did it.
## Output
Reader: someone who asked for a short video and will watch or share it, without having seen the script. The decision: use the video, or supply what is missing.
- Line 1, bold: one plain sentence that gives the result the viewer learns, in the user's words, not the file name. Never starts with a label.
- Under line 1, plain sentences: the narration source, or "The video has no narration: <observed reason>.", and "I have not watched or listened to the video."
- Body, as numbered points:
1. **The video shows the steps in this order.** A `text` block with one line per beat, `start - end what the viewer sees`, times in seconds.
2. **The media checks show <result>.** Maintain and report a verification ledger: full command, directory, actual execution count, observed result. Distinct arguments mean distinct entries, including preview and final probes. Copy commands verbatim from tool inputs; keep long commands in blocks keyed to ledger entries, not program-name shorthand. Then state coverage and limitations. Result words: `ran`, `ran, nothing to check`, `skipped: <reason>`, `failed: <reason>`. Include tool versions only when they explain compatibility or failure.
3. Failed render only: **The render stopped at <step>.** Then its error line, quoted exactly.
- `Verdict: <label>` on its own line just before `**Next:**`, one fixed label:
- `Ready`: the narrated MP4 is written and the checks passed.
- `Ready, captions only`: narration is optional, no usable permitted narration was produced, and the video and caption checks passed.
- `Failed`: a render or encode step failed, or a check in section 6 other than loudness still fails after a fix.
- `Stopped`: input or a tool is missing. See the stopped cases.
- `**Next:**` owns every viewer action, question, prerequisite, and unblock route once: watch the MP4 with sound before sharing (check captions and visuals for a captions-only video); for a failed step, the fix.
- `**Changed:**` list only artifacts actually written, including the MP4 path only when it exists. Report partial artifacts when stopped; do not list absent audio, scenes, or media. Say the repository is untouched only when verified.
Stopped cases: a bold line 1 in plain words, then `Verdict: Stopped`, then `**Next:**` with up to 2 numbered ways out, the default first, listed nowhere else:
- No topic: `**I need a topic before I can make the video.**`
1. Name the topic and length, for example `a 20-second video on compound interest` (default).
- Paid voice without a key or cost approval: `**I can't use the paid voice until access is available and its cost is approved.**`
1. Use the local voice (default).
2. Add the key to your environment and approve the estimated cost, then tell me.
- Missing or unavailable required tools: line 1 names only the tools that block this run and the observed reason.
1. Approve installation of confirmed missing tools using checked instructions, or resolve the reported permission blocker (default).
2. Supply the missing tools or permitted documentation, then send the request again.
Reader rules: define each term once at first use: beat (one scene and its narration or caption), caption (text and timings in the `.srt` file), Manim (the Python animation library), ffmpeg (the tool that joins video and sound), ffprobe (reads media lengths). Give every length as seconds with its unit: `20.0 s`. Never say you watched or listened to the video.
Example of a `Ready` run on another topic (invented values; shortened to the final-file checks. A real ledger lists every executed check, including tool, narration, and preview checks):
````markdown
**Yeast gas makes bread dough rise by filling the gluten with bubbles.**
The narration uses the local voice from `say`. I have not watched or listened to the video.
1. **The video shows the steps in this order.**
```text
0.0 - 6.2 s Flour and water form a dense ball.
6.2 - 14.8 s Yeast eats sugar and releases gas into bubbles.
14.8 - 22.0 s The bubbles stretch the gluten, and the dough doubles.
```
2. **The media checks show the MP4 matches its narration, and each beat (one scene and its narration) has a readable frame.**
| Entry | Directory | Executions | Observed result |
|---|---|---|---|
| 1 | `/tmp/bread-video` | 1 | ran: video 22.0 s, audio 22.1 s |
| 2 | `/tmp/bread-video` | 1 | ran: frame at 3.1 s shows the dough ball; text legible |
| 3 | `/tmp/bread-video` | 1 | ran: frame at 10.5 s shows gas bubbles; caption legible |
| 4 | `/tmp/bread-video` | 1 | ran: frame at 18.4 s shows the stretched dough; no overlap |
| 5 | `/tmp/bread-video` | 1 | ran: average loudness -18.4 LUFS, loudest peak -2.1 dBTP |
Commands, verbatim, by entry:
```sh
# Entry 1
ffprobe -v error -show_entries stream=codec_type,duration -of csv=p=0 /tmp/bread-video/bread-rise.mp4
# Entry 2
ffmpeg -n -ss 3.1 -i /tmp/bread-video/bread-rise.mp4 -frames:v 1 /tmp/bread-video/beat-1.png
# Entry 3
ffmpeg -n -ss 10.5 -i /tmp/bread-video/bread-rise.mp4 -frames:v 1 /tmp/bread-video/beat-2.png
# Entry 4
ffmpeg -n -ss 18.4 -i /tmp/bread-video/bread-rise.mp4 -frames:v 1 /tmp/bread-video/beat-3.png
# Entry 5
ffmpeg -n -i /tmp/bread-video/bread-rise.mp4 -af loudnorm=print_format=json -f null -
```
Coverage and limitations: I checked the final MP4 and read the `.srt` file against the beat timings; no command ran for the caption check. No delivery specification was checked, so the loudness values have no pass or fail result.
Verdict: Ready
**Next:**
1. Watch `/tmp/bread-video/bread-rise.mp4` with sound before sharing it.
**Changed:** `/tmp/bread-video/bread-rise.mp4`, `/tmp/bread-video/bread-rise.srt`, `/tmp/bread-video/beat-1.png`, `/tmp/bread-video/beat-2.png`, `/tmp/bread-video/beat-3.png`.
````