Communitygithub.com

science-explainer-video

Use this skill when the user wants to design, script, animate, mix audio for, or render a code-driven popular science or educational explainer video in the style of Claude Opus 5.5, Opus 5.6, or Fable 5.2 (HTML5/SVG/Canvas/Three.js motion graphics, kinetic typography, procedural SFX, and deterministic MP4 rendering via headless Chrome and FFmpeg).

What is science-explainer-video?

science-explainer-video is a Claude Code agent skill that use this skill when the user wants to design, script, animate, mix audio for, or render a code-driven popular science or educational explainer video in the style of Claude Opus 5.5, Opus 5.6, or Fable 5.2 (HTML5/SVG/Canvas/Three.js motion graphics, kinetic typography, procedural SFX, and deterministic MP4 rendering via headless Chrome and FFmpeg).

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SunIsAlex/science-explainer-video/tree/HEAD

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Science Explainer Video Production Skill

Create studio-grade, code-driven popular science and technical explainer videos without manual keyframing or external stock-SFX hunting. This workflow synthesizes the visual grammar, pacing, and deterministic engineering patterns observed in leading Opus 5.5, Opus 5.6, and Fable 5.2 explainers.

Path Note: In shell commands below, replace <skill-dir> with the directory containing this SKILL.md file.

Prerequisites & Local Toolchain

  • Node.js (node >= 22, native WebSocket) + local Chrome or Edge (used by render_video.mjs)
  • Python 3 with numpy + FFmpeg on PATH (used by mix_audio.py and render_video.mjs)

7-Phase Production Runbook

Phase 1: Concept & Core Mechanism Decomposition

  1. Distill the topic into one core "aha" surprise (a paradox, hidden scale, or mechanism).
  2. Choose one concrete visual metaphor that drives the explanation visually (e.g., a binary-search number line for bits, a warped calendar for exponential change, a torn-paper stage for black-hole radiation, or dividing cells for multicellularity).

Phase 2: Narrative Script & Timestamped Beat Sheet

  1. Follow the 5-act arc in motion-and-narrative-grammar.md (Hook → Mechanism → Stress Tests → Twist → Full-Circle Synthesis).
  2. Author a beats.json file (see demo_beats.json for schema) locking exact start/end timestamps, narration/bilingual subtitles, visual cues, and micro-SFX triggers (whoosh, pop, chime, tick, shatter, sub_drop, pencil_scratch).
  3. Keep scene durations tight: target 1.5s–4.5s per visual beat change so the frame never feels static.

Phase 3: Style Archetype Selection

Pick one empirically calibrated preset from style-presets.md:

  • obsidian-editorial — Deep #05070C cosmic/obsidian canvas, warm amber #E8B866 focal lines, serif editorial + bilingual subtitles (Opus 5.5 style).
  • paper-kinetic — Warm paper #F8F4F0 & obsidian #141518 flips, cobalt/crimson data cards, italic-serif + bold-sans typography (Opus 5.6 / Vox style).
  • storybook-tactile — Theatrical #2D293C frame, torn-paper cutouts, deterministic 8/12 fps stop-motion boil (Opus 5.5 paper-theater style).
  • dimensional-vector — High-saturation indigo/cobalt/teal (#190647, #2A7CD2), 2.5D parallax layers, glowing accents (Fable 5.2 / Kurzgesagt style).

Phase 4: Deterministic Web-Scene Authoring

Build a self-contained HTML scene (scene.html) using HTML/CSS/SVG/Canvas2D/Three.js that obeys the Deterministic Contract in motion-and-narrative-grammar.md:

  • Expose window.__VIDEO_META__ = { width, height, fps, duration }.
  • Expose window.__seekTo(timeSec) so every visual property is a pure function of timeSec.
  • Never rely on wall-clock Date.now(), setInterval, or unpaused CSS @keyframes during render.
  • Reference demo_scene.html as a clean starting template.

Phase 5: Visual Contact-Sheet QA Gate (Mandatory Before Full Render)

Run the renderer in contact-sheet mode (~2–4 seconds):

node <skill-dir>/scripts/render_video.mjs --input scene.html --contact-sheet qa_sheet.png

Inspect qa_sheet.png directly (e.g., via read_file) and verify:

  1. No text overlaps, clipped margins, or subtitle collisions with diagram labels.
  2. High figure-ground contrast and crisp typography across all beats.
  3. Clear visual progression from tile to tile (no dead/static stretches). Fix any layout or timing issues in scene.html and re-check before encoding video.

Phase 6: Audio, Voiceover & Procedural SFX Mixing

Synthesize beat-synced procedural SFX (and optionally mix --voice narration + --bgm music with automatic ducking and -14 LUFS normalization):

python <skill-dir>/scripts/mix_audio.py --beats beats.json --output audio.wav

Verify the output stream using ffmpeg -hide_banner -i audio.wav (or ffprobe if available).

Phase 7: Full Deterministic Render & Verification

Render the final H.264 MP4 (yuv420p, +faststart) with muxed audio:

node <skill-dir>/scripts/render_video.mjs --input scene.html --audio audio.wav --output final.mp4

Verify the output video dimensions, frame rate, pixel format (yuv420p), duration, and audio stream via ffmpeg -hide_banner -i final.mp4 (or ffprobe), and spot-check a contact sheet if any late edits were made.


Anti-Slop Craft Checklist

  • Visual mechanism over bullet lists: Every beat demonstrates a concept visually; text acts only as anchor, value label, or subtitle.
  • 1+1+1 Color discipline: One base ground, one primary accent, one alert/semantic accent—never rainbow gradients.
  • Deterministic window.__seekTo(t): Zero setInterval / wall-clock timing drift; safe at any capture speed.
  • Safe margins & bilingual clarity: At least 48px outer margin; subtitles occupy a dedicated bottom lane (bottom: 36–48px) clear of diagrams.
  • Contact-sheet verified: Every scene passes a 12/16-tile contact-sheet visual review before full render.
  • Audio-synced & loudness-normalized: Transitions carry subtle procedural SFX (whoosh/tick/chime) and final audio is normalized around -14 LUFS.

Related Skills