Skip to content

Repository files navigation

manim-skill

manim-skill

Turn ideas, papers, and math into Manim animations — via a 4-role Claude Code agent pipeline.

Pythagoras visual proof — sample 01
Hero GIF is generated by samples/build-samples.ps1 after install. Sample 01 ↑.

License Plugin version Manim Python


Table of contents

  1. Overview
  2. Prerequisites
  3. Installation (Windows / PowerShell)
  4. Verification
  5. Usage
  6. Flag reference
  7. Architecture
  8. Samples
  9. Project layout
  10. Troubleshooting
  11. Other platforms
  12. Contributing
  13. License

Overview

manim-skill is a Claude Code plugin that orchestrates a four-role agent pipeline to turn a topic, a research paper, or a math concept into a rendered animation built on Manim Community.

Who it is for Educators producing explainer videos · researchers visualizing a paper's main result · anyone who would rather describe a video than program one frame at a time
Who it is not for Frame-perfect motion-graphics editing · live-action video · 3D modelling pipelines (use Remotion or Blender)
Slash command /manim-skill:manim-video (namespaced — tab-completion in Claude Code surfaces it once installed)
Output out/<run-id>/video.mp4 plus storyboard.yaml, per-scene .py, narration script, and summary.md

Prerequisites

Required before Step 2 of the install:

Component Version Notes
Windows 10 / 11 PowerShell 5.1 or PowerShell 7+ both work
Python 3.11+ uv will install it for you if missing
Claude Code latest needed for /plugin slash commands
Git any recent needed for marketplace fetch

Optional but recommended:

Tool Why Install
MSVC Build Tools Required only if pycairo wheel is unavailable for your Python https://visualstudio.microsoft.com/downloads/ · workload: Desktop development with C++
MiKTeX Enables MathTex / Tex. Without it, math falls back to plain Text and renders empty silently https://miktex.org/download
ffmpeg Bundled with Manim's wheel on most installs. Verify with ffmpeg -version if --voice mixing fails https://www.gyan.dev/ffmpeg/builds/

Installation (Windows / PowerShell)

The plugin install (Step 1) ships only agent prompts, the slash command, schemas, and scripts. It does not install Manim or any Python dependency. Step 2 is mandatory on every new machine — without it, the implementer agent fails with ModuleNotFoundError: manim on the first render.

Step 1 — Install the plugin

Inside Claude Code:

/plugin marketplace add vumichien/manim-skill
/plugin install manim-skill@manim-video-marketplace

The plugin lands at:

%USERPROFILE%\.claude\plugins\cache\manim-video-marketplace\manim-skill\0.1.0\

The venv created in Step 2 will live at <plugin-root>\.venv\ — next to install.ps1, not in your project directory.

Step 2 — Bootstrap the Python venv

Open PowerShell:

# Pin the plugin path
$plugin = "$env:USERPROFILE\.claude\plugins\cache\manim-video-marketplace\manim-skill\0.1.0"

# Allow scripts for this session only (skip if execution policy already permits)
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

# Run the installer
pwsh "$plugin\scripts\install.ps1"

What the installer does:

  1. Installs uv via astral.sh/uv/install.ps1 if it is not on PATH.
  2. Creates .venv\ with Python 3.11 at <plugin-root>\.venv\.
  3. Installs manim, pycairo, numpy, voiceover deps, and ingest deps from scripts\requirements.txt.
  4. Probes for xelatex and prints a warning if missing.
  5. Runs check-env.py to verify imports.

If pycairo fails, the installer prints two remediation paths (MSVC Build Tools or Conda). See Troubleshooting.

Step 3 — Activate the venv before launching Claude Code

The implementer agent calls bare python -m manim. That python must resolve to the plugin's venv, otherwise the system Python (no manim) wins.

& "$plugin\.venv\Scripts\Activate.ps1"
claude   # or however you launch Claude Code

Make activation persistent — add to your $PROFILE:

$env:MANIM_PLUGIN = "$env:USERPROFILE\.claude\plugins\cache\manim-video-marketplace\manim-skill\0.1.0"
& "$env:MANIM_PLUGIN\.venv\Scripts\Activate.ps1"

After a plugin version bump (0.1.00.2.0), re-run Step 2 against the new versioned folder. The old .venv does not auto-migrate.


Verification

Render the six reference samples to confirm the install works end-to-end:

pwsh "$plugin\samples\build-samples.ps1"

Outputs land at samples\NN-*\out.mp4. If sample 01 (Pythagoras) renders, your env is ready.


