Manim video

From HybridAIOne/hybridclaw · View interactive version

Manim video is an AI agent skill from the GitHub repository HybridAIOne/hybridclaw. Plan, script, render, and stitch Manim Community Edition videos in Python. Use when the user asks for animated math explanations, algorithm walkthroughs, equation derivations, technical concept videos, 3Blue1Brown-style explainers, or programmatic educational motion graphics.

How to use this skill

Skill file

Manim Video

Use this skill for Python-based Manim projects that need a clean planning phase, strong visual direction, reusable scene structure, and a deterministic render pipeline.

The output contract is usually a workspace project directory containing plan.md, script.py, concat.txt, draft renders, and optionally a stitched final.mp4.

Creative Standard

This is educational cinema, not animated slides.

Modes

| Mode | Input | Output | Primary references |

|------|-------|--------|--------------------|

| Concept explainer | topic or feature | intuitive multi-scene explainer | scene-planning.md, visual-design.md |

| Equation derivation | symbolic expression or proof goal | stepwise animated derivation | equations.md, python-patterns.md |

| Algorithm visualization | algorithm or invariant | stepwise state evolution | graphs-and-data.md, python-patterns.md |

| Data story | metrics, counters, or comparisons | animated charts and deltas | graphs-and-data.md, visual-design.md |

| Architecture diagram | system or service flow | progressive build with data flow | scene-planning.md, python-patterns.md |

| Paper explainer | paper, abstract, or finding | hook -> method -> evidence explainer | scene-planning.md, visual-design.md |

| Camera or 3D explainer | spatial or geometric topic | moving-camera or 3D scene set | camera-and-3d.md, visual-design.md |

Stack

Single Python script per project. No browser, no Node.js, no GPU requirement.

| Layer | Tool | Purpose |

|-------|------|---------|

| Core | Manim Community Edition | scene rendering and animation engine |

| Math | LaTeX via MathTex / Tex | equation rendering |

| Video I/O | ffmpeg | stitching, muxing, and format conversion |

| Narration | subtitles by default, voiceover optional | accessibility and pacing |

| Setup check | check_setup.py | host capability validation and install hints |

Pipeline

PLAN --> CODE --> RENDER --> STITCH --> AUDIO --> REVIEW

Creative Direction

Color Palettes

| Palette | Background | Primary | Secondary | Accent | Use case |

|---------|------------|---------|-----------|--------|----------|

| HybridClaw Dark | #0B1220 | #7DA2FF | #9AB6FF | #7EE3A5 | default for systems, tools, and architecture |

| HybridClaw Light | #F8FAFC | #4A6CF7 | #3657E9 | #15803D | brighter docs-style explainer look |

| HybridClaw Neutral | #111827 | #E5EDF7 | #93A4B8 | #7DA2FF | minimal or formal topics |

Start with a HybridClaw palette unless the user explicitly asks for a different visual language.

Animation Speed

| Context | Typical run_time | Typical self.wait() after |

|---------|--------------------|-----------------------------|

| Title or intro hook | 1.2-1.8s | 0.8-1.2s |

| Key equation or mechanism reveal | 1.8-2.2s | 1.5-2.5s |

| Transform or morph | 1.2-1.8s | 1.0-1.5s |

| Supporting annotation | 0.6-1.0s | 0.3-0.6s |

| Fade-out cleanup | 0.4-0.7s | 0.2-0.4s |

| Aha moment | 2.0-2.8s | 2.0-3.0s |

Typography Scale

| Role | Font size | Usage |

|------|-----------|-------|

| Title | 34-38 | scene titles and opening claims |

| Heading | 28-32 | section headers within a scene |

| Body | 20-24 | explanatory text |

| Label | 18-20 | annotations, axis labels, component names |

| Caption | 18 | subtitles and supporting notes |

Font Rules

| Text type | Default choice | Notes |

|-----------|----------------|-------|

| Titles and sentence copy | Text(..., font=SANS) | prefer a clean sans like SANS = "Avenir Next" or another installed equivalent |

| Styled inline emphasis | MarkupText(..., font=SANS) | best for colored spans or bold fragments |

| Code-like labels | Text(..., font=MONO) | use MONO = "Menlo" only for identifiers, commands, chips, or short technical tags |

| Math | MathTex(...) / Tex(...) | requires LaTeX |

Minimum readable text size is font_size=18.

Text density rules:

Performance Targets

| Quality | Resolution | FPS | Use case |

|---------|------------|-----|----------|

| -ql | 854x480 | 15 | draft iteration and timing checks |

| -qm | 1280x720 | 30 | text-heavy preview and layout review |

| -qh | 1920x1080 | 60 | production export only |

Default Workflow

  1. Run the bundled setup check first:
python3 skills/manim-video/scripts/check_setup.py

Treat the setup check as advisory by default. Missing manim, ffmpeg, or pdflatex should stop render commands, but it must not stop planning or script editing.

  1. If the user wants a new project, create the target directory and write plan.md, script.py, and concat.txt directly. Preserve the exact requested output path.
  2. Fill in plan.md before heavy coding. Read references/scene-planning.md and references/visual-design.md when the narrative, pacing, or screen layout is still fuzzy. When the user already gave a topic, draft the audience, teaching objective, misconception, aha moment, narrative arc, palette, typography, subtitle strategy, and scene beats yourself instead of asking the user to fill placeholders.
  3. Keep reference loading small. For a normal request, start with only these core references:

Read at most 3 references before the first draft of script.py. Do not bulk-read the whole reference folder.

  1. Add only one specialty reference when the task actually needs it:
  1. Read stage-specific references only when you reach that stage:
  1. Implement script.py with one Scene subclass per clip. Use shared constants for palette, typography, and timing. Put subtitles on significant animations, keep scene exits clean, and make every scene independently renderable.
  2. For ordinary requests like "create a short animation explaining X", do not stop after planning and scripting when rendering is available. Produce a draft render in the same turn: render all scene classes at -ql, update concat.txt, and stitch a draft video if ffmpeg is available. Render is part of the normal pipeline, not an optional next step.
  3. Use manim ... as the default render entry point. A global manim CLI from uv tool install manim is fine. Fall back to python3 -m manim ... only when Manim is installed into the host interpreter but the CLI is unavailable.
  4. Before production render, run the production checklist in references/production-quality.md. Use -qh only when the user explicitly asks for a final or high-quality export. For the default one-turn path, a stitched draft render is the finish line. Use references/rendering.md for the exact command shapes.

If required tools are missing, the fallback is still useful:

Working Rules

Common Commands

Setup check:

python3 skills/manim-video/scripts/check_setup.py

Strict render gate:

python3 skills/manim-video/scripts/check_setup.py --strict

Install Manim globally with uv:

uv tool install manim

LaTeX install hints for MathTex and Tex:

brew install --cask mactex-no-gui
sudo apt install texlive-full
sudo dnf install texlive-scheme-full

Create a new project directory:

mkdir -p my-video
cd my-video

Render a draft:

cd my-video
manim -ql script.py Scene1Introduction Scene2Invariant

Host-Python fallback render:

cd my-video
python3 -m manim -ql script.py Scene1Introduction Scene2Invariant

Host-CLI fallback render:

cd my-video
manim -ql script.py Scene1Introduction Scene2Invariant

Preview a still frame:

cd my-video
manim -s -ql script.py Scene2Invariant

Stitch clips:

ffmpeg -y -f concat -safe 0 -i concat.txt -c copy final.mp4

References

Validation

Run:

python3 skills/skill-creator/scripts/quick_validate.py skills/manim-video
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.