/q-explain:explain-videofrom q-explain
Use when the user says "explainer video", "animated explanation with narration", "make a video that explains X", "math animation video", "narrated animation", "Manim video", or wants a long-form (1-10 min) 16:9 landscape teaching video on a technical or math topic. Makes a narrated explainer in a math-animation style (dark background, geometric shapes that build up step by step, calm voice-over) with a Python animation library and text-to-speech. Asks before any install and gets script approval before render. Do NOT use for 9:16 vertical short reels (use code-motion-explainer if installed), for an interactive page (use q-explain:explain-html), for a static diagram (use q-explain:explain-diagram), or for plain-English rewriting (use q-explain:ste-writing).
Ships in q-explain. 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.
Style: dark background, smooth geometric animation, math and diagrams that build up step by step, calm voice-over. One idea in each scene. The motion IS the explanation.
macOS-first. The default voice is macOS say. On Linux or Windows the pipeline works only with an ElevenLabs key (see Step 2). Tell the user this at the start if they are not on macOS.
| Need | Check | Notes |
|---|---|---|
| python3 | python3 --version | 3.9 or newer |
| ffmpeg and ffprobe | which ffmpeg ffprobe | brew install ffmpeg |
| Manim Community | python3 -c "import manim" (or in .venv) | Needs cairo, pango, pkg-config |
| A TTS engine | macOS say, or ELEVENLABS_API_KEY in the environment | say is free and offline; the key gives better voices |
| LaTeX (optional) | which latex | Only for MathTex. Without it, use Text |
The bundled files are in this skill's folder:
${CLAUDE_SKILL_DIR}/scripts/narrate.py: TTS for each sentence, scene durations, caption timings, concatenated narration, and an .srt file.${CLAUDE_SKILL_DIR}/templates/scene_template.py: a Manim scene that pads each scene to its audio length.script.json ──► narrate.py ──► audio/<id>.mp3 + durations.json
│
scene.py (Manim, reads durations) ──► video (silent, 1920x1080)
│
ffmpeg mux ─────────────► final.mp4 (+ captions.srt)
Work in a project folder: the user's chosen folder, or the scratchpad directory.
script.json and wait for an OK. Text is cheap to change; renders are slow.-ql first and check it. Render -qh only after the preview is correct.python3 --version; which ffmpeg ffprobe say; python3 -c "import manim" 2>&1; echo "ELEVENLABS=${ELEVENLABS_API_KEY:+set}"
If something is missing, tell the user what you will install and ASK first (gate 1):
brew install ffmpeg cairo pango pkg-config # system libs
python3 -m venv .venv && .venv/bin/pip install manim
Optional LaTeX (gate 2, separate question): brew install --cask mactex-no-gui.
Create script.json: a list of scenes. Each scene has an id and the narration text.
[
{"id": "01_hook", "text": "Why does a hash map find a key so fast? ..."},
{"id": "02_buckets", "text": "..."}
]
Rules:
q-explain:ste-writing.python3 "${CLAUDE_SKILL_DIR}/scripts/narrate.py" script.json --out audio
ELEVENLABS_API_KEY is set in the environment, the script uses ElevenLabs (ELEVENLABS_VOICE_ID and ELEVENLABS_MODEL_ID are optional). Never put a key in a file or on a command line.say (free, offline, robotic). --voice Samantha picks a voice (say -v '?' lists them); --rate sets words per minute.audio/<id>.mp3, audio/durations.json (seconds per scene, measured with ffprobe), and audio/captions.json (sentence timings).cp "${CLAUDE_SKILL_DIR}/templates/scene_template.py" scene.py
Write one scene_<id> method for each scene id. The template reads audio/durations.json and pads each scene to its audio length, so sync never depends on guessed times.
Preview first (gate 4), then the final:
.venv/bin/manim -ql scene.py Explainer # preview, fast
.venv/bin/manim -qh scene.py Explainer # 1080p final
Look:
#0f0f0f. Palette: blue #58C4DD, yellow #FFFF00, teal #5CD0B3, red #FC6255.Create, Write, Transform, ReplacementTransform, Indicate, FadeIn, FadeOut.python3 "${CLAUDE_SKILL_DIR}/scripts/narrate.py" script.json --out audio --concat-only --srt captions.srt
ffmpeg -y -i media/videos/scene/1080p60/Explainer.mp4 -i audio/narration.mp3 \
-c:v copy -c:a aac -shortest final.mp4
--srt writes one caption for each sentence from audio/captions.json, and prints a WARN line for each caption that breaks the caption rule below. To burn captions into the video, add -vf subtitles=captions.srt and drop -c:v copy (needs a re-encode).
narrate.py --srt must print no WARN lines. If it does, audio/captions.json was edited or is stale: narrate again.ffprobe final.mp4 shows one video and one audio stream and the expected length.final.mp4 (and captions.srt).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub phuquocchamp/q-harness --plugin q-explain4 skills in this plugin
/explain-diagramUse when the user says "explain with a diagram", "draw this", "draw a diagram", "visualize how X works", "show me the architecture/flow", "sơ đồ", "diagram this", or when a written answer would need more than about 3 paragraphs to describe structure, sequence, or relationships. Explains a concept, system, codebase, flow, or LLM output as a static diagram instead of prose, and picks a drawing tool that is available (Mermaid always works). Do NOT use for data charts (use dataviz if available), for an interactive page with controls (use q-explain:explain-html), for a narrated video (use q-explain:explain-video), or for plain-English rewriting (use q-explain:ste-writing)./explain-htmlUse when the user says "explain in HTML", "make an interactive explainer", "make an interactive page", "build a page that teaches X", "visual explainer", "interactive walkthrough", "giải thích bằng web", or wants something more engaging than text or a static diagram. Explains a topic, codebase, algorithm, or LLM output as a custom interactive web page with step-through controls, sliders, toggles, animations, and live examples. The outcome is a shareable page: an Artifact when the Artifact tool is available, otherwise one self-contained local .html file. Do NOT use for a single static diagram (use q-explain:explain-diagram), for a data dashboard (use dataviz or a Dashboard type if available), for a narrated video (use q-explain:explain-video), or for plain-English rewriting (use q-explain:ste-writing).Other plugins' skills for the same job