All skills
adithya-s-k avatar

/manimce-best-practices

@6668663
by Adithya S Kadithya-s-k/manim_skill1.1k stars
94

Trigger when: (1) User mentions "manim" or "Manim Community" or "ManimCE", (2) Code contains `from manim import *`, (3) User runs `manim` CLI commands, (4) Working with Scene, MathTex, Create(), or ManimCE-specific classes. Best practices for Manim Community Edition - the community-maintained Python animation engine. Covers Scene structure, animations, LaTeX/MathTex, 3D with ThreeDScene, camera control, styling, and CLI usage. NOT for ManimGL/3b1b version (which uses `manimlib` imports and `manimgl` CLI).

Use this Skill: https://skilld.dev/gh/adithya-s-k/manim_skill/manimce-best-practices

This session only. Nothing lands on disk.

rulescreation-animations.md

≈831 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Creation Animations

Animations that introduce mobjects to the scene.

Create

Draws a VMobject progressively along its path.

from manim import *

class CreateExample(Scene):
    def construct(self):
        circle = Circle()
        self.play(Create(circle))

Best for: Geometric shapes, lines, arrows.

Write

Simulates handwriting. Best for text and equations.

class WriteExample(Scene):
    def construct(self):
        text = Text("Hello World")
        equation = MathTex(r"E = mc^2")

        self.play(Write(text))
        self.wait()
        self.play(Write(equation))

Write automatically sets appropriate timing based on text length.

DrawBorderThenFill

Draws the outline first, then fills in the shape.

class DrawBorderExample(Scene):
    def construct(self):
        square = Square(fill_opacity=0.8, color=BLUE)
        self.play(DrawBorderThenFill(square))

Best for: Shapes with fills where you want to emphasize the outline first.

FadeIn / FadeOut

Simple opacity transitions.

class FadeExample(Scene):
    def construct(self):
        circle = Circle()

        # Fade in
        self.play(FadeIn(circle))
        self.wait()

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

Directional Fades

# Fade in from a direction
self.play(FadeIn(square, shift=UP))      # Fade in while moving up
self.play(FadeIn(square, shift=LEFT))    # Fade in from right

# Fade out to a direction
self.play(FadeOut(square, shift=DOWN))   # Fade out while moving down

Scale Fades

self.play(FadeIn(circle, scale=0.5))   # Fade in while growing
self.play(FadeOut(circle, scale=2))    # Fade out while shrinking

GrowFromCenter / ShrinkToCenter

class GrowExample(Scene):
    def construct(self):
        circle = Circle()

        self.play(GrowFromCenter(circle))
        self.wait()
        self.play(ShrinkToCenter(circle))

GrowFromPoint

Grow from a specific point.

self.play(GrowFromPoint(circle, ORIGIN))
self.play(GrowFromPoint(circle, LEFT * 3))

GrowFromEdge

Grow from a specific edge.

self.play(GrowFromEdge(square, LEFT))   # Grow from left edge
self.play(GrowFromEdge(square, DOWN))   # Grow from bottom edge

SpinInFromNothing

Object spins in while growing.

self.play(SpinInFromNothing(circle))

Uncreate

Reverse of Create - erases the mobject.

self.play(Create(circle))
self.wait()
self.play(Uncreate(circle))  # Erases in reverse

AddTextLetterByLetter

Types text one character at a time.

class TypingExample(Scene):
    def construct(self):
        text = Text("Hello World")
        self.play(AddTextLetterByLetter(text, time_per_char=0.1))

Note: Only works with Text, not MathTex.

Best Practices

  1. Use Write for text - Looks more natural than Create
  2. Use Create for shapes - Clean progressive drawing
  3. Use FadeIn for quick introductions - When drawing isn't important
  4. Match removal to creation - If you Create, use Uncreate; if FadeIn, use FadeOut

Source: SKILL.md on GitHub

No alerts17d5 checks · Risk SAFE
  • Gen Agent Trust Hub17d

    This skill is a comprehensive educational resource for the Manim Community Edition library. It provides best practices, templates, and example scripts for creating mathematical animations and visualizations. No security risks or malicious patterns were identified.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    37 files scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 6668663. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 8 months ago
  • Python
  • manim
  • animation
  • latex
  • mathtex
  • 3d
  • rendering
  • scene
  • visualization

README badge

README badge for adithya-s-k/manim_skill/manimce-best-practices

Provides best practices and patterns for Manim Community Edition, the Python animation library for mathematical visualizations. Covers Scene structure, animations, LaTeX rendering, 3D graphics, positioning, and CLI usage with organized rule files, working examples, and templates.

Generated from the current SKILL.md.

Does this skill cover ManimGL or just Manim Community Edition?
Only Manim Community Edition (ManimCE). It does not apply to ManimGL/3b1b version, which uses `manimlib` imports and the `manimgl` CLI instead.
What topics are included in this skill?
Scene structure, mobjects, animations (creation, transformation, groups), text and LaTeX rendering, styling, positioning, 3D visualization, timing and updaters, camera control, CLI usage, and common geometric shapes.
Does this skill include working examples?
Yes. It includes five complete example files demonstrating basic animations, math visualization, updater patterns, graph plotting, and 3D visualization, plus three scene templates for 2D, camera-controlled, and 3D scenes.
What should I do if text rendering fails in my Manim scripts?
Check your manimpango installation requirements, as text rendering failures often stem from manimpango configuration issues. The skill also recommends running `manim checkhealth` to verify your overall installation.
How do I render a scene with different quality levels?
Use quality flags with the manim CLI: `-ql` for low quality (fast, development), `-qm` for medium, `-qh` for high, and `-qk` for 4K. For example: `manim -pqh scene.py MyScene`.

Generated from the current SKILL.md. These answers refresh after source changes.