Usage

/manim-skill:manim-video --idea "Why is the sky blue?"
/manim-skill:manim-video --idea "Why is the sky blue?" --no-voice
/manim-skill:manim-video --paper 1706.03762 --voice openai --quality high
/manim-skill:manim-video --math "Fourier series" --transition-s 1.0

Default behavior (since 0.2.0): gtts voiceover + chrome (header bar + title cards) + cross-fade transitions + auto-generated captions. Pass --no-voice for the silent + caption-only path; --no-chrome for bare scenes.

See docs/storyboard-migration-0.2.0.md for the 0.1.x → 0.2.0 migration guide.


Flag reference

/manim-skill:manim-video --idea "<topic>" | --paper <id-or-url> | --math "<topic>"
                         [--voice gtts|openai|elevenlabs] [--no-voice]
                         [--no-chrome] [--transition-s 0.7]
                         [--quality low|medium|high|4k] [--storyboard-only] [--out <dir>]
Flag Argument Default Notes
--idea "<topic>" Pure topic input.
--paper <arxiv-id|url|path> Auto-detects arXiv id, PDF (local/URL), or HTML.
--math "<topic>" Math specialization. Uses MathTex if LaTeX is present.
--voice gtts|openai|elevenlabs gtts Default flipped to gtts in 0.2.0. Paid providers need env vars.
--no-voice (flag) off Opt out of TTS. Captions still render. Mutex with --voice.
--no-chrome (flag) off Disable header bar + title cards. Captions still render.
--transition-s <float> 0.7 Cross-fade duration between scenes; range 0.3–1.5.
--quality low|medium|high|4k high high = 1080p60.
--storyboard-only (flag) off Stop after planning; skip render.
--out <dir> out/<run-id>/ Override output directory.
--optimize <corpus.yaml> Power-user: tune agent prompts via GEPA against your own corpus. See REPRODUCE.md.

Full semantics: skills/manim-video/references/flag-reference.md.


Architecture

flowchart LR
  U[User: /manim-skill:manim-video --idea X] --> M(Main agent)
  M -->|spawn parallel| R[manim-researcher]
  M -->|spawn parallel| P1[manim-planner skeleton]
  R --> O[outline.md]
  P1 --> D[storyboard.draft.yaml]
  O & D --> P2[manim-planner final]
  P2 --> S[storyboard.yaml]
  S --> I[manim-implementer]
  I --> V[video.mp4]
  V --> M
  M --> SU[summary.md]
Loading
Role Responsibility
Researcher Distills source material into an outline of key concepts and visual beats.
Planner Runs twice — first as a skeleton (parallel with the researcher), then a final reconciled storyboard.yaml that validates against schemas/storyboard.schema.json.
Implementer Translates the storyboard into Manim Python, runs scripts/render.py per scene, and self-repairs render failures within a fixed retry budget.
Main Writes summary.md with paths, render timings, and any per-scene errors.

Full orchestration recipe: skills/manim-video/SKILL.md.


Samples

Six reference animations cover the core Manim surface area. Each ships with its storyboard.yaml, hand-coded scene.py, and (after build-samples) a thumbnail + mp4.


Pythagoras 2D

Polygon · Square · LaggedStart

Rotating cube

ThreeDScene · Cube · Rotate

Fourier math

MathTex · ReplacementTransform · LaTeX

Quadratic plot

Axes · plot lambda

Text morph

Text · ReplacementTransform · FadeOut

Sine wave tracker

NumberPlane · ValueTracker · always_redraw

Full index: samples/README.md.


Project layout

manim-skill/
├── .claude-plugin/         marketplace.json + plugin.json (publishing manifests)
├── agents/                 manim-researcher.md, manim-planner.md, manim-implementer.md
├── assets/                 logo + hero GIF
├── commands/               /manim-skill:manim-video slash-command entrypoint
├── samples/                6 reference animations (storyboard + scene.py + mp4 + thumb)
├── schemas/                storyboard.schema.json (canonical contract)
├── scripts/                install + ingest + validate + render runners
├── skills/manim-video/     SKILL.md + references/
├── tests/                  pytest suite (validators, render smoke, sample integrity)
├── LICENSE                 Apache-2.0
├── pyproject.toml
└── README.md               (you are here)

Troubleshooting

pycairo build fails on Step 2

Two remediation paths. Pick one and re-run Step 2.

