Communitygithub.com

MrRoam/explainer-video-skill

Create Chinese explainer videos, science videos, principle animations, or 3Blue1Brown-style video explanations. Use Codex to write scripts and storyboards, and leverage local Manim, Kokoro TTS, and FFmpeg to export MP4 and subtitles. Suitable for "make a video explaining X"; not used when only text explanations, static images, or simple video editing is needed.

What is explainer-video-skill?

This AI agent skill enables automatic creation of Chinese-language explainer videos, similar to the popular 3Blue1Brown style, using Codex as the AI agent platform. The skill generates both the narrative script and the corresponding animation code, then orchestrates local open-source tools—Manim for animation, Kokoro for Chinese TTS, and FFmpeg for video composition—to produce a completed MP4 video with SRT subtitles. It is designed for developers and educators who want to quickly produce one-minute, 720p, 30fps tutorial videos on a given topic without manual animation work. The skill follows a specific pipeline: check local dependencies (Python, FFmpeg, fonts, Kokoro model), initialize a project workspace via a setup script, then concurrently edit a lesson.json (for script and storyboard) and scene.py (for Manim animation code). After rendering a low-resolution preview to verify Chinese text, formulas, and timing, it produces the final video and supporting files. The skill prioritizes local execution and CPU-friendly inference, avoiding cloud APIs for TTS, and includes fallback options when TeX is unavailable.

Works with~Claude Code✓Codex CLI~Cursor
npx skills add MrRoam/explainer-video-skill

Ask in your favorite AI

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

Documentation

Chinese Explainer Video

Deliver a custom, playable video. Codex handles content and animation code; local tools handle TTS, rendering, and compositing. Defaults: Chinese language, beginner-friendly, about one minute, 720p, 30fps; user's current request takes precedence.

Defaults follow 3Blue1Brown's graphical reasoning approach: dark background, a small set of consistent accent colors, continuous graphical transformations, local magnification, and corresponding transformations between formulas and graphics. Build intuition first, then present the formula. Write original scripts and visuals for the current topic.

Reusable Tools

The local configuration is in runtime.local.json at the skill root directory, and can also be specified via EXPLAINER_RUNTIME or --runtime. First, check the Python, FFmpeg, TTS model, and available Chinese fonts in the configuration. If the configuration is missing, follow README.md to set up the existing environment or install missing dependencies. Do not set up persistent services or reinstall reusable environments just for a trial.

For first-time Windows installation, run scripts/setup.ps1 to automatically install required CPU dependencies, download the Chinese model, and save the local configuration. With a valid configuration, only check paths; the script does not install Python, TeX, or CUDA. If existing tools are in other directories, pass the corresponding environment and model paths to reuse them.

python "SKILL_DIR\scripts\init_project.py" --workspace "WORKSPACE" --name concept-video

SKILL_DIR is the current skill directory, WORKSPACE is the absolute path to the current workspace. The script only copies small templates, not dependencies. Source code is in outputs/concept-video-project, cache in work/explainer/concept-video. Use different names for multiple videos; reconfigure paths if tools are moved.

Writing and Production

Simultaneously modify lesson.json and scene.py in the project. The template uses a derivative example; just changing the title will not create a new topic. See references/pipeline.md for field definitions, storyboard synchronization, and execution commands.

Pick a specific problem and walk from example to principle. Each narration segment should correspond to an observable change, such as a point moving, a curve changing, a variable updating, or a relationship gradually revealing itself. State the conditions under which a mathematical conclusion holds. Ensure that subtitles, formulas, and numbers are consistent with the script. Fonts are taken from the local configuration; MathTex in the template requires TeX. If TeX is unavailable, switch to Text and geometric objects instead.

By default, use the local Kokoro Chinese version, CPU, and downloaded voices; no additional large models or speech APIs are needed. Rewrite mathematical symbols, LaTeX, and English terms in the narration to Chinese reading. First do a short segment preview, then generate the full video; do not automatically download all voices or switch TTS backends without prompt. Other audio can be integrated per references/pipeline.md.

Review and Delivery

First produce a low-resolution preview, check Chinese text, formulas, occlusions, and boundaries, then export the final video. Verify that narration is not silent, each segment is complete, and the ending is not truncated. The rendering script checks dimensions and timing synchronization; visual and audio require actual inspection.

Deliver MP4, SRT, the Chinese script, and reproducible source code. Place delivery files in the workspace outputs, intermediate files in work. Document the actual TTS backend used and any unresolved limitations; do not describe script success as user being satisfied with audio quality.

Related Skills