{"id":"78816207-f1cd-4d1d-8f95-58a60d9aa125","shortId":"Z2pQst","kind":"skill","title":"manimgl-best-practices","tagline":"Trigger when: (1) User mentions \"manimgl\" or \"ManimGL\" or \"3b1b manim\", (2) Code contains `from manimlib import *`, (3) User runs `manimgl` CLI commands, (4) Working with InteractiveScene, self.frame, self.embed(), ShowCreation(), or ManimGL-specific patterns.\n\nBest practices for","description":"## How to use\n\nRead individual rule files for detailed explanations and code examples:\n\n### Core Concepts\n- [rules/scenes.md](rules/scenes.md) - InteractiveScene, Scene types, and construct method\n- [rules/mobjects.md](rules/mobjects.md) - Mobject types, VMobject, Groups, and positioning\n- [rules/animations.md](rules/animations.md) - Animation classes, playing animations, and timing\n\n### Creation & Transformation\n- [rules/creation-animations.md](rules/creation-animations.md) - ShowCreation, Write, FadeIn, DrawBorderThenFill\n- [rules/transform-animations.md](rules/transform-animations.md) - Transform, ReplacementTransform, TransformMatchingTex\n- [rules/animation-groups.md](rules/animation-groups.md) - LaggedStart, Succession, AnimationGroup\n\n### Text & Math\n- [rules/tex.md](rules/tex.md) - Tex class, raw strings R\"...\", and LaTeX rendering\n- [rules/text.md](rules/text.md) - Text mobjects, fonts, and styling\n- [rules/t2c.md](rules/t2c.md) - tex_to_color_map (t2c) for coloring math expressions\n\n### Styling & Appearance\n- [rules/colors.md](rules/colors.md) - Color constants, gradients, RGB, hex, GLSL coloring\n- [rules/styling.md](rules/styling.md) - Fill, stroke, opacity, backstroke, gloss, shadow\n\n### 3D & Camera\n- [rules/3d.md](rules/3d.md) - 3D objects, surfaces, Sphere, Torus, parametric surfaces, lighting\n- [rules/camera.md](rules/camera.md) - frame.reorient(), Euler angles, fix_in_frame(), camera animations\n\n### Interactive Development\n- [rules/interactive.md](rules/interactive.md) - Interactive mode with `-se` flag, checkpoint_paste()\n- [rules/frame.md](rules/frame.md) - self.frame, camera control, reorient, and zooming\n- [rules/embedding.md](rules/embedding.md) - self.embed() for IPython debugging, touch() mode\n\n### Configuration & CLI\n- [rules/cli.md](rules/cli.md) - manimgl command, flags (-w, -o, -se, -l, -h), rendering options\n- [rules/config.md](rules/config.md) - custom_config.yml, directories, camera settings, quality presets\n\n## Working Examples\n\nComplete, tested example files demonstrating common patterns:\n\n- [examples/basic_animations.py](examples/basic_animations.py) - Basic shapes, text, and animations\n- [examples/math_visualization.py](examples/math_visualization.py) - LaTeX equations and mathematical content\n- [examples/graph_plotting.py](examples/graph_plotting.py) - Axes, functions, and graphing\n- [examples/3d_visualization.py](examples/3d_visualization.py) - 3D scenes with camera control and surfaces\n- [examples/updater_patterns.py](examples/updater_patterns.py) - Dynamic animations with updaters\n\n## Scene Templates\n\nCopy and modify these templates to start new projects:\n\n- [templates/basic_scene.py](templates/basic_scene.py) - Standard 2D scene template\n- [templates/interactive_scene.py](templates/interactive_scene.py) - InteractiveScene with self.embed()\n- [templates/3d_scene.py](templates/3d_scene.py) - 3D scene with frame.reorient()\n- [templates/math_scene.py](templates/math_scene.py) - Mathematical derivations and equations\n\n## Quick Reference\n\n### Basic Scene Structure\n```python\nfrom manimlib import *\n\nclass MyScene(InteractiveScene):\n    def construct(self):\n        # Create mobjects\n        circle = Circle()\n\n        # Add to scene (static)\n        self.add(circle)\n\n        # Or animate\n        self.play(ShowCreation(circle))  # Note: ShowCreation, not Create\n\n        # Wait\n        self.wait(1)\n```\n\n### Render Command\n```bash\n# Render and preview\nmanimgl scene.py MyScene\n\n# Interactive mode - drop into shell at line 15\nmanimgl scene.py MyScene -se 15\n\n# Write to file\nmanimgl scene.py MyScene -w\n\n# Low quality for testing\nmanimgl scene.py MyScene -l\n```\n\n### Key Differences from ManimCE\n\n| Feature | ManimGL (3b1b) | Manim Community |\n|---------|----------------|-----------------|\n| Import | `from manimlib import *` | `from manim import *` |\n| CLI | `manimgl` | `manim` |\n| Math text | `Tex(R\"\\pi\")` | `MathTex(r\"\\pi\")` |\n| Scene | `InteractiveScene` | `Scene` |\n| Create anim | `ShowCreation` | `Create` |\n| Camera | `self.frame` | `self.camera.frame` |\n| Fix in frame | `mob.fix_in_frame()` | `self.add_fixed_in_frame_mobjects(mob)` |\n| Package | `manimgl` (PyPI) | `manim` (PyPI) |\n\n### Interactive Development Workflow\n\nManimGL's killer feature is interactive development:\n\n```bash\n# Start at line 20 with state preserved\nmanimgl scene.py MyScene -se 20\n```\n\nIn interactive mode:\n```python\n# Copy code to clipboard, then run:\ncheckpoint_paste()           # Run with animations\ncheckpoint_paste(skip=True)  # Run instantly (no animations)\ncheckpoint_paste(record=True) # Record while running\n```\n\n### Camera Control (self.frame)\n\n```python\n# Get the camera frame\nframe = self.frame\n\n# Reorient in 3D (phi, theta, gamma, center, height)\nframe.reorient(45, -30, 0, ORIGIN, 8)\n\n# Animate camera movement\nself.play(frame.animate.reorient(60, -45, 0))\n\n# Fix mobjects to stay in screen space during 3D movement\ntitle.fix_in_frame()\n```\n\n### LaTeX with Tex class\n\n```python\n# Use raw strings with capital R\nformula = Tex(R\"\\int_0^1 x^2 \\, dx = \\frac{1}{3}\")\n\n# Color mapping with t2c\nequation = Tex(\n    R\"E = mc^2\",\n    t2c={\"E\": BLUE, \"m\": GREEN, \"c\": YELLOW}\n)\n\n# Isolate substrings for animation\nformula = Tex(R\"\\sum_{n=1}^{\\infty} \\frac{1}{n^2} = \\frac{\\pi^2}{6}\")\nformula.set_color_by_tex(\"n\", BLUE)\n```\n\n### Common Patterns\n\n#### Embedding for debugging\n```python\ndef construct(self):\n    circle = Circle()\n    self.play(ShowCreation(circle))\n    self.embed()  # Drops into IPython shell here\n```\n\n#### Set floor plane for 3D\n```python\nself.set_floor_plane(\"xz\")  # Makes xy the viewing plane\n```\n\n#### Backstroke for text readability\n```python\ntext = Text(\"Label\")\ntext.set_backstroke(BLACK, 5)  # Black outline behind text\n```\n\n### Installation\n\n```bash\n# Install ManimGL\npip install manimgl\n\n# Check installation\nmanimgl --version\n```\n\n### Common Pitfalls to Avoid\n\n1. **Version confusion** - Ensure you're using `manimgl`, not `manim` (community version)\n2. **ShowCreation vs Create** - ManimGL uses `ShowCreation`, not `Create`\n3. **Tex vs MathTex** - ManimGL uses `Tex` with capital R raw strings\n4. **self.frame vs self.camera.frame** - ManimGL uses `self.frame` directly\n5. **fix_in_frame()** - Call on the mobject, not the scene\n6. **Interactive mode** - Use `-se` flag for interactive development\n\n## License & Attribution\n\nThis skill contains example code adapted from [3Blue1Brown's video repository](https://github.com/3b1b/videos) by Grant Sanderson.\n\n**License:** [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)\n\n- **Attribution required** - Credit both 3Blue1Brown and the adapter\n- **NonCommercial** - Not for commercial use\n- **ShareAlike** - Derivatives must use the same license\n\nSee [LICENSE.txt](LICENSE.txt) for full details.","tags":["manimgl","best","practices","manim","skill","adithya-s-k","agent-skills"],"capabilities":["skill","source-adithya-s-k","skill-manimgl-best-practices","topic-agent-skills"],"categories":["manim_skill"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/adithya-s-k/manim_skill/manimgl-best-practices","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add adithya-s-k/manim_skill","source_repo":"https://github.com/adithya-s-k/manim_skill","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 868 github stars · SKILL.md body (6,772 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:53:19.711Z","embedding":null,"createdAt":"2026-04-18T20:33:29.849Z","updatedAt":"2026-05-18T18:53:19.711Z","lastSeenAt":"2026-05-18T18:53:19.711Z","tsv":"'-30':499 '-45':509 '/3b1b/videos)':731 '/licenses/by-nc-sa/4.0/)':744 '0':500,510,539 '1':7,334,540,545,573,576,655 '15':351,356 '2':16,542,556,578,581,667 '20':440,448 '2d':278 '3':22,546,676 '3b1b':14,378 '3blue1brown':725,749 '3d':149,153,251,288,491,519,613 '4':28,688 '4.0':741 '45':498 '5':635,696 '6':582,707 '60':508 '8':502 'adapt':723,752 'add':317 'angl':165 'anim':76,79,170,235,261,324,403,463,471,503,567 'animationgroup':99 'appear':131 'attribut':717,745 'avoid':654 'axe':245 'backstrok':146,624,633 'bash':337,436,641 'basic':231,300 'behind':638 'best':3,40 'black':634,636 'blue':559,588 'by-nc-sa':737 'c':562 'call':700 'camera':150,169,185,216,254,406,479,485,504 'capit':533,684 'cc':736 'center':495 'check':647 'checkpoint':180,459,464,472 'circl':315,316,322,327,598,599,602 'class':77,105,307,527 'cli':26,199,388 'clipboard':456 'code':17,54,454,722 'color':123,127,134,140,547,584 'command':27,203,336 'commerci':756 'common':227,589,651 'communiti':380,665 'complet':222 'concept':57 'configur':198 'confus':657 'constant':135 'construct':64,311,596 'contain':18,720 'content':242 'control':186,255,480 'copi':266,453 'core':56 'creat':313,331,402,405,670,675 'creation':82 'creativecommons.org':743 'creativecommons.org/licenses/by-nc-sa/4.0/)':742 'credit':747 'custom_config.yml':214 'debug':195,593 'def':310,595 'demonstr':226 'deriv':295,759 'detail':51,770 'develop':172,427,435,715 'differ':373 'direct':695 'directori':215 'drawborderthenfil':89 'drop':346,604 'dx':543 'dynam':260 'e':554,558 'embed':591 'ensur':658 'equat':239,297,551 'euler':164 'exampl':55,221,224,721 'examples/3d_visualization.py':249,250 'examples/basic_animations.py':229,230 'examples/graph_plotting.py':243,244 'examples/math_visualization.py':236,237 'examples/updater_patterns.py':258,259 'explan':52 'express':129 'fadein':88 'featur':376,432 'file':49,225,359 'fill':143 'fix':166,409,416,511,697 'flag':179,204,712 'floor':610,616 'font':116 'formula':535,568 'formula.set':583 'frac':544,575,579 'frame':168,411,414,418,486,487,523,699 'frame.animate.reorient':507 'frame.reorient':163,291,497 'full':769 'function':246 'gamma':494 'get':483 'github.com':730 'github.com/3b1b/videos)':729 'gloss':147 'glsl':139 'gradient':136 'grant':733 'graph':248 'green':561 'group':71 'h':209 'height':496 'hex':138 'import':21,306,381,384,387 'individu':47 'infti':574 'instal':640,642,645,648 'instant':469 'int':538 'interact':171,175,344,426,434,450,708,714 'interactivescen':31,60,283,309,400 'ipython':194,606 'isol':564 'key':372 'killer':431 'l':208,371 'label':631 'laggedstart':97 'latex':110,238,524 'licens':716,735,764 'license.txt':766,767 'light':160 'line':350,439 'low':364 'm':560 'make':619 'manim':15,379,386,390,424,664 'manimc':375 'manimgl':2,10,12,25,37,202,341,352,360,368,377,389,422,429,444,643,646,649,662,671,680,692 'manimgl-best-practic':1 'manimgl-specif':36 'manimlib':20,305,383 'map':124,548 'math':101,128,391 'mathemat':241,294 'mathtex':396,679 'mc':555 'mention':9 'method':65 'mob':420 'mob.fix':412 'mobject':68,115,314,419,512,703 'mode':176,197,345,451,709 'modifi':268 'movement':505,520 'must':760 'myscen':308,343,354,362,370,446 'n':572,577,587 'nc':739 'new':273 'noncommerci':753 'note':328 'o':206 'object':154 'opac':145 'option':211 'origin':501 'outlin':637 'packag':421 'parametr':158 'past':181,460,465,473 'pattern':39,228,590 'phi':492 'pi':395,398,580 'pip':644 'pitfal':652 'plane':611,617,623 'play':78 'posit':73 'practic':4,41 'preserv':443 'preset':219 'preview':340 'project':274 'pypi':423,425 'python':303,452,482,528,594,614,628 'qualiti':218,365 'quick':298 'r':108,394,397,534,537,553,570,685 'raw':106,530,686 're':660 'read':46 'readabl':627 'record':474,476 'refer':299 'render':111,210,335,338 'reorient':187,489 'replacementtransform':93 'repositori':728 'requir':746 'rgb':137 'rule':48 'rules/3d.md':151,152 'rules/animation-groups.md':95,96 'rules/animations.md':74,75 'rules/camera.md':161,162 'rules/cli.md':200,201 'rules/colors.md':132,133 'rules/config.md':212,213 'rules/creation-animations.md':84,85 'rules/embedding.md':190,191 'rules/frame.md':182,183 'rules/interactive.md':173,174 'rules/mobjects.md':66,67 'rules/scenes.md':58,59 'rules/styling.md':141,142 'rules/t2c.md':119,120 'rules/tex.md':102,103 'rules/text.md':112,113 'rules/transform-animations.md':90,91 'run':24,458,461,468,478 'sa':740 'sanderson':734 'scene':61,252,264,279,289,301,319,399,401,706 'scene.py':342,353,361,369,445 'screen':516 'se':178,207,355,447,711 'see':765 'self':312,597 'self.add':321,415 'self.camera.frame':408,691 'self.embed':33,192,285,603 'self.frame':32,184,407,481,488,689,694 'self.play':325,506,600 'self.set':615 'self.wait':333 'set':217,609 'shadow':148 'shape':232 'sharealik':758 'shell':348,607 'showcreat':34,86,326,329,404,601,668,673 'skill':719 'skill-manimgl-best-practices' 'skip':466 'source-adithya-s-k' 'space':517 'specif':38 'sphere':156 'standard':277 'start':272,437 'state':442 'static':320 'stay':514 'string':107,531,687 'stroke':144 'structur':302 'style':118,130 'substr':565 'success':98 'sum':571 'surfac':155,159,257 't2c':125,550,557 'templat':265,270,280 'templates/3d_scene.py':286,287 'templates/basic_scene.py':275,276 'templates/interactive_scene.py':281,282 'templates/math_scene.py':292,293 'test':223,367 'tex':104,121,393,526,536,552,569,586,677,682 'text':100,114,233,392,626,629,630,639 'text.set':632 'theta':493 'time':81 'title.fix':521 'topic-agent-skills' 'torus':157 'touch':196 'transform':83,92 'transformmatchingtex':94 'trigger':5 'true':467,475 'type':62,69 'updat':263 'use':45,529,661,672,681,693,710,757,761 'user':8,23 'version':650,656,666 'video':727 'view':622 'vmobject':70 'vs':669,678,690 'w':205,363 'wait':332 'work':29,220 'workflow':428 'write':87,357 'x':541 'xy':620 'xz':618 'yellow':563 'zoom':189","prices":[{"id":"a6da9158-99e7-438f-a38b-9d3c7239f9c4","listingId":"78816207-f1cd-4d1d-8f95-58a60d9aa125","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"adithya-s-k","category":"manim_skill","install_from":"skills.sh"},"createdAt":"2026-04-18T20:33:29.849Z"}],"sources":[{"listingId":"78816207-f1cd-4d1d-8f95-58a60d9aa125","source":"github","sourceId":"adithya-s-k/manim_skill/manimgl-best-practices","sourceUrl":"https://github.com/adithya-s-k/manim_skill/tree/main/skills/manimgl-best-practices","isPrimary":false,"firstSeenAt":"2026-04-18T21:56:31.015Z","lastSeenAt":"2026-05-18T18:53:19.711Z"},{"listingId":"78816207-f1cd-4d1d-8f95-58a60d9aa125","source":"skills_sh","sourceId":"adithya-s-k/manim_skill/manimgl-best-practices","sourceUrl":"https://skills.sh/adithya-s-k/manim_skill/manimgl-best-practices","isPrimary":true,"firstSeenAt":"2026-04-18T20:33:29.849Z","lastSeenAt":"2026-05-07T22:40:36.748Z"}],"details":{"listingId":"78816207-f1cd-4d1d-8f95-58a60d9aa125","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"adithya-s-k","slug":"manimgl-best-practices","github":{"repo":"adithya-s-k/manim_skill","stars":868,"topics":["agent-skills"],"license":"mit","html_url":"https://github.com/adithya-s-k/manim_skill","pushed_at":"2026-01-23T16:30:42Z","description":"Agent skills for Manim to create 3Blue1Brown style animations.","skill_md_sha":"c75eeab2ce737de3ce56c4a775bf1569fac98d76","skill_md_path":"skills/manimgl-best-practices/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/adithya-s-k/manim_skill/tree/main/skills/manimgl-best-practices"},"layout":"multi","source":"github","category":"manim_skill","frontmatter":{"name":"manimgl-best-practices","description":"Trigger when: (1) User mentions \"manimgl\" or \"ManimGL\" or \"3b1b manim\", (2) Code contains `from manimlib import *`, (3) User runs `manimgl` CLI commands, (4) Working with InteractiveScene, self.frame, self.embed(), ShowCreation(), or ManimGL-specific patterns.\n\nBest practices for ManimGL (Grant Sanderson's 3Blue1Brown version) - OpenGL-based animation engine with interactive development. Covers InteractiveScene, Tex with t2c, camera frame control, interactive mode (-se flag), 3D rendering, and checkpoint_paste() workflow.\n\nNOT for Manim Community Edition (which uses `manim` imports and `manim` CLI)."},"skills_sh_url":"https://skills.sh/adithya-s-k/manim_skill/manimgl-best-practices"},"updatedAt":"2026-05-18T18:53:19.711Z"}}