{
  "markdown": "# 🎬 test-manim\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n[![Claude Code Plugin](https://img.shields.io/badge/Claude%20Code-Compatible-purple.svg)](#claude-code-plugin)\n[![opencode Skill](https://img.shields.io/badge/opencode-Compatible-blue.svg)](#opencode)\n[![ManimGL Version](https://img.shields.io/badge/ManimGL-v1.7%2B-green.svg)](https://github.com/3b1b/manim)\n\nAn AI-powered agent skill that turns any Large Language Model into a high-fidelity **STEM animation teacher**. Give it a topic, and it generates, renders, and merges stunning, pedagogically-rich educational videos using **ManimGL**.\n\nThis skill is designed for developer agents, terminal assistants, and IDE rules across all major platforms, enforcing a rigorous, structured pipeline for creating visual explanations.\n\n---\n\n## 🗺️ Table of Contents\n\n- [✨ Core Philosophy](#-core-philosophy)\n- [📦 Installation & Integration](#-installation--integration)\n  - [Claude Code](#1-claude-code-plugin)\n  - [opencode](#2-opencode-skill)\n  - [IDE Instructions (Cursor, Windsurf, Cline, Copilot)](#3-ide-integration-rules)\n  - [Manual Integration (Any LLM/Agent)](#4-manual-integration)\n- [🏗️ The 5-Phase Pipeline](#️-the-5-phase-pipeline)\n- [🎨 Pedagogical & Storytelling Principles](#-pedagogical--storytelling-principles)\n  - [The 3-Act Structure](#the-3-act-structure)\n  - [Color Semantics](#color-semantics)\n  - [Pacing Guidelines](#pacing-guidelines)\n  - [Common Anti-Patterns](#common-anti-patterns)\n- [💻 Usage & Options](#-usage--options)\n- [🛠️ Developer & Contribution Guide](#️-developer--contribution-guide)\n\n---\n\n## ✨ Core Philosophy\n\nStandard LLMs often struggle with creating animations because they dump long equations, use random colors, build overly complex layouts, or write broken syntax. \n\n**`test-manim`** solves this by equipping AI agents with a strict set of rules, templates, and references:\n- **Narrative-first**: Outlines a deep pedagogical strategy *before* writing any code.\n- **15-second chunking**: Divides long videos into digestible, single-concept pieces.\n- **ManimGL native compatibility**: Enforces exact API usage (`ShowCreation`, `TexText`, `Tex`) instead of mixed ManimCE elements.\n- **Audio-ready layouts**: Intentionally embeds pacing margins and holds to allow seamless voice-over integration later.\n\n---\n\n## 📦 Installation & Integration\n\n### 1. Claude Code (Plugin)\nInstall the plugin directly within your [Claude Code](https://github.com/anthropics/claude-code) environment:\n```bash\nclaude plugin install shihabshahrier/manim-coding-skill\n```\n*Once installed, you can invoke the generator in any chat session using the `/test-manim` command.*\n\n### 2. opencode (Skill)\nFor users running [opencode](https://github.com/opencode-co/opencode) or similar tools:\n```bash\nnpx skills add shihabshahrier/manim-coding-skill\n```\n*This instantly enables the `/test-manim` command inside your active session using any model.*\n\n### 3. IDE Integration (Rules)\nThis repository includes pre-configured, condensed rules tailored to popular AI coding editors. They automatically sync with the source skill:\n\n| Editor | File Location | Activation |\n|--------|---------------|------------|\n| **Cursor** | `.cursor/rules/test-manim.mdc` | Triggered by `.mdc` context rules |\n| **Windsurf** | `.windsurf/rules/test-manim.md` | Handled by Windsurf global rules |\n| **Cline** | `.clinerules/test-manim.md` | Enabled for all Cline projects |\n| **Copilot** | `.github/copilot-instructions.md` | Read during GitHub Copilot conversations |\n\n### 4. Manual Integration\nYou can paste the core instruction file into *any* custom LLM system prompt or custom agent instructions:\n👉 **[skills/test-manim/SKILL.md](file:///Users/shahriar/Desktop/github/manim-coding-skill/skills/test-manim/SKILL.md)**\n\n---\n\n## 🏗️ The 5-Phase Pipeline\n\nTo guarantee visual consistency, syntax correctness, and rendering reliability, the skill enforces a rigid execution pipeline:\n\n```mermaid\ngraph TD\n    A[\"Phase 0: Scaffold & Parse\"] --> B[\"Phase 1: SCENE_PLAN.md (Story Planning)\"]\n    B --> C[\"Phase 2: Generate ManimGL Chunk Files\"]\n    C --> D[\"Phase 3: Render Chunks (manimgl)\"]\n    D --> E[\"Phase 4: Merge Chunks (ffmpeg)\"]\n    E --> F[\"Phase 5: Structured Report & Rating\"]\n```\n\n1. **Phase 0 — Parse & Scaffold**: Parses args, determines segment count, and sets up a deterministic project directory.\n2. **Phase 1 — Narrative Planning**: Generates a comprehensive script and storyboard (`SCENE_PLAN.md`) outlining the educational hook, build order, and synthesis act.\n3. **Phase 2 — Scene Generation**: Writes isolated, self-contained Python scene files matching the visual plans using native ManimGL APIs.\n4. **Phase 3 — Render**: Automatically runs a generated parallel or ordered shell script (`render.sh`) to render chunks in HD.\n5. **Phase 4 — Merge**: Seamlessly strings all chunks together via FFmpeg (`merge.sh`) to produce a single fluid video.\n6. **Phase 5 — Report**: Compiles a detailed feedback summary including timing logs, design checks, and quality ratings.\n\n---\n\n## 🎨 Pedagogical & Storytelling Principles\n\n### The 3-Act Structure\nEvery animation must avoid the \"academic lecture\" trap and instead follow a structured story:\n1. **Act 1: The Question (Hook)**: Open with a striking physical phenomenon or paradox before writing any text or math. Instigate curiosity.\n2. **Act 2: The Build (Chunks)**: Step-by-step introduction of concepts. One chunk = one single concept. Move from physical intuition towards formal abstractions.\n3. **Act 3: The Synthesis (Resolution)**: Loop back to the Act 1 visual, now annotated with the newly taught context. Hold the final insight frame static for 3–5 seconds.\n\n### Color Semantics\nColors are used to convey mathematical and physical meaning, not as decoration. A strict \"color contract\" is defined in Phase 1 and adhered to across all chunks:\n* 🟦 **BLUE**: Primary concept / object of focus (e.g., mass, current, graph).\n* 🟨 **YELLOW**: Secondary concept / dynamic vectors (e.g., force, electric field, derivatives).\n* 🟥/🟩 **RED / GREEN**: Highlight, accentuation, or contrast (e.g., acceleration, positive/negative states).\n* ⬜ **WHITE**: Titles, axes, standard text, and LaTeX equations.\n\n### Pacing Guidelines\n\n| Interaction / Element | Visual Timing | Action |\n|-----------------------|---------------|--------|\n| **New Object Arrival** | `1.5s - 2.0s` | Slow entry to let the eye adjust |\n| **Object in Motion** | `0.5s - 1.0s` | Snappy, indicating immediate relationship |\n| **LaTeX Equation Arrives** | `1.5s - 2.5s` | Slow drawing, letting symbols sink in |\n| **Key Insight Pause** | `3.0s` minimum | Hold frames to allow mental processing |\n| **Scene Transition** | `0.5s` | Clean, quick fade-outs |\n\n### Common Anti-Patterns\n* ❌ **Definition Dumps**: Showing equations or text titles before showing the physical object or graph.\n* ❌ **Color Chaos**: Changing the role of colors between scenes (e.g. Blue represents velocity in chunk 1, but stands for gravity in chunk 2).\n* ❌ **Too Many Elements**: Animating 4 unrelated things at once. We show, explain, then build.\n* ❌ **Wall of Text**: Writing paragraphs on screen. Main text is capped at **8 words max** per element.\n\n---\n\n## 💻 Usage & Options\n\nRun the skill command within your terminal or chat session:\n```bash\n/test-manim \"topic\" [--duration 30|60|90|120] [--model name]\n```\n\n### Arguments\n\n| Parameter | Default | Values / Description |\n|-----------|---------|----------------------|\n| **`topic`** | *Required* | Any STEM (Science, Tech, Engineering, Math) subject string. |\n| **`--duration`** | `30` | `30`, `60`, `90`, `120` (in seconds). Total length of final video. |\n| **`--model`** | *Derived* | Model identifier used in folder names (e.g. `claude`, `gpt4`). |\n\n### Example Output Structure\nFor `/test-manim \"Fourier Series\" --duration 30`:\n```\nmanim-claude/\n  fourier_series/\n    scenes/\n      chunk_01_approx.py    # Chunk 1: The Hook\n      chunk_02_harmonics.py # Chunk 2: The Build\n    output/\n      chunks/               # Isolated chunk .mp4 renders\n      final/\n        fourier_series_final.mp4  # Merged high-quality video\n    assets/\n    SCENE_PLAN.md           # The storyboard and script\n    render.sh               # Executable to render all chunks\n    merge.sh                # Executable to join chunks using ffmpeg\n```\n\n### System Requirements\n* **Python 3.8+**\n* **ManimGL** v1.7.2+ (`pip install manimgl`)\n* **FFmpeg** (accessible in PATH for merging video outputs)\n* **LaTeX installation** (e.g. TeX Live, MiKTeX for formula rendering)\n\n---\n\n## 🛠️ Developer & Contribution Guide\n\nTo suggest changes to the prompt strategies, API definitions, or storytelling templates, please review [CONTRIBUTING.md](CONTRIBUTING.md):\n\n1. **Main Prompt / Instruction File**: Edit [skills/test-manim/SKILL.md](file:///Users/shahriar/Desktop/github/manim-coding-skill/skills/test-manim/SKILL.md)\n2. **ManimGL API Cheat-Sheet**: Edit [skills/test-manim/references/manim-gl-api.md](file:///Users/shahriar/Desktop/github/manim-coding-skill/skills/test-manim/references/manim-gl-api.md)\n3. **Pacing & Narrative Guides**: Edit [skills/test-manim/references/storytelling.md](file:///Users/shahriar/Desktop/github/manim-coding-skill/skills/test-manim/references/storytelling.md)\n\n> [!WARNING]\n> Do not edit the editor-specific copies (`.cursor/`, `.windsurf/`, `.clinerules/`) directly. They are auto-generated and synchronized from the main source of truth files.\n\n*Let's build stunning educational visualizations together!* 🚀\n\n---\n\n📖 **Project page:** https://shihub.online/projects/manim-coding-skill\n",
  "bytes": 9637,
  "sha": "62488e7b8e67afde825f99f3e38fbc770934f368012df5b3ddc0dc544605aa52",
  "repo_slug": "shihabshahrier/manim-coding-skill",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_shihabshahrier_manim_coding_skill_cece5ee9/readme"
}