# Manim

> Use when the user wants to create mathematical animations, research paper explainer videos, equation derivations, 3D visualizations, or any programmatic animation with Manim. Also trigger when the user mentions "3Blue1Brown style", "animate this equation", "explain this paper visually", or wants to render LaTeX equations as video.

- **Type:** Skill
- **Install:** `agentstack add skill-amitsubhash-3brown1blue-skill`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [AmitSubhash](https://agentstack.voostack.com/s/amitsubhash)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [AmitSubhash](https://github.com/AmitSubhash)
- **Source:** https://github.com/AmitSubhash/3brown1blue/tree/main/src/three_b1b/skill

## Install

```sh
agentstack add skill-amitsubhash-3brown1blue-skill
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## When to use

Trigger this skill when:
- User wants to create a mathematical animation or render an equation as video
- User asks to explain a research paper visually or create an explainer video
- User mentions Manim, 3Blue1Brown, or mathematical visualization
- User wants to animate a derivation, diagram, pipeline, or architecture
- User needs Remotion + Manim integration for a production video

**Default to Manim Community Edition** (`pip install manim`) unless the user specifically needs ManimGL's interactive features.

## Gotchas (read these first)

These are the most common failures. Load [rules/troubleshooting.md](rules/troubleshooting.md) for the full list.

1. **`Create(Text(...))` looks wrong** -- use `Write()` for text. `Create()` traces outlines.
2. **Arrow with `interpolate_color()` crashes** -- use a plain color constant, adjust opacity separately.
3. **`Brace.get_text("label", font_size=24)` crashes** -- create `Tex` separately, use `brace.put_at_tip()`.
4. **`MathTex(r"$E=mc^2$")` crashes** -- MathTex is already math mode. Drop the `$`. Use `Tex` for mixed text+math.
5. **`Transform(A, B)` then animating B does nothing** -- B was never added. Use `ReplacementTransform`.
6. **Chained `Transform(a,b)` then `Transform(a,c)`** -- a is still the scene object. b and c are ghosts. Use `ReplacementTransform` each step.
7. **`LaggedStartMap(Write, group)` crashes** -- use `LaggedStart(*[Write(m) for m in group])`.
8. **Updaters freeze during `self.wait()`** -- add `frozen_frame=False`.
9. **`.animate.shift(R).scale(2)` != `.animate.scale(2).shift(R)`** -- chain order matters after scaling.
10. **`get_part_by_tex("missing")` returns None silently** -- check before calling `.set_color()` on the result.
11. **`reference = mob` is NOT a copy** -- use `mob.copy()` for independent objects.
12. **Transparent background** -- mp4 has no alpha. Use `--format webm -t`.
13. **`VGroup.add(mob.animate.move_to(...))` crashes** -- `.animate` returns an `_AnimationBuilder`, not a VMobject. Only use `.animate` inside `self.play()`.
14. **`Group.save_state()` crashes** -- `Group` does not support `save_state()`/`restore()`. Convert to `VGroup` first, or manually store and restore positions.

## Scripts and Templates

Claude can copy and adapt these starter files instead of writing from scratch:

- [scripts/safe_manim.py](scripts/safe_manim.py) -- drop-in wrappers that prevent the 6 crash gotchas (import instead of raw Manim calls)
- [scripts/render_scene.sh](scripts/render_scene.sh) -- render a single scene with quality selection
- [templates/style.py](templates/style.py) -- shared color palette and helper functions for any project
- [templates/equation_explainer.py](templates/equation_explainer.py) -- dim-and-reveal equation scene template
- [templates/paper_explainer.py](templates/paper_explainer.py) -- 5-section paper explainer scaffold

## Quick Start

```python
from manim import *

class MyScene(Scene):
    def construct(self):
        eq = MathTex(r"e^{i\pi} + 1 = 0")
        self.play(Write(eq))
        self.wait()
```

```bash
manim -pql scene.py MyScene    # preview, low quality (fast)
manim -pqh scene.py MyScene    # preview, high quality (1080p)
```

## Rule Files

Load the relevant rule file for the task at hand. Claude should read only what it needs, not all files at once.

### Core (read first if unfamiliar with Manim)
- [rules/first-scene-tutorial.md](rules/first-scene-tutorial.md) -- install, hello world, render commands
- [rules/mobjects.md](rules/mobjects.md) -- Mobject hierarchy, positioning, styling, VGroup
- [rules/animations.md](rules/animations.md) -- animation lifecycle, Transform, rate functions, composition
- [rules/scene-lifecycle.md](rules/scene-lifecycle.md) -- Scene types, construct(), play/wait/add/remove

### Equations and Math
- [rules/equations.md](rules/equations.md) -- MathTex, submobjects, {{ }} notation, TransformMatchingTex
- [rules/equation-derivations.md](rules/equation-derivations.md) -- dim-and-reveal, step-by-step, worked examples
- [rules/graphs-plots.md](rules/graphs-plots.md) -- Axes, plots, parametric curves, BarChart
- [rules/matrices-linalg.md](rules/matrices-linalg.md) -- Matrix, linear transformations
- [rules/decorations.md](rules/decorations.md) -- SurroundingRectangle, Brace, Arrow annotations

### Dynamic and 3D
- [rules/updaters-trackers.md](rules/updaters-trackers.md) -- ValueTracker, add_updater, always_redraw
- [rules/three-d.md](rules/three-d.md) -- ThreeDScene, camera angles, surfaces, 3D shapes
- [rules/moving-camera.md](rules/moving-camera.md) -- MovingCameraScene, zoom, pan, follow

### Visual Design (read for any explainer video)
- [rules/explanation-design.md](rules/explanation-design.md) -- **READ FIRST when deciding scene CONTENT.** Three principles for designing the explanation itself, from Grant Sanderson's "Designing Math" talk: ask "what does it look like?", give every symbol a motivation, motivate with the most surprising application. One object, several representations, one question each.
- [rules/pedagogy-checklist.md](rules/pedagogy-checklist.md) -- A checklist for judging when an explanation is pedagogically done, not just rigorous, from Grant Sanderson's JMM 2023 award lecture and the SoME rubric: motivating example before each definition, rediscoverable proofs, concrete before abstract, a problem before instruction, raise the ceiling while lowering the floor.
- [rules/visual-design-principles.md](rules/visual-design-principles.md) -- **17 core principles** from Tufte, Bret Victor, 3Blue1Brown: opacity layering, persistent context, geometry before algebra, question frames, concrete values, density ramp, monospace text
- [rules/visual-design-catalog.md](rules/visual-design-catalog.md) -- **35 implementable patterns** from 3b1b frame analysis + production learnings: probability sidebars, skip arcs, grid fills, interactive sliders, heatmaps, live pipeline data flow, linked dual panels, camera zoom detail, and more

### Video Production
- [rules/scene-planning.md](rules/scene-planning.md) -- **START HERE for multi-scene videos.** Layout templates, scene plans, agent prompt structure, style.py contract
- [rules/paper-explainer.md](rules/paper-explainer.md) -- explainer video structure, domain patterns
- [rules/production-quality.md](rules/production-quality.md) -- spatial layout, alignment, container bounds, data viz minimums, pre/post-render quality checks
- [rules/voiceover.md](rules/voiceover.md) -- voiceover backends, teaching text, beat-aware narration, CLI workflow
- [rules/animation-design-thinking.md](rules/animation-design-thinking.md) -- pacing, narration sync, animate vs static
- [rules/project-organization.md](rules/project-organization.md) -- multi-scene projects, style.py, render scripts
- [rules/remotion-integration.md](rules/remotion-integration.md) -- Manim + Remotion pipeline

### Reference
- [rules/config-rendering.md](rules/config-rendering.md) -- quality presets, CLI flags, output formats
- [rules/color-palettes.md](rules/color-palettes.md) -- accessible palettes, color operations
- [rules/troubleshooting.md](rules/troubleshooting.md) -- common errors and fixes
- [rules/manimgl-differences.md](rules/manimgl-differences.md) -- CE vs ManimGL comparison

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [AmitSubhash](https://github.com/AmitSubhash)
- **Source:** [AmitSubhash/3brown1blue](https://github.com/AmitSubhash/3brown1blue)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-amitsubhash-3brown1blue-skill
- Seller: https://agentstack.voostack.com/s/amitsubhash
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
