/math-explainer-video:math-explainer-videofrom math-explainer-video
Build 3Blue1Brown-style visual, intuition-first MATH (and physics) explainer videos with Manim — the complete, battle-tested pipeline behind the CBSE/ICSE math YouTube channel: Hinglish-native narration (Sarvam aditya), per-sentence voiceover sync, the render→frame-critique→fix loop, music, chapter markers, and all the manim gotchas that cost real hours to discover. Use this WHENEVER the user wants to create, script, animate, render, edit, or plan a math or physics explainer video, a "why does this work" concept video, a Manim animation, or work on the math video channel — even if they just say "make a video on [topic]", name a CBSE/NCERT chapter, or ask for a visual proof. Also use it for curriculum/launch planning for the channel. It exists so we never re-do the research: skip straight to building.
Ships in math-explainer-video. 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 is the captured playbook for a real, working pipeline. A pilot video (the trig identity
sin²θ + cos²θ = 1) was built, polished over many iterations, and a full CBSE Class 9–12 curriculum
was mapped. Read this first, then go build — don't re-research.
references/pedagogy-and-strategy.md for the full strategy, the market gap, and monetization.pip install manim) — NOT 3b1b/manim (that's ManimGL, Grant's
personal fork; different API, undocumented breaking changes). Grant's repo github.com/3b1b/videos
is reference-only: mine his techniques, never copy his code.aditya
(owner's locked choice) — scenes are authored natively in Hinglish with SarvamService. Deepgram is
legacy/English-drafts only.MathTex — put
/Library/TeX/texbin on PATH when rendering.~/code/maths (venv at .venv), flat layout: all source in
src/ (one <topic>_scene.py per video), deliverables in Math/<Topic>/. Built so far:
src/scene.py+scene_hi.py (derivative, video #1), src/circle_scene.py (circle area, video #2).
Curriculum: curriculum/ (257 lessons + launch plan).encoding=mp3&bit_rate=48000. Its streamed WAV writes a
bogus ~2 GB data-chunk length in the header → mutagen (what manim-voiceover trusts) reads it as
~6 hours → the render hangs forever. This single bug looked like a "7-minute hang." MP3 is correct.aditya (48 kHz, default
pace/temp — never override temp/pace). Since video #2, scenes are authored NATIVELY in Hinglish (no
English cut, no translate step); Deepgram (no Hindi support) is legacy for English drafts only. The
narration style rules + the QA gates that run BEFORE any paid render:
references/hindi-hinglish-cut.md (read it before writing narration).always_redraw mobjects can't be animated directly — the updater overwrites every frame. To
highlight a side, flash a static copy (ShowPassingFlash). To morph one into another, build
static copies, ReplacementTransform, then swap to always_redraw at the same parameter value.wipe()/keep across chapters must use get_family() — the scene holds the submobjects, not the
VGroup, so if m in (vgroup,) never matches and your triangle silently fades. Keep the family set.MovingCameraScene + VoiceoverScene compose fine: class X(VoiceoverScene, MovingCameraScene).
self.camera.frame.save_state() once; zoom with self.camera.frame.animate.scale(f).move_to(m);
Restore(self.camera.frame) to reset between chapters.Angle(...) can draw the reflex angle (looks like a near-full circle). Use an Arc with explicit
start_angle/angle instead.aloop filter, not -stream_loop on a WAV (raw WAV seams throw "Invalid PCM
packet" glitches — harmless, but re-encode the WAV once to silence them). amix ... normalize=0 so
narration stays full. Volume ≈ 0.25–0.28, NOT 0.10. 0.10 lands ~17 dB under the loud Hindi voice =
the user literally can't hear it ("where's the music?"). Aim bed ~8–10 dB under the voice mean. Verify
with subtraction (FINAL − no-music render), not volumedetect of the final — the voice masks it.run_time to tracker.duration, never hardcode it. A hardcoded
run_time front-loads the motion, then sits still for the rest of the clip — fine in the language you
tuned, but the longer Hindi audio (~30% longer) slides the words 2-3 s past the finished motion. Capture
with self.say(...) as tracker: and use run_time=tracker.duration (apportioned) for travelling things
(ValueTracker slides, camera moves, dots/lines moving). One-shot accents (Write/Indicate/Flash) may keep
a fixed run_time. Author it in the SOURCE scene so every language is synced at once. (See manim-pipeline.md.)open-ing the same path twice shows a STALE frame (looks like "no audio" / "same
as before" / a blank). Always hand over a freshly-named copy, or open a static PNG (immune to
player cache). Many "you didn't change it" complaints were really this.Full technical detail, exact commands, and the reusable code: references/manim-pipeline.md.
The end-to-end process, standing user directives, the full error log, and the do/don't list:
references/production-playbook.md — read it before starting a video from scratch.
⚠️ STEP 0 — CONFIRM THE TOPIC WITH THE OWNER. NON-NEGOTIABLE. When asked to "suggest" or plan,
the deliverable IS the suggestion: present the top 3–5 candidates from curriculum/ with the why
(demand / gap / JEE / visual-fit), give ONE recommendation, then STOP and wait for an explicit go on
a named topic. Production was once started off a "suggest" request and the owner was rightly furious.
Cost gates — none of these may run before the topic is confirmed: Sarvam TTS on new text (~₹25–30
per video), gpt-image-2 calls, any 4K render (hours). Same rule mid-build: if the owner interrupts,
STOP renders first, re-read the whole interruption for premise changes (not just the surface
correction), and confirm before resuming.
src/<topic>_scene.py) — copy assets/scene_template.py
(bundles SarvamService, VoiceoverScene+MovingCameraScene, helpers). Chapters; each beat one
short with self.say(...) line (drift-free per-sentence sync); narration per
references/hindi-hinglish-cut.md style; on-screen labels stay English. Bind moving run_times
to tracker.duration (gotcha #8). Add the Root mascot for the intro + questions/headlines only
(assets/root_buddy.py + references/mascot-root.md).Scene classes
with the tricky layouts, rendered -ql -s (no TTS), Read the PNGs; (b) AST audit — every
say/chapter_title narration arg contains Devanagari; (c) independent Hindi-editor agent audit
of all narration lines (grades GOOD / too-English / too-formal / awkward / MATH-ERROR with rewrites —
it catches heard-aloud ambiguities like "12-inch… radius 6" needing the size=diameter bridge).
Apply fixes, THEN synthesize.-ql --media_dir build (set SARVAM_API_KEY, texbin PATH). Audio is cached →
re-renders free.mev_grid), Read them
(gotcha #9), fix overlaps/off-screen/clipping/dead-air, re-render until clean. If a fix doesn't
show up in the re-render, it's the stale animation cache → --disable_caching (see manim-pipeline.md).
Then run the CRAFT AUDIT (references/animation-craft.md) — verb-match, no block-slides,
formula provenance, camera discipline, dead air, duration invariance — fix FAILs, re-verify. This is
what separates "renders correctly" from "feels 3b1b"; correctness-only passes ship stiff videos.-qk. Mix music (Grant's Etude @ ~0.28, gotcha #7) + compute chapters from the
4K .srt (timestamps shift 1–2 s between resolutions — always use the shipping render's srt).streamers/youtube-scraper, sort by views) and read what wins. Findings that held: the (HINDI | हिंदी)
tag overperforms hugely; "Differentiation"/अवकलन out-pull "Derivative" in Hindi titles; physics
framing widens reach; the intuition angle ("kya hota hai?", "समझो in X min", "essence of") beats
competing with 3-hour one-shots. Optionally scrape top-video comments for the exact pain phrases students use.$OPENAI_API_KEY, /v1/images/generations). Thumbnail =
the topic visual left + a huge hook (dy/dx = ?) right + Root peeking bottom-right; NO channel name on
the thumbnail (the name lives on the logo/avatar). Follow references/lucid-science-thumbnail-style.md.
Crop 3:2 → 16:9 (1280×720). Read the result to verify text/spelling.thumbnail.png, and ONE README.md (title + description + tags). All code/assets live in src/.The winning "why" structure (reverse-engineered from the top-performing intuition videos):
validated-confusion hook ("you were told to memorize this — nobody told you why") → anchor to
something familiar (e.g. "just like π is the same for every circle…") → let the viewer discover it,
then name it → concrete numbers before the abstraction → real-world payoff / a board-exam
application → forward hook + soft subscribe. Plus: spoken word = shown word (the on-screen
label matches the narration at that instant), spoken chapter lead-ins (never silent cuts), and
flowing morph transitions (the triangle becomes the circle — 3b1b's signature; the object
persists and transforms rather than fading to black). Details + research citations:
references/pedagogy-and-strategy.md.
references/production-playbook.md — the end-to-end process + standing user directives + full error log + do/don't. Read this first when starting fresh.assets/scene_template.py — copy this to start a new video (self-contained, all helpers).scripts/build_helpers.sh — render / extract-frames / mix-music / chapters / description helpers.references/manim-pipeline.md — toolchain, exact commands, every gotcha (incl. the tracker.duration sync rule), scene patterns, the morph + side-flash recipes.references/animation-craft.md — the craft bar: 3b1b's real idioms mined from his 2025–26 code (arc fans, teach-once-then-batch, camera-as-passenger, formulas made of the picture, timing table) + the pre-ship craft-audit checklist.references/hindi-hinglish-cut.md — the Hinglish narration playbook: Sarvam/aditya, the natural-Hinglish style rules, native authoring (the default since video #2), the AST + independent-agent QA gates, workspace hygiene. (The EN→HI transform section is legacy, video #1 only.)references/mascot-root.md + assets/root_buddy.py — "Root", the channel mascot (√ with eyes): design, the reveal, and the RULE (show only for questions/headlines, slide off the instant equations/graphs draw), animated without touching audio.references/pedagogy-and-strategy.md — script structure, the research findings, CBSE strategy, the market gap.references/curriculum.md — the 257-lesson map + the 12-video launch plan + how it was generated (a Workflow fan-out, one agent per class).assets/root_buddy.py (opens in a new tab)assets/scene_template.py (opens in a new tab)references/animation-craft.md (opens in a new tab)references/curriculum.md (opens in a new tab)references/hindi-hinglish-cut.md (opens in a new tab)references/lucid-science-thumbnail-style.md (opens in a new tab)references/manim-pipeline.md (opens in a new tab)references/mascot-root.md (opens in a new tab)references/pedagogy-and-strategy.md (opens in a new tab)references/production-playbook.md (opens in a new tab)scripts/build_helpers.sh (opens in a new tab)scripts/sarvam_service.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub creatorghost/ghost-skills --plugin math-explainer-video