Agent skill

manim

Comprehensive guide for Manim Community - Python framework for creating mathematical animations and educational videos with programmatic control

Stars 23,776
Forks 2,298

Install this agent skill to your Project

npx add-skill https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/video/manim

SKILL.md

Manim Community - Mathematical Animation Engine

Comprehensive skill set for creating mathematical animations using Manim Community, a Python framework for creating explanatory math videos programmatically, popularized by 3Blue1Brown.

When to use

Use this skill whenever you are dealing with Manim code to obtain domain-specific knowledge about:

  • Creating mathematical animations and visualizations
  • Building educational video content programmatically
  • Working with geometric shapes and transformations
  • Animating LaTeX equations and mathematical formulas
  • Creating graphs, charts, and coordinate systems
  • Implementing scene-based animation sequences
  • Rendering high-quality mathematical diagrams
  • Building explanatory visual content for teaching

Core Concepts

Manim allows you to create animations using:

  • Scenes: Canvas for your animations where you orchestrate mobjects
  • Mobjects: Mathematical objects that can be displayed (shapes, text, equations)
  • Animations: Transformations applied to mobjects (Write, Create, Transform, FadeIn)
  • Transforms: Morphing between different states of mobjects
  • LaTeX Integration: Native support for rendering mathematical notation
  • Python Simplicity: Use Python to programmatically specify animation behavior

Key Features

  • Precise mathematical object positioning and transformations
  • Native LaTeX rendering for equations and formulas
  • Extensive shape library (circles, rectangles, arrows, polygons)
  • Coordinate systems and function graphing
  • Boolean operations on geometric shapes
  • Camera controls and scene management
  • High-quality video rendering
  • IPython/Jupyter notebook integration
  • VS Code extension with live preview

How to use

Read individual rule files for detailed explanations and code examples:

Core Concepts

  • references/scenes.md - Creating scenes and organizing animations
  • references/mobjects.md - Understanding mathematical objects and shapes
  • references/animations.md - Core animation types and techniques
  • references/latex.md - Rendering LaTeX equations and formulas

For additional topics including transforms, timing, shapes, coordinate systems, 3D animations, camera movement, and advanced features, refer to the comprehensive Manim Community documentation.

Quick Start Example

python
from manim import *

class SquareToCircle(Scene):
    def construct(self):
        # Create a square
        square = Square()
        square.set_fill(BLUE, opacity=0.5)

        # Create a circle
        circle = Circle()
        circle.set_fill(RED, opacity=0.5)

        # Animate square creation
        self.play(Create(square))
        self.wait(1)

        # Transform square into circle
        self.play(Transform(square, circle))
        self.wait(1)

        # Fade out
        self.play(FadeOut(square))

Render with: manim -pql script.py SquareToCircle

Best Practices

  1. Inherit from Scene - All animations should be in a class inheriting from Scene
  2. Use construct() method - Place all animation code inside the construct() method
  3. Think in layers - Add mobjects to the scene before animating them
  4. Use self.play() - Animate mobjects using self.play(Animation(...))
  5. Test with low quality - Use -ql flag for faster preview renders
  6. Leverage LaTeX - Use Tex() and MathTex() for mathematical notation
  7. Group related objects - Use VGroup to manage multiple mobjects together
  8. Preview frequently - Use -p flag to automatically open rendered videos

Command Line Usage

bash
# Preview at low quality (fast)
manim -pql script.py SceneName

# Render at high quality
manim -pqh script.py SceneName

# Save last frame as image
manim -s script.py SceneName

# Render multiple scenes
manim script.py Scene1 Scene2

Resources

Expand your agent's capabilities with these related and highly-rated skills.

davila7/claude-code-templates

verl-rl-training

Provides guidance for training LLMs with reinforcement learning using verl (Volcano Engine RL). Use when implementing RLHF, GRPO, PPO, or other RL algorithms for LLM post-training at scale with flexible infrastructure backends.

23,776 2,298
Explore
davila7/claude-code-templates

openrlhf-training

High-performance RLHF framework with Ray+vLLM acceleration. Use for PPO, GRPO, RLOO, DPO training of large models (7B-70B+). Built on Ray, vLLM, ZeRO-3. 2× faster than DeepSpeedChat with distributed architecture and GPU resource sharing.

23,776 2,298
Explore
davila7/claude-code-templates

gguf-quantization

GGUF format and llama.cpp quantization for efficient CPU/GPU inference. Use when deploying models on consumer hardware, Apple Silicon, or when needing flexible quantization from 2-8 bit without GPU requirements.

23,776 2,298
Explore
davila7/claude-code-templates

Claude Code Guide

Master guide for using Claude Code effectively. Includes configuration templates, prompting strategies "Thinking" keywords, debugging techniques, and best practices for interacting with the agent.

23,776 2,298
Explore
davila7/claude-code-templates

qdrant-vector-search

High-performance vector similarity search engine for RAG and semantic search. Use when building production RAG systems requiring fast nearest neighbor search, hybrid search with filtering, or scalable vector storage with Rust-powered performance.

23,776 2,298
Explore
davila7/claude-code-templates

behavioral-modes

AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.

23,776 2,298
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results