Math-To-Manim — скилл для Claude Code: что делает и установка
Скилл Math-To-Manim превращает математическую или научную тему в план визуализации и рабочий Python-код для Manim. Подходит для учебных анимаций.
MIT 1 установок ★ 2 889 обновлён 2026-10-27
npx skills add HarleyCoops/Math-To-Manim --skill math-to-manim -a claude-codeЧто делает Math-To-Manim
Math-To-Manim разбирает тему, определяет её предпосылки и строит обратное дерево знаний. Шесть агентов проходят путь от анализа концепции до Python-кода: добавляют формулы LaTeX, объяснения переменных, примеры, визуальные элементы, цвета, переходы и темп сцен.
На выходе появляются {concept}_prompt.txt, {concept}_tree.json, {concept}_animation.py и {concept}_result.json. Скилл использует Manim Community Edition, а для LaTeX в коде задаёт raw strings вроде r"E = mc^2". Дерево ограничивается глубиной 3–4 уровня, а для каждого понятия формируется сегмент на 200–300 слов и подробный промпт на 2000+ токенов.
Скилл генерирует Python-файл под Manim Community Edition, поэтому запуск привязан к этой реализации Manim.
Какие задачи решает
- разобрать тему на понятия и предпосылки
- выстроить объяснение от базовых идей к целевой теме
- добавить формулы LaTeX и определения переменных
- спроектировать сцены с графиками, объектами и переходами
- сгенерировать Python-код для Manim
Примеры запросов агенту
- Создай анимацию математического понятия «теорема Пифагора» с объяснением для начинающего.
- Построй визуализацию квантового туннелирования и найди необходимые предпосылки.
- Сгенерируй сцену Manim для объяснения выбранной формулы с LaTeX и плавными переходами.
Как установить Math-To-Manim
1Через Skills CLI (Vercel)
npx skills add HarleyCoops/Math-To-Manim --skill math-to-manim -a claude-code2Вручную: положить файлы
~/.claude/skills/math-to-manim/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/math-to-manim/
1Через Skills CLI (Vercel)
npx skills add HarleyCoops/Math-To-Manim --skill math-to-manim -a codex2Вручную: положить файлы
.agents/skills/math-to-manim/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add HarleyCoops/Math-To-Manim --skill math-to-manim -a cursor2Вручную: положить файлы
.cursor/skills/math-to-manim/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install HarleyCoops/Math-To-Manim legacy/Math-To-Manim/.claude/plugins/math-to-manim/skills/math-to-manim2Вручную: положить файлы
.github/skills/math-to-manim/SKILL.md1Через Skills CLI (Vercel)
npx skills add HarleyCoops/Math-To-Manim --skill math-to-manim -a gemini-cli2Командой платформы
gemini skills install https://github.com/HarleyCoops/Math-To-Manim --path legacy/Math-To-Manim/.claude/plugins/math-to-manim/skills/math-to-manimВручную: положить файлы
.devin/skills/math-to-manim/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add HarleyCoops/Math-To-Manim --skill math-to-manim -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о Math-To-Manim
Как установить Math-To-Manim в Claude Code?
Выполните npx skills add HarleyCoops/Math-To-Manim --skill math-to-manim -a claude-code, затем проверьте файл ~/.claude/skills/math-to-manim/SKILL.md.
Что делает Math-To-Manim?
Скилл превращает концепцию в дерево предпосылок, подробный сценарий визуализации и рабочий Python-файл для Manim. Он также задаёт формулы, цвета, анимации и переходы для сцен.
Какие файлы создаёт Math-To-Manim?
Для концепции создаются {concept}_prompt.txt, {concept}_tree.json, {concept}_animation.py и {concept}_result.json. В репозитории также есть справочные файлы и пример с теоремой Пифагора.
Исходный текст
SKILL.md · MIT
---
name: Math-To-Manim
description: This skill should be used when the user asks to "create a math animation", "animate a mathematical concept", "generate Manim code", "visualize [topic] with animation", "explain [concept] visually", "create an educational video", "build a Manim scene", or mentions "reverse knowledge tree", "prerequisite discovery", or "verbose prompt generation". Provides a complete six-agent workflow for transforming any concept into professional Manim animations through recursive prerequisite discovery.
version: 1.0.0
---
# Math-To-Manim: Reverse Knowledge Tree Animation Pipeline
Transform any concept into professional mathematical animations using a six-agent workflow that requires NO training data - only pure LLM reasoning.
## Core Innovation: Reverse Knowledge Tree
Instead of training on example animations, this system recursively asks: **"What must I understand BEFORE this concept?"** This builds pedagogically sound animations that flow naturally from foundation concepts to advanced topics.
## When to Use This Skill
Invoke this workflow when:
- Creating mathematical or scientific animations
- Building educational visualizations with Manim
- Generating code from conceptual explanations
- Needing pedagogically structured content progression
## The Six-Agent Pipeline
### Agent 1: ConceptAnalyzer
Parse user intent to extract:
- **Core concept** (specific topic name)
- **Domain** (physics, math, CS, etc.)
- **Level** (beginner/intermediate/advanced)
- **Goal** (learning objective)
### Agent 2: PrerequisiteExplorer (Key Innovation)
Recursively build knowledge tree:
1. Ask: "What are the prerequisites for [concept]?"
2. For each prerequisite, recursively ask the same question
3. Stop when hitting foundation concepts (high school level)
4. Build DAG structure with depth tracking
**Foundation detection criteria**: Would a high school graduate understand this without further explanation?
### Agent 3: MathematicalEnricher
For each node in the tree, add:
- LaTeX equations (2-5 key formulas)
- Variable definitions and interpretations
- Worked examples with typical values
- Complexity-appropriate rigor
### Agent 4: VisualDesigner
For each node, design:
- Visual elements (graphs, 3D objects, diagrams)
- Color scheme (maintain consistency)
- Animation sequences (FadeIn, Transform, etc.)
- Camera movements and transitions
- Duration and pacing
### Agent 5: NarrativeComposer
Walk tree from foundation to target:
1. Topologically sort nodes
2. Generate 200-300 word segment per concept
3. Include exact LaTeX, colors, animations
4. Stitch into 2000+ token verbose prompt
### Agent 6: CodeGenerator
Generate working Manim code:
- Use Manim Community Edition
- Handle LaTeX with raw strings: `r"$\frac{a}{b}$"`
- Implement all visual specifications
- Produce runnable Python file
## Workflow Execution
To execute this workflow for a user request:
### Step 1: Analyze the Concept
```python
# Extract intent
analysis = {
"core_concept": "quantum tunneling",
"domain": "physics/quantum mechanics",
"level": "intermediate",
"goal": "Understand barrier penetration"
}
```
### Step 2: Build Knowledge Tree
Recursively discover prerequisites with max depth of 3-4 levels:
```
Target: quantum tunneling
├─ wave-particle duality
│ ├─ de Broglie wavelength [FOUNDATION]
│ └─ Heisenberg uncertainty
├─ Schrödinger equation
│ ├─ wave function
│ └─ probability density
└─ potential barriers [FOUNDATION]
```
### Step 3: Enrich with Mathematics
Add to each node:
- Primary equations in LaTeX
- Variable definitions
- Physical interpretations
### Step 4: Design Visuals
Specify for each concept:
- Elements: `['wave_function', 'potential_barrier']`
- Colors: `{'wave': 'BLUE', 'barrier': 'RED'}`
- Animations: `['FadeIn', 'Create', 'Transform']`
- Duration: 15-30 seconds per concept
### Step 5: Compose Narrative
Generate verbose prompt with:
- Scene-by-scene instructions
- Exact LaTeX formulas
- Specific animation timings
- Color and position details
### Step 6: Generate Code
Produce complete Python file:
```python
from manim import *
class ConceptAnimation(ThreeDScene):
def construct(self):
# Implementation following verbose prompt
...
```
## Critical Implementation Details
### LaTeX Handling
Always use raw strings for LaTeX:
```python
equation = MathTex(r"E = mc^2")
```
### Color Consistency
Define color palette at scene start and reuse throughout.
### Transition Pattern
Connect concepts with smooth animations:
- Previous concept fades
- New concept builds from prior elements
- Use `Transform` or `ReplacementTransform`
### Verbose Prompt Format
Structure prompts with:
1. Overview section with concept count and duration
2. Scene-by-scene instructions
3. Exact specifications (no ambiguity)
See `references/verbose-prompt-format.md` for complete template.
## Output Files
The pipeline generates:
- `{concept}_prompt.txt` - Verbose prompt
- `{concept}_tree.json` - Knowledge tree structure
- `{concept}_animation.py` - Manim Python code
- `{concept}_result.json` - Complete metadata
## Additional Resources
### Reference Files
- **`references/reverse-knowledge-tree.md`** - Detailed algorithm explanation
- **`references/agent-system-prompts.md`** - All six agent prompts
- **`references/verbose-prompt-format.md`** - Complete prompt template
- **`references/manim-code-patterns.md`** - Code generation patterns
### Example Files
- **`examples/pythagorean-theorem/`** - Complete workflow example
## Quick Start
For immediate use, follow this simplified pattern:
1. **Parse**: Extract the core concept from user input
2. **Discover**: Build prerequisite tree (depth 3-4)
3. **Enrich**: Add math and visual specs to each node
4. **Compose**: Generate verbose prompt (2000+ tokens)
5. **Generate**: Produce working Manim code
The key insight: verbose, specific prompts with exact LaTeX and visual specifications produce dramatically better code than vague descriptions.
© HarleyCoops · MIT · HarleyCoops/Math-To-Manim