Option A — install MSVC Build Tools:

  1. Download from https://visualstudio.microsoft.com/downloads/.
  2. Select workload Desktop development with C++.
  3. Restart PowerShell, re-run pwsh "$plugin\scripts\install.ps1".

Option B — use Conda (skips native compile entirely):

conda create -n manim python=3.11 -y
conda activate manim
conda install -c conda-forge manim -y
pip install -r "$plugin\scripts\requirements.txt"

ModuleNotFoundError: manim when running /manim-skill:manim-video

The venv is not activated in the shell that launched Claude Code. Run Step 3 again, or add the activation snippet to your $PROFILE.

MathTex renders empty / silent failure

xelatex not on PATH. Install MiKTeX, restart PowerShell, retry. Or omit --math and use --idea.

Execution policy blocks install.ps1

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

This affects the current PowerShell session only — does not change system policy.

Plugin version bumped, old venv stale

Re-run Step 2 against the new versioned folder. Optionally delete <old-plugin-root>\.venv\ to free disk.


Other platforms

Linux / macOS

# 1. Inside Claude Code
/plugin marketplace add vumichien/manim-skill
/plugin install manim-skill@manim-video-marketplace

# 2. Bootstrap the venv
PLUGIN="$HOME/.claude/plugins/cache/manim-video-marketplace/manim-skill/0.1.0"
bash "$PLUGIN/scripts/install.sh"

# 3. Activate
source "$PLUGIN/.venv/bin/activate"

# 4. Make a video
/manim-skill:manim-video --idea "Why is the sky blue?"

Developing on a clone (not via marketplace)

pwsh scripts\install.ps1                # Windows
& .venv\Scripts\Activate.ps1
bash scripts/install.sh                 # Linux / macOS
source .venv/bin/activate

The venv lands at <repo-root>\.venv\ instead of the plugin cache.


Contributing

PRs welcome. Quick conventions:

  • Python ≥3.11. Run ruff check . + pytest before pushing (CI enforces both).
  • Kebab-case for executable scripts (scripts/render.py), snake_case for importable modules (scripts/ingest_shared.py).
  • New samples go under samples/NN-<slug>/: write storyboard.yaml first (validate with python scripts/validate-storyboard.py), then a hand-coded scene.py, then add the entry to samples/build-samples.{ps1,sh}.
  • Conventional Commits. No AI references in commit messages.

License

Apache-2.0. See LICENSE.


Acknowledgements

manim-skill stands on the shoulders of several open-source projects:

  • Manim Community — the animation engine that turns storyboards into video. Apache-2.0.
  • manim-voiceover — gtts / OpenAI / ElevenLabs voiceover integration.
  • GEPA (Agrawal et al., 2025) — the reflective prompt-evolution framework used offline to tune the 4-role agent prompts. MIT. See REPRODUCE.md for the step-by-step guide to running optimization yourself.
  • DSPy — the conceptual ancestor of GEPA and the Stanford NLP work on programmatic LM pipelines.
  • Claude Code — the agent runtime that hosts this skill.
  • arxiv, pymupdf4llm, trafilatura — the ingest stack.

Citation

If manim-skill shows up in your paper, blog post, or course, the canonical citation is in CITATION.cff (GitHub renders it as a "Cite this repository" widget). BibTeX:

@software{manim_skill_2026,
  author  = {Vu, Chien},
  title   = {manim-skill: A 4-role Agent Pipeline for Manim Animations},
  year    = 2026,
  version = {0.3.0},
  url     = {https://github.com/vumichien/manim-skill},
  license = {Apache-2.0}
}

@misc{agrawal2025gepa,
  title         = {GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning},
  author        = {Lakshya A. Agrawal and Shangyin Tan and Dilara Soylu and Omar Khattab},
  year          = 2025,
  eprint        = {2507.19457},
  archivePrefix = {arXiv},
  primaryClass  = {cs.LG}
}

Disclaimer

This project is provided AS IS under the Apache-2.0 license. The author is not affiliated with Anthropic, the Manim Community, the GEPA authors, DSPy, Stanford NLP, or any other organisation referenced in this README. References to those projects exist purely to attribute the open-source dependencies that make this plugin possible. Trademarks and product names belong to their respective owners.

This is not a Manim Community release, an Anthropic release, or a Stanford NLP release. Bugs you find here belong here — open an issue at https://github.com/vumichien/manim-skill/issues rather than upstream.

About

Turn ideas, papers, and math into Manim animations via a 4-role Claude Code agent pipeline.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages