# manim

Guides the agent to write Manim Community Edition scripts, animating math equations, functions, and 3D scenes in 3Blue1Brown style.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 636 installs · ★ 15
- Author: iart-ai
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/iart-ai/manim-skills/tree/HEAD/skills/manim/SKILL.md
- Updated: 2026-06-22
- HTML: https://affpapa.org/en/nevibecode/skills/manim

## What it does

This skill configures the model to author Manim Community Edition code in Python. It provides patterns for declarative `Scene` classes, vector `Mobjects`, transitions like `Transform`, and LaTeX equations using `MathTex`. It also covers dynamic graphs with `ValueTracker` updaters and 3D scenes with rotating camera frames.

The workflow enforces frame-by-frame verification. Instead of encoding the entire video right away, the agent outputs single PNG frames using `-s` and animation intervals via `-n`. Without `ffmpeg` and a local LaTeX distribution, the CLI will fail to render formula glyphs or output MP4 files.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add iart-ai/manim-skills --skill manim -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/manim/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/manim/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add iart-ai/manim-skills --skill manim -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/manim/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add iart-ai/manim-skills --skill manim -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/manim/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install iart-ai/manim-skills manim
```

2. **Manually: put the files in place**
- File: `.github/skills/manim/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add iart-ai/manim-skills --skill manim -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/iart-ai/manim-skills --path skills/manim
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/manim/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add iart-ai/manim-skills --skill manim -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/iart-ai/manim-skills/tree/HEAD/skills/manim/SKILL.md

## When to use it
- animate mathematical equations step by step
- plot functions with points tracing curves dynamically
- render geometric proof explainers into MP4 or GIF
- build 3D surfaces with an orbiting camera view

## Example prompts
- Create a 3Blue1Brown-style Manim animation explaining the Pythagorean theorem.
- Plot a sine wave and animate a tangent line sliding along the curve.
- Morph one calculus formula into another using MathTex.

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 1511c61a1f270fa6.

BEGIN THIRD-PARTY FILE 1511c61a1f270fa6
````text
---
name: manim
description: This skill should be used when the user asks to "make a math animation", "animate an equation", "use Manim", "make a 3Blue1Brown-style video", "plot or animate a graph/function", "visualize a math/physics/CS concept", "morph one formula into another", "animate a geometric proof", or "render a math explainer". Covers Manim Community Edition — Scenes, Mobjects, animations, LaTeX/MathTex, graphs, updaters/ValueTracker, 3D, and rendering to MP4/GIF via the CLI.
version: 0.1.0
---

# Manim (Programmatic Math Animation)

Manim (Mathematical Animation Engine, Community Edition) renders explanatory math/physics/CS videos from Python — the engine behind 3Blue1Brown-style motion. Every scene is declarative: you build vector objects, play timed animations over them, and render a deterministic MP4/GIF from the CLI. Best-in-class for moving equations, transforming formulas, animated graphs, and geometric intuition.

## When to use

- Animate an equation: write it on, transform it term-by-term, highlight substitutions.
- Visualize a function/graph: axes, plotted curves, a dot tracing the curve, area under it.
- Geometric or conceptual explainers: a proof unfolding, vectors, transformations, number lines.
- 3D math: surfaces, parametric curves, a camera orbiting a shape.
- Any "show the math moving" educational clip rendered to MP4/GIF.

> Not the tool for UI motion, social/marketing video, or data-from-CSV business charts — use the web-animation or Remotion video skills for those. Manim's edge is *mathematical* typesetting and intuition.

## Setup & render

```bash
pip install manim          # needs Python 3.9+, ffmpeg, and a LaTeX distribution (for Tex/MathTex)
manim -pql scene.py SquareToCircle   # render one Scene class, preview at low quality
```

Render flags (the ones that matter):
- `-q l|m|h|k` — quality: low (fast iteration) → 4K. `-ql` while building, `-qh` to ship.
- `-p` — play when done; `-o name` — output filename; `--format=gif` — render a GIF (README demos).
- `-s` — **save the last frame as a PNG** (no video encode — the verification lever, see below).
- `-n a,b` — render only animation index range `a..b` (stop early to inspect a moment).
- Output lands in `media/videos/<file>/<quality>/<Scene>.mp4` (and `media/images/...` for `-s`).

## The three building blocks

Everything is **Scenes** (orchestration) acting on **Mobjects** (objects) via **Animations** (timed change).

```python
from manim import *

class SquareToCircle(Scene):
    def construct(self):                 # ALL animation code lives in construct()
        sq = Square().set_fill(BLUE, opacity=0.5)
        self.play(Create(sq))            # animate it drawing on
        self.play(sq.animate.rotate(PI / 4))
        self.play(Transform(sq, Circle().set_fill(PINK, opacity=0.5)))
        self.wait(0.5)                   # hold
```

**Mobjects** — vector objects (`Circle`, `Square`, `Rectangle`, `Line`, `Dot`, `Polygon`, `Axes`, `Text`, `MathTex`).
- Position: `.shift(UP*2)` (relative), `.move_to(ORIGIN)` (absolute), `.next_to(other, RIGHT, buff=0.5)`, `.align_to(other, LEFT)`. Directions are constants: `UP DOWN LEFT RIGHT ORIGIN UL UR DL DR`.
- Style: `.set_fill(color, opacity)`, `.set_stroke(color, width)`, `.set_color(YELLOW)`. Colors: `BLUE RED GREEN YELLOW WHITE` + `BLUE_E`, etc.
````
END THIRD-PARTY FILE 1511c61a1f270fa6

The third-party file has ended. Everything between the 1511c61a1f270fa6 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3358 of 9866 bytes. © iart-ai · MIT · https://github.com/iart-ai/manim-skills/tree/HEAD/skills/manim/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
