Agent skills for Manim to create 3Blue1Brown style animations.
npx skills add https://github.com/adithya-s-k/manim_skill --skill manimce-best-practicesInstallez cette compétence avec la CLI et commencez à utiliser le flux de travail SKILL.md dans votre espace de travail.
⚡ Quick Start: Add both Manim skills to your AI agent instantly:
npx skills add adithya-s-k/manim_skill
A comprehensive collection of best practices, patterns, and examples for both Manim Community Edition and ManimGL (3Blue1Brown's version). This repository provides battle-tested code examples and guidelines for creating mathematical animations.
https://github.com/user-attachments/assets/3cd398b7-7cc6-43c1-a6e9-20077be6b009
manim)manim CLIfrom manim import *manimgl)manimgl CLIfrom manimlib import *Important: These are separate, incompatible frameworks. Code written for one will not work with the other without modifications.
macOS:
brew install ffmpeg
Ubuntu/Debian:
sudo apt update
sudo apt install ffmpeg
Windows:
Download from https://ffmpeg.org/download.html and add to PATH
macOS:
brew install mactex
Ubuntu/Debian:
sudo apt install texlive-full
Windows:
Install MiKTeX from https://miktex.org/download
# Using pip
pip install manim
# Using uv (recommended for this project)
uv pip install manim
# Verify installation
manim --version
Documentation: https://docs.manim.community/
# Using pip
pip install manimgl
# Using uv (recommended for this project)
uv pip install manimgl
# Verify installation
manimgl --version
Additional macOS (ARM) requirement:
arch -arm64 brew install pkg-config cairo
This repository provides two AI Agent Skills that can be installed with a single command using skills.sh:
# Install Manim Community Edition best practices
npx skills add adithya-s-k/manim_skill/skills/manimce-best-practices
# Install ManimGL best practices
npx skills add adithya-s-k/manim_skill/skills/manimgl-best-practices
# Or install both
npx skills add adithya-s-k/manim_skill/skills/manimce-best-practices adithya-s-k/manim_skill/skills/manimgl-best-practices
Skills are reusable capabilities for AI coding agents. Once installed, your AI assistant (like Claude, GitHub Copilot, or Cursor) automatically gains access to:
The skills follow the Agent Skills open standard and work across multiple AI tools.
manimce-best-practices - Automatically loads when:
from manim import *manim CLI commandmanimgl-best-practices - Automatically loads when:
from manimlib import *manimgl CLI command.embed() or checkpoint_paste()manim_skill/
├── skills/
│ ├── manimce-best-practices/ # Manim Community Edition skills
│ │ ├── SKILL.md # Skill metadata
│ │ └── rules/ # Individual best practice guides
│ │ ├── animations.md
│ │ ├── scenes.md
│ │ ├── mobjects.md
│ │ └── ...
│ │
│ └── manimgl-best-practices/ # ManimGL skills
│ ├── SKILL.md
│ └── rules/
│ ├── animations.md
│ ├── 3d.md
│ ├── camera.md
│ └── ...
│
└── tests/
├── manimce/ # Tests for Community Edition
└── manimgl/ # Tests for ManimGL
Each .md file contains:
from manim import *
class BasicExample(Scene):
def construct(self):
circle = Circle()
circle.set_fill(BLUE, opacity=0.5)
circle.set_stroke(BLUE_E, width=4)
self.play(Create(circle))
self.wait()
Run it:
manim -pql scene.py BasicExample
# -p: preview after rendering
# -q: quality (l=low, m=medium, h=high)
from manimlib import *
class BasicExample(InteractiveScene):
def construct(self):
circle = Circle()
circle.set_fill(BLUE, opacity=0.5)
circle.set_stroke(BLUE_E, width=4)
self.play(ShowCreation(circle))
self.wait()
Run it:
manimgl scene.py BasicExample --write_file
# --write_file: save video output
# -s: skip to last frame
# -w: write file without opening
This repository includes comprehensive tests to ensure all code examples work correctly.
# Test all files
uv run python tests/manimce/test_all_skills.py
# Test specific file
uv run python tests/manimce/test_all_skills.py animations.md
# Run with multiple workers (faster)
uv run python tests/manimce/test_all_skills.py -j 4
# Test all files
uv run python tests/manimgl/test_all_skills.py
# Test specific file
uv run python tests/manimgl/test_all_skills.py 3d.md
# Run with multiple workers (use caution - can cause OOM)
uv run python tests/manimgl/test_all_skills.py -j 4
Note: Parallel testing with many workers can cause out-of-memory errors. Use 4-6 workers max, or test files individually.
| Feature | Manim Community | ManimGL |
|---|---|---|
| Import | from manim import * |
from manimlib import * |
| CLI Command | manim |
manimgl |
| Scene Base Class | Scene, MovingCameraScene |
Scene, InteractiveScene |
| Creation Animation | Create() |
ShowCreation() |
| Text Class | Text(), MathTex() |
Text(), Tex() |
| 3D Rendering | Limited | Full OpenGL support |
| Interactive Mode | No | Yes (-se flag, .embed()) |
| Camera Control | MovingCameraScene |
self.camera.frame |
| Configuration | Python config | YAML files |
| Color Constants | Same | Same + variations (e.g., BLUE_A, BLUE_E) |
Start with these guides in skills/manimce-best-practices/rules/:
Start with these guides in skills/manimgl-best-practices/rules/:
Found an issue with an example? Want to add a new best practice?
uv run python tests/<version>/test_all_skills.py <filename>This repository is licensed under the MIT License - see the LICENSE file for details.
Note: This license applies to the educational materials and code examples in this repository. The underlying Manim frameworks (Manim Community Edition and ManimGL) have their own respective licenses.
"Command not found: manim/manimgl"
pip list | grep manimpython -m manim or python -m manimlibLaTeX errors
manim --tex_template <template> with different templatescustom_defaults.yml for LaTeX configurationVideo won't play
-ql, -qm, -qh)ffmpeg -versionOut of Memory (parallel tests)
-j 2 or -j 4Import errors / wrong version
from manim import * → Manim Communityfrom manimlib import * → ManimGLpip uninstall manim manimgl manimlibThis repository exists thanks to the incredible work of:
Creator of the original Manim animation engine and the 3Blue1Brown YouTube channel. Grant's pioneering work in mathematical visualization has inspired millions of learners worldwide and created an entirely new paradigm for explaining complex concepts through programmatic animation. His commitment to open-source education and visual storytelling has fundamentally changed how mathematics is taught and understood.
Website: https://www.3blue1brown.com/
YouTube: https://www.youtube.com/@3blue1brown
Manim (ManimGL): https://github.com/3b1b/manim
The dedicated team and contributors who maintain Manim Community Edition, ensuring the framework remains accessible, well-documented, and actively developed. Their tireless efforts in creating comprehensive documentation, managing community support, and continuously improving the codebase have made mathematical animation accessible to educators, students, and creators everywhere.
Website: https://www.manim.community/
GitHub: https://github.com/ManimCommunity/manim
Discord: https://www.manim.community/discord/
Both frameworks represent countless hours of development, documentation, community support, and creative problem-solving. This repository simply aims to organize and share knowledge about these powerful tools. All credit for the underlying technology goes to Grant Sanderson and the Manim Community contributors.
Thank you for making mathematical beauty programmable and accessible to all. 🎓✨