harleycoops/math-to-manim
Overview
This skill converts any mathematical or scientific concept into a complete Manim animation workflow using a six-agent pipeline. It builds pedagogically sound sequences by recursively discovering prerequisites (the Reverse Knowledge Tree) and then generating LaTeX-enriched narratives and runnable Manim code. The output includes a verbose prompt, a knowledge-tree JSON, and a ready-to-run Python scene.
How this skill works
The system parses user intent (concept, domain, level, goal) then the PrerequisiteExplorer recursively asks what must be understood first, producing a directed acyclic knowledge tree. Each node is enriched with equations, definitions, worked examples, and visual specs. A NarrativeComposer orders content from foundations to target and creates a detailed verbose prompt. Finally, a CodeGenerator emits Community Manim Python code implementing the specified visuals, transitions, colors, and timings.
When to use it
- Create educational math or physics animations from a concept description or image
- Generate runnable Manim code for classroom videos or lecture supplements
- Visualize abstract concepts by converting them into stepwise visual narratives
- Produce pedagogy-driven sequences by discovering and teaching prerequisites
- Request verbose prompt generation for assisted manual production or further editing
Best practices
- Provide a clear core concept, desired depth (beginner/intermediate/advanced), and learning goal
- Limit initial scope to one target concept per request to keep tree manageable
- Accept the generated knowledge tree and prune or extend nodes as needed before code generation
- Use consistent color palettes and naming conventions in follow-up edits to preserve coherence
- Test generated scenes incrementally (render single nodes) before assembling full-length videos
Example use cases
- Turn 'quantum tunneling' into a 3–5 minute Manim video that starts from wave basics
- Create an animation explaining the Pythagorean theorem with stepwise prerequisites and proofs
- Generate a study video for the chain rule by building from limits and derivative definitions
- Produce a classroom-ready scene that visualizes eigenvectors starting from linear maps
- Export a verbose prompt and Python file when you want editable, production-quality assets
FAQ
By default it recurses 3–4 levels and stops at foundation concepts that a high-school graduate would recognize, but depth is configurable.
Will the generated code run with Manim Community Edition?
Yes. The CodeGenerator targets Manim Community Edition and uses raw-string LaTeX, predefined palettes, and standard scene classes.