[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M70J9S0ME1VYKDDRXK70NA8E":3,"skill-same:01M70J9S0ME1VYKDDRXK70NA8E":185},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":63,"commitSha":64,"skillDirectory":65,"forksCount":66,"repositoryHtmlUrl":67,"repositoryHomepageUrl":6,"ownerHtmlUrl":68,"ownerBlogUrl":6,"ownerDescription":69,"updatedAt":70,"install":71,"resources":84},"01M70J9S0ME1VYKDDRXK70NA8E","math-animate",null,"Render mathematical, geometric, and scientific animations into MP4, GIF, WebM, or PNG using Manim Community Edition. Supports LaTeX formulas, 2D\u002F3D shapes, calculus graphing, 14 prebuilt math templates, SafeScene responsive layout engine, and transparent overlays.","mdnaimul22\u002Fhuman-skills","mdnaimul22","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F64520358?v=4","01M70FH95MH2H796Q01TYSFZ03","Naimul","01M70FH96798CQR4YHA13F17GA",3,"MIT","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"math","math animate","animate","templates","calculus","graphics","engine","2d","animations","formulas","responsive","responsive layout","human","scientific","team","geometry","overlays","3D","Animation","Video","2026-11-10 10:12:30",false,"---\nname: \"math-animate\"\ndescription: \"Render mathematical, geometric, and scientific animations into MP4, GIF, WebM, or PNG using Manim Community Edition. Supports LaTeX formulas, 2D\u002F3D shapes, calculus graphing, 14 prebuilt math templates, SafeScene responsive layout engine, and transparent overlays.\"\nversion: \"2.2.0\"\nauthor: \"Human Skill Team\"\ntags: [\"animation\", \"graphics\", \"math\", \"manim\", \"visualization\", \"video\", \"latex\", \"geometry\", \"templates\", \"safescene\"]\ntrigger_patterns:\n  - \"math animation\"\n  - \"manim\"\n  - \"render manim\"\n  - \"math video\"\n  - \"animate equation\"\n  - \"calculus animation\"\n  - \"geometry animation\"\n  - \"latex animation\"\n  - \"plot animation\"\n  - \"safescene\"\n  - \"math template\"\n---\n\n# Mathematical & Scientific Animation (Manim)\n\n## When to Use\n\nActivate this skill when the user asks to:\n- Create mathematical animations, geometry transformations, or formula morphs.\n- Build clean educational math lessons using `SafeScene` and prebuilt `templates`.\n- Visualize calculus, coordinate systems, linear algebra, or physics phenomena.\n- Generate educational math videos (MP4), WebM overlays, or animated GIF demonstrations.\n- Render transparent animations for video compositing or slide presentations.\n- Export single-frame mathematical figures or diagrams to PNG.\n\n---\n\n## The **math_animate** Tool\n\nThis skill uses the `math_animate` tool to compile and render Python Manim scenes into high-quality media files.\n\n### 📝 PARAMETERS:\n\n| Parameter | Type | Required | Default | Description |\n|:---|:---|:---:|:---|:---|\n| `example` | `string` | No | — | Curated quality examples inspector. Pass `\"list\"` to view all curated `scene_name`s in `command.json`, or pass `\"\u003Cscene_name>\"` to view its full code and parameters. |\n| `scene_code` | `string` | **Yes\\*** | — | Python code defining a Manim Scene (`Scene`, `ThreeDScene`, or `SafeScene`). \\*Not required if `example` is provided. |\n| `scene_name` | `string` | No | *auto-detected* | Name of the Scene class to render (e.g. `\"EquationLesson\"`). |\n| `output_path` | `string` | No | `data\u002Fmath_animate\u002F\u003CScene>_\u003Ctimestamp>.\u003Cfmt>` | Target filepath for output. Always placed in `data\u002F` directory. |\n| `aspect_ratio` | `string` | No | `\"16:9\"` | Aspect ratio: `\"16:9\"` (landscape) or `\"9:16\"` (vertical mobile \u002F Shorts \u002F Reels). |\n| `quality` | `string` | No | `\"medium\"` | Preset: `\"preview\"` (draft), `\"low\"` (480p), `\"medium\"` (720p), `\"high\"` (1080p), `\"4k\"` (2160p). |\n| `format` | `string` | No | `\"mp4\"` | Output format: `\"mp4\"`, `\"gif\"`, `\"png\"`, `\"webm\"`. (Default: `\"gif\"` if `quality=\"preview\"` without explicit format). |\n| `transparent` | `string` | No | `\"false\"` | Render with an alpha\u002Ftransparent background (`\"true\"` \u002F `\"false\"`). |\n| `background_color` | `string` | No | *default black* | Hex color code for canvas background (e.g. `\"#1a1a2e\"`). |\n| `allow_unsafe_code`| `string` | No | `\"false\"` | Bypass AST security denylist check (`\"true\"` \u002F `\"false\"`). |\n\n### 🎬 QUALITY & ASPECT RATIO PRESETS:\n\n| Quality Preset | 16:9 Resolution | 9:16 Resolution | Frame Rate | Intended Use |\n|:---|:---|:---|:---|:---|\n| `\"preview\"` | 854x480 | 480x854 | 15 fps | Quick draft test (MP4 or GIF) |\n| `\"low\"` | 854x480 | 480x854 | 15 fps | Fast development draft |\n| `\"medium\"` | 1280x720 | 720x1280 | 30 fps | Standard balance of speed and clarity (Default) |\n| `\"high\"` | 1920x1080 | 1080x1920 | 60 fps | Full HD crisp video |\n| `\"4k\"` | 3840x2160 | 2160x3840 | 60 fps | Ultra-high definition presentation \u002F master output |\n\n---\n\n## 📋 HOW TO CALL THIS TOOL:\n\nThe agent executes `human-skills` with the JSON payload passed directly as a string argument:\n\n```bash\nhuman-skills '{\"tool_name\": \"math_animate\", \"tool_args\": {\"scene_code\": \"class CircleToSquare(Scene):\\n    def construct(self):\\n        circle = Circle(color=BLUE)\\n        square = Square(color=RED)\\n        self.play(Create(circle))\\n        self.play(Transform(circle, square))\\n        self.wait(1)\", \"scene_name\": \"CircleToSquare\", \"quality\": \"medium\", \"aspect_ratio\": \"16:9\", \"format\": \"mp4\", \"output_path\": \"data\u002Fcircle_to_square.mp4\"}}'\n```\n\n### ⚠️ RUNTIME INJECTIONS & SYSTEM GUARANTEES:\n- **Automatic Imports**: Both `from manim import *` and `from templates import *` are automatically injected into `scene_code`.\n- **Prebuilt Visual Kit**: `SafeScene`, `Layout`, and all 14 specialized templates are immediately available without manual imports.\n- **Scene Detection**: If `scene_name` is omitted, the tool automatically detects the single defined `Scene` class.\n- **AST Security**: Unsafe imports (`os`, `sys`, `subprocess`, `socket`, `open`, etc.) are blocked by default.\n\n---\n\n## 🎨 Visual Kit & SafeScene Architecture\n\nFor educational math animations, inherit from `SafeScene` rather than standard `Scene`. `SafeScene` automatically manages screen boundaries, responsive scaling, and eliminates overlap bugs.\n\n```mermaid\nflowchart TD\n    subgraph ScreenFrame[\"SafeScene Frame\"]\n        TOP[\"Title Region: self.show_title('...')\"]\n        MAIN[\"Main Content Region: self.show_main(content, layout=...)\"]\n        BOT[\"Bottom Caption Region: self.set_bottom_text('...')\"]\n    end\n    TOP --> MAIN --> BOT\n```\n\n### Core API Methods:\n\n| Method | Purpose |\n|:---|:---|\n| `self.show_title(text, color=WHITE)` | Writes title at top; replaces previous title cleanly if called again. |\n| `self.show_main(content, layout=Layout.CENTER, caption=None)` | Clears previous main content and fades in new content. |\n| `self.transform_main(content, layout=Layout.CENTER, caption=None)` | Smoothly morphs current main content into new content. |\n| `self.set_bottom_text(text_or_none, color=WHITE)` | Displays explanatory subtitle at bottom. Pass `None` to fade out. |\n| `self.play_action(animation)` | Executes template-owned animation (e.g. `self.play_action(template.action(...))`). |\n| `self.clear_content()` | Fades out both main content and bottom text. |\n| `self.fade_out_all()` | Fades out entire screen (title, main, bottom) at lesson end. |\n\n### Layout Control:\n- `layout=Layout.CENTER`: Automatically scales and centers a single template.\n- `layout=Layout.SPLIT`: Displays two templates side-by-side: `VGroup(left_template, right_template)`.\n- *For detailed frame mathematics and composition rules, see [visual-kit-api.md](references\u002Fvisual-kit-api.md) and [layout-composition.md](references\u002Flayout-composition.md).*\n\n---\n\n## 📦 Complete API Catalog of Prebuilt Math Templates\n\nAll 14 templates inherit `VisualTemplate`, enforce explicit `state` values, and are exposed globally via `from templates import *`.\n\n---\n\n### 1. `EquationTemplate`\nMathematical formulas, derivations, multi-step history, and expression morphing.\n- **Valid States**:\n  - `\"display\"`: Single formula. Requires `expression=\"str\"`. (Does NOT accept `expressions`).\n  - `\"derivation\"`: 1-3 step derivation history. Requires `expressions=[\"step1\", \"step2\", ...]`.\n  - `\"statements\"`: Up to 3 equivalent statements. Requires `expressions=[\"stmt1\", \"stmt2\"]`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `expression: str | None = None`\n  - `expressions: list[str] | None = None`\n- **Action Methods**:\n  - `set_expression(expression: str) -> Animation`: Morphs current equation into a new expression (`display` state).\n  - `advance_step(expression: str) -> Animation`: Advances derivation history with next step (`derivation` state).\n  - `highlight_formula(index: int | None = None) -> Animation`: Pulses yellow highlight around formula.\n- **Example**:\n  ```python\n  eq = EquationTemplate(state=\"display\", expression=\"E = mc^2\")\n  # Or derivation:\n  eq = EquationTemplate(state=\"derivation\", expressions=[\"2x + 4 = 10\", \"2x = 6\", \"x = 3\"])\n  self.play_action(eq.advance_step(\"x = 3\"))\n  ```\n\n---\n\n### 2. `FunctionGraphTemplate`\nFunction curves, tangents, secants, definite integrals, marked points, and comparative graphs.\n- **Valid States**: `\"curve\"`, `\"marked_points\"`, `\"secant\"`, `\"tangent\"`, `\"area\"`, `\"signed_areas\"`, `\"comparison\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `function_type: str = \"quadratic\"` (`\"quadratic\"`, `\"cubic\"`, `\"sine\"`, `\"cosine\"`, `\"exponential\"`, `\"linear\"`, `\"rational\"`)\n  - `function_parameters: dict | None = None` (e.g. `{\"a\": 1, \"b\": 0, \"c\": 0}`)\n  - `function_label: str = \"f(x)\"`\n  - `tangent_x: float = 1.0` (active tangent point for `\"tangent\"` state)\n  - `secant_xs: tuple[float, float] = (-1, 2)` (secant line points for `\"secant\"` state)\n  - `area_interval: tuple[float, float] = (0.5, 2)` (integral shading interval for `\"area\"` state)\n  - `marked_xs: list[float] = ()` (critical x-coordinates for `\"marked_points\"` state)\n  - `comparison_function_type: str | None = None` (second function for `\"comparison\"` state)\n  - `comparison_label: str = \"g(x)\"`\n  - `x_range: tuple[float, float, float] = (-5, 6, 1)`\n  - `y_range: tuple[float, float, float] = (-4, 7, 1)`\n  - `graph_x_range: tuple[float, float] = (-4.5, 4.5)`\n- **Action Methods**:\n  - `reveal_tangent() -> Animation`: Draws tangent line at `tangent_x`.\n  - `move_secant_point(target_x: float) -> Animation`: Moves secant point towards limit.\n  - `shade_interval(start: float, end: float) -> Animation`: Dynamically shades area under curve.\n  - `highlight_intercept() -> Animation`: Highlights axis intercept markers.\n- **Example**:\n  ```python\n  graph = FunctionGraphTemplate(state=\"tangent\", function_type=\"quadratic\", tangent_x=1.0)\n  self.play_action(graph.reveal_tangent())\n  ```\n\n---\n\n### 3. `VectorTemplate`\n2D Vectors, coordinate components, vector addition (triangle law), subtraction, projection, and scalar multiplication.\n- **Valid States**: `\"single\"`, `\"components\"`, `\"addition\"`, `\"subtraction\"`, `\"scalar_multiple\"`, `\"projection\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `vector_a: tuple[float, float]` (REQUIRED, e.g. `(3, 2)`)\n  - `vector_b: tuple[float, float] | None = None` (second vector for addition\u002Fsubtraction\u002Fprojection)\n  - `scalar: float = 2.0` (multiplier for `\"scalar_multiple\"` state)\n  - `vector_a_label: str = \"a\"`, `vector_b_label: str = \"b\"`, `result_label: str = \"r\"`\n  - `show_grid: bool = True`, `show_coordinate_labels: bool = True`\n  - `x_range: tuple[float, float, float] = (-5, 6, 1)`, `y_range: tuple[float, float, float] = (-5, 6, 1)`\n- **Action Methods**:\n  - `reveal_components() -> Animation`: Draws dashed orthogonal $x$ and $y$ component vectors.\n  - `reveal_resultant() -> Animation`: Animates resultant vector $\\vec{a} + \\vec{b}$.\n  - `set_scalar(target_scalar: float) -> Animation`: Scales vector dynamically.\n  - `highlight_vector(role: str) -> Animation`: Pulses vector arrow (`role=\"a\"`, `\"b\"`, or `\"r\"`).\n  - `highlight_projection() -> Animation`: Projects vector $\\vec{a}$ onto $\\vec{b}$.\n- **Example**:\n  ```python\n  vec = VectorTemplate(state=\"components\", vector_a=(3, 2))\n  self.play_action(vec.reveal_components())\n  ```\n\n---\n\n### 4. `MatrixTemplate`\nMatrix representations, cell highlights, row\u002Fcolumn operations, and matrix-matrix multiplication steps.\n- **Valid States**: `\"display\"`, `\"product_setup\"`, `\"product_progress\"`, `\"product_complete\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `matrix: list[list[float]] | None = None` (data matrix for `\"display\"` state, e.g. `[[1, 2], [3, 4]]`)\n  - `left_matrix: list[list[float]] | None = None` (multiplier matrix $A$ for `\"product_*\"` states)\n  - `right_matrix: list[list[float]] | None = None` (multiplicand matrix $B$ for `\"product_*\"` states)\n  - `left_label: str = \"A\"`, `right_label: str = \"B\"`, `result_label: str = \"C\"`\n  - `active_row: int = 0`, `active_column: int = 0`\n- **Action Methods**:\n  - `reveal_product_cell() -> Animation`: Computes dot product for `active_row` and `active_column`.\n  - `select_product_cell(row: int, column: int) -> Animation`: Moves active focus to specified cell.\n  - `highlight_row(row: int) -> Animation`: Outlines target row in yellow.\n  - `highlight_column(column: int) -> Animation`: Outlines target column in yellow.\n  - `highlight_cell(row: int, column: int) -> Animation`: Pulses target entry.\n- **Example**:\n  ```python\n  mat = MatrixTemplate(state=\"product_setup\", left_matrix=[[1, 2], [3, 4]], right_matrix=[[2, 0], [1, 2]])\n  self.play_action(mat.reveal_product_cell())\n  ```\n\n---\n\n### 5. `NumberLineTemplate`\nConfigurable real number line with point markers, single\u002Fmultiple intervals, arithmetic movements, and distance.\n- **Valid States**: `\"points\"`, `\"interval\"`, `\"intervals\"`, `\"operation\"`, `\"distance\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `x_range: tuple[float, float, float] = (-5, 6, 1)`\n  - `points: list[float] = ()` (labeled points for `\"points\"` state)\n  - `point_labels: list[str] | None = None`\n  - `start: float = -2`, `end: float = 2` (interval range for `\"interval\"` state)\n  - `left_closed: bool = True`, `right_closed: bool = True` (bracket\u002Fparenthesis styling)\n  - `intervals: list[tuple[float, float, bool, bool]] = ()` (for `\"intervals\"` state)\n  - `center: float | None = None`, `radius: float | None = None` (for absolute value `\"distance\"`)\n  - `value: float = 0`, `value_label: str | None = None` (for `\"operation\"`)\n- **Action Methods**:\n  - `move_point(target_value: float) -> Animation`: Slides marker along number line.\n  - `set_interval(start: float, end: float, left_closed: bool, right_closed: bool) -> Animation`: Updates interval bounds.\n  - `highlight_distance() -> Animation`: Highlights segment between center and radius.\n- **Example**:\n  ```python\n  numline = NumberLineTemplate(state=\"interval\", start=-1, end=3, left_closed=True, right_closed=False)\n  self.play_action(numline.move_point(2.0))\n  ```\n\n---\n\n### 6. `UnitCircleTemplate`\nTrigonometric unit circle, arbitrary angle arcs, coordinate readouts $(x, y) = (\\cos\\theta, \\sin\\theta)$, and reference triangles.\n- **Valid States**: `\"base\"`, `\"angle\"`, `\"coordinates\"`, `\"reference_triangle\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `angle_degrees: float = 30` (angle $\\theta$ in degrees)\n  - `angle_label: str | None = None`\n  - `coordinate_label: str | None = None`\n  - `cosine_label: str = r\"\\cos\\theta\"`, `sine_label: str = r\"\\sin\\theta\"`, `radius_label: str = \"1\"`\n  - `show_axes_labels: bool = True`\n- **Action Methods**:\n  - `rotate_to_angle(target_degrees: float, angle_label=None, coordinate_label=None) -> Animation`: Rotates radius ray to new angle.\n  - `reveal_coordinates() -> Animation`: Displays $(\\cos\\theta, \\sin\\theta)$ coordinates.\n  - `reveal_reference_triangle() -> Animation`: Draws right reference triangle inside circle.\n  - `highlight_projection(axis: str) -> Animation`: Pulses projection onto `\"x\"` or `\"y\"` axis.\n- **Example**:\n  ```python\n  circle = UnitCircleTemplate(state=\"coordinates\", angle_degrees=45)\n  self.play_action(circle.rotate_to_angle(60))\n  ```\n\n---\n\n### 7. `LinearTransformationTemplate`\nVisualizes 2D linear matrix transformations $T(\\vec{x}) = A\\vec{x}$ warping coordinate grid lines and basis vectors $\\hat{i}, \\hat{j}$.\n- **Valid States**: `\"setup\"`, `\"comparison\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `matrix: list[list[float]]` (REQUIRED, $2\\times 2$ matrix, e.g. `[[2, 1], [0, 1.5]]`)\n  - `vectors: list[tuple[float, float]]` (REQUIRED, vectors transformed by matrix, e.g. `[(1, 0), (0, 1)]`)\n  - `vector_labels: list[str] | None = None`\n  - `active_index: int = 0`\n  - `show_span: bool = False`, `show_matrix_label: bool = True`\n  - `x_range: tuple[float, float, float] = (-5, 6, 1)`, `y_range: tuple[float, float, float] = (-5, 6, 1)`\n- **Action Methods**:\n  - `apply_transformation() -> Animation`: Transforms grid and basis vectors using matrix $A$.\n  - `highlight_vector(index: int) -> Animation`: Pulses target vector.\n  - `highlight_span(index: int) -> Animation`: Visualizes span subspace.\n- **Example**:\n  ```python\n  lin_trans = LinearTransformationTemplate(state=\"setup\", matrix=[[1, 1], [0, 1]], vectors=[(1, 0), (0, 1)])\n  self.play_action(lin_trans.apply_transformation())\n  ```\n\n---\n\n### 8. `TriangleTemplate`\nRight triangles, scalene\u002Fisosceles\u002Fequilateral triangles, hypotenuse emphasis, altitudes, and angle bisectors.\n- **Valid States**: `\"right_base\"`, `\"right_labeled\"`, `\"right_hypotenuse_highlighted\"`, `\"right_squares\"`, `\"general_base\"`, `\"general_labeled\"`, `\"altitude\"`, `\"median\"`, `\"angle_bisector\"`, `\"non_right_labeled\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `triangle_type: str = \"scalene\"` (`\"right\"`, `\"scalene\"`, `\"equilateral\"`, `\"isosceles\"`)\n  - `leg_a: float | None = None`, `leg_b: float | None = None` (for right triangles)\n  - `width: float = 3.2`, `height: float = 2.2`, `apex_offset: float = 0.15`\n  - `vertex_labels: tuple[str, str, str] = ('A', 'B', 'C')`\n  - `side_labels: tuple[str, str, str] = ('a', 'b', 'c')`\n  - `active_vertex: str = 'A'`\n- **Action Methods**:\n  - `highlight_side(side: str) -> Animation`: Outlines side (`side=\"a\"`, `\"b\"`, or `\"c\"`).\n  - `highlight_angle(vertex: str) -> Animation`: Highlights angle arc at vertex (`vertex=\"A\"`, `\"B\"`, or `\"C\"`).\n  - `highlight_construction() -> Animation`: Emphasizes altitude, median, or bisector.\n- **Example**:\n  ```python\n  tri = TriangleTemplate(state=\"right_labeled\", leg_a=2.0, leg_b=3.0)\n  self.play_action(tri.highlight_side(\"c\"))\n  ```\n\n---\n\n### 9. `PythagoreanAreaTemplate`\nGeometric proof of $a^2 + b^2 = c^2$ with squares attached to right triangle sides.\n- **Valid States**: `\"c_square\"`, `\"ab_squares\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `leg_a: float = 1.35`\n  - `leg_b: float = 2.15`\n  - `include_side_labels: bool = True`\n- **Example**:\n  ```python\n  pyth = PythagoreanAreaTemplate(state=\"ab_squares\", leg_a=1.5, leg_b=2.0)\n  ```\n\n---\n\n### 10. `LineGeometryTemplate`\n2D Coordinate geometry, slopes, rise-over-run triangles, midpoints, segment distances, and line intersections.\n- **Valid States**: `\"point_plot\"`, `\"slope_rise_run\"`, `\"midpoint\"`, `\"distance\"`, `\"line_equation\"`, `\"intercepts\"`, `\"intersection\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `point_a: tuple[float, float]` (REQUIRED, e.g. `(0, 0)`)\n  - `point_b: tuple[float, float] | None = None` (second point, e.g. `(3, 2)`)\n  - `slope: float | None = None`, `y_intercept: float | None = None`\n  - `line2_slope: float | None = None`, `line2_y_intercept: float | None = None` (for `\"intersection\"`)\n  - `x_range: tuple = (-6, 6, 1)`, `y_range: tuple = (-4, 4, 1)`\n  - `labels: bool = True`\n- **Action Methods**:\n  - `show_slope_triangle() -> Animation`: Draws rise-over-run right triangle.\n  - `show_midpoint() -> Animation`: Displays midpoint dot and coordinate label.\n  - `show_distance() -> Animation`: Highlights segment distance with length label.\n  - `show_intercepts() -> Animation`: Points to $x$- and $y$-intercepts.\n  - `show_intersection() -> Animation`: Identifies solution point where two lines cross.\n- **Example**:\n  ```python\n  line = LineGeometryTemplate(state=\"slope_rise_run\", point_a=(1, 1), point_b=(4, 3))\n  self.play_action(line.show_slope_triangle())\n  ```\n\n---\n\n### 11. `CircleTheoremsTemplate`\nCircle geometry theorems: tangent-radius perpendicularity, chord bisectors, secants, central angles, and inscribed angles.\n- **Valid States**: `\"radius_tangent\"`, `\"chord\"`, `\"secant\"`, `\"arc_central\"`, `\"inscribed_angle\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `radius: float = 2.0`, `center: tuple[float, float] = (0, 0)`\n  - `chord_angle: float = 60`\n  - `secant_point: tuple[float, float] = (4, 0)`\n  - `arc_start_angle: float = 30`, `arc_end_angle: float = 150`\n  - `inscribed_vertex_angle: float = 200`\n  - `labels: bool = True`\n- **Action Methods**:\n  - `show_radius_tangent() -> Animation`: Marks $90^\\circ$ right angle between radius and tangent line.\n  - `show_perpendicular_bisector() -> Animation`: Draws chord bisector through center.\n  - `show_arc_angle() -> Animation`: Highlights central angle and subtended arc.\n  - `show_inscribed_relationship() -> Animation`: Demonstrates inscribed angle is half of central angle.\n- **Example**:\n  ```python\n  circle_thm = CircleTheoremsTemplate(state=\"radius_tangent\")\n  self.play_action(circle_thm.show_radius_tangent())\n  ```\n\n---\n\n### 12. `PolygonTransformationTemplate`\n2D Rigid transformations of arbitrary polygons: translations, reflections over axes, rotations about a center, and dilations.\n- **Valid States**: `\"original\"`, `\"translated\"`, `\"reflected\"`, `\"rotated\"`, `\"dilated\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `vertices: list[tuple[float, float]]` (REQUIRED, e.g. `[(0, 0), (2, 0), (1, 2)]`)\n  - `translation_vector: tuple[float, float] = (2, 1)` (for `\"translated\"` state)\n  - `reflection_axis: str = \"x\"` (`\"x\"` or `\"y\"` for `\"reflected\"` state)\n  - `rotation_angle: float = 90`, `rotation_center: tuple[float, float] = (0, 0)` (for `\"rotated\"` state)\n  - `dilation_factor: float = 2.0`, `dilation_center: tuple[float, float] = (0, 0)` (for `\"dilated\"` state)\n  - `x_range: tuple = (-6, 6, 1)`, `y_range: tuple = (-4, 4, 1)`\n  - `labels: bool = True`\n- **Action Methods**:\n  - `translate() -> Animation`: Moves polygon along `translation_vector`.\n  - `reflect() -> Animation`: Flips polygon across `reflection_axis`.\n  - `dilate() -> Animation`: Scales polygon by `dilation_factor`.\n- **Example**:\n  ```python\n  poly = PolygonTransformationTemplate(state=\"translated\", vertices=[(0, 0), (2, 0), (1, 2)], translation_vector=(2, 1))\n  self.play_action(poly.translate())\n  ```\n\n---\n\n### 13. `FunctionTranslationTemplate`\nVisualizes function shifts $f(x - h) + k$ and horizontal scaling $f(ax)$ against parent curves.\n- **Valid States**: `\"parent\"`, `\"comparison\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `parent_function = lambda x: x**2`\n  - `h: float = 0` (horizontal shift)\n  - `k: float = 0` (vertical shift)\n  - `a: float | None = None` (horizontal compression\u002Fexpansion factor)\n  - `anchor_point: tuple[float, float] | None = (0, 0)`\n  - `parent_label: str = \"f(x)\"`, `transformed_label: str | None = None`\n  - `x_range: tuple[float, float, float] = (-4, 5, 1)`, `y_range: tuple[float, float, float] = (-3, 7, 1)`\n- **Action Methods**:\n  - `shift_horizontal(target_h: float) -> Animation`: Animates horizontal translation.\n  - `shift_vertical(target_k: float) -> Animation`: Animates vertical translation.\n  - `scale_horizontal(target_a: float) -> Animation`: Scales curve horizontally.\n- **Example**:\n  ```python\n  f_trans = FunctionTranslationTemplate(state=\"comparison\", h=2, k=1)\n  self.play_action(f_trans.shift_horizontal(2))\n  ```\n\n---\n\n### 14. `FractionModelTemplate`\nProportional fraction visual models: horizontal fraction bars, circular pie models, and partition grids.\n- **Valid States**: `\"bar\"`, `\"grid\"`, `\"circle\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `numerator: int = 1`\n  - `denominator: int = 2`\n  - `show_label: bool = True`\n  - `label: str | None = None`\n  - `grid_shape: tuple[int, int] | None = None` (e.g. `(2, 5)` for $2\\times 5$ grid of 10)\n  - `show_part_numbers: bool = False`\n- **Action Methods**:\n  - `set_fraction(numerator: int, denominator: int) -> Animation`: Updates filled portions.\n  - `highlight_filled_parts() -> Animation`: Pulses active numerator fractions.\n  - `highlight_wholes() -> Animation`: Highlights complete unit wholes.\n  - `show_equivalent_fraction(multiplier: int) -> Animation`: Subdivides parts to show equivalence (e.g. $1\u002F2 = 2\u002F4$).\n- **Example**:\n  ```python\n  frac = FractionModelTemplate(state=\"circle\", numerator=3, denominator=4)\n  self.play_action(frac.show_equivalent_fraction(multiplier=2))\n  ```\n\n---\n\n## Scenario-Based Instructions\n\n### 📐 Scenario 1: Step-by-Step Derivation with SafeScene & EquationTemplate\n\n**When:** Explaining algebraic proofs, step-by-step problem solving, or formula derivations.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class QuadraticDerivation(SafeScene):\\n    def construct(self):\\n        self.show_title(\\\"Solving Quadratic Equation\\\")\\n        eq = EquationTemplate(state=\\\"derivation\\\", expressions=[\\\"ax^2 + bx + c = 0\\\", \\\"ax^2 + bx = -c\\\", \\\"x^2 + \\\\\\\\frac{b}{a}x = -\\\\\\\\frac{c}{a}\\\"])\\n        self.show_main(eq, layout=Layout.CENTER)\\n        self.set_bottom_text(\\\"Step 1: Isolate the variable terms and normalize\\\")\\n        self.wait(1.5)\\n        self.play_action(eq.advance_step(\\\"x = \\\\\\\\frac{-b \\\\\\\\pm \\\\\\\\sqrt{b^2 - 4ac}}{2a}\\\"))\\n        self.set_bottom_text(\\\"Final solution found by completing the square\\\")\\n        self.wait(2)\\n        self.fade_out_all()\",\n        \"scene_name\": \"QuadraticDerivation\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Fquadratic_derivation.mp4\"\n    }\n}'\n```\n\n---\n\n### 📈 Scenario 2: Calculus Tangent & Graph with FunctionGraphTemplate\n\n**When:** Demonstrating derivatives, tangent lines, or curve behavior.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class TangentLesson(SafeScene):\\n    def construct(self):\\n        self.show_title(\\\"Derivative as Slope of Tangent\\\")\\n        graph = FunctionGraphTemplate(state=\\\"tangent\\\", function_type=\\\"quadratic\\\", tangent_x=1.0)\\n        self.show_main(graph, layout=Layout.CENTER)\\n        self.set_bottom_text(\\\"Initial tangent line at x = 1.0\\\")\\n        self.wait(1)\\n        self.play_action(graph.reveal_tangent())\\n        self.set_bottom_text(\\\"Slope of tangent line equals the derivative f'(1)\\\")\\n        self.wait(2)\\n        self.fade_out_all()\",\n        \"scene_name\": \"TangentLesson\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Ftangent_lesson.mp4\"\n    }\n}'\n```\n\n---\n\n### ⚖️ Scenario 3: Side-by-Side Comparison with Layout.SPLIT\n\n**When:** Comparing two mathematical representations or before\u002Fafter states.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class VectorComparison(SafeScene):\\n    def construct(self):\\n        self.show_title(\\\"Vector Components vs Resultant\\\")\\n        v_comp = VectorTemplate(state=\\\"components\\\", vector_a=(3, 2))\\n        v_single = VectorTemplate(state=\\\"single\\\", vector_a=(3, 2))\\n        self.show_main(VGroup(v_comp, v_single), layout=Layout.SPLIT)\\n        self.set_bottom_text(\\\"Left: Orthogonal components; Right: Resultant vector\\\")\\n        self.wait(1.5)\\n        self.play_action(v_comp.reveal_components())\\n        self.wait(2)\\n        self.fade_out_all()\",\n        \"scene_name\": \"VectorComparison\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Fvector_comparison.mp4\"\n    }\n}'\n```\n\n---\n\n### 🧊 Scenario 4: 3D Surface & Camera Motion\n\n**When:** Demonstrating 3D vector fields, surfaces, or rotating perspective geometries using `ThreeDScene`.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class ThreeDSphere(ThreeDScene):\\n    def construct(self):\\n        axes = ThreeDAxes()\\n        sphere = Surface(lambda u, v: np.array([1.5 * np.cos(u) * np.cos(v), 1.5 * np.cos(u) * np.sin(v), 1.5 * np.sin(u)]), u_range=[-np.pi\u002F2, np.pi\u002F2], v_range=[0, 2*np.pi], resolution=(16, 32), fill_color=BLUE_D, fill_opacity=0.7)\\n        self.set_camera_orientation(phi=75 * DEGREES, theta=-45 * DEGREES)\\n        self.add(axes)\\n        self.play(Create(sphere))\\n        self.begin_ambient_camera_rotation(rate=0.2)\\n        self.wait(2)\\n        self.stop_ambient_camera_rotation()\",\n        \"scene_name\": \"ThreeDSphere\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Fthreed_sphere.mp4\"\n    }\n}'\n```\n\n---\n\n### 🎭 Scenario 5: Transparent Overlay for Video Editing (WebM \u002F Alpha)\n\n**When:** Rendering motion graphics with a transparent background to composite over live footage or slide decks.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class LowerThird(Scene):\\n    def construct(self):\\n        banner = Rectangle(width=6.0, height=1.0, color=GOLD, fill_opacity=0.3)\\n        text = Text(\\\"Mathematical Proof\\\", font_size=32, color=WHITE)\\n        group = VGroup(banner, text).to_corner(DL, buff=0.8)\\n        self.play(FadeIn(group, shift=RIGHT))\\n        self.wait(2)\\n        self.play(FadeOut(group, shift=LEFT))\",\n        \"scene_name\": \"LowerThird\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"webm\",\n        \"transparent\": \"true\",\n        \"output_path\": \"data\u002Flower_third_overlay.webm\"\n    }\n}'\n```\n\n---\n\n### 📱 Scenario 6: Mobile-Friendly Vertical Video (9:16 Shorts \u002F Reels \u002F TikTok)\n\n**When:** Rendering vertical animations for mobile feeds, YouTube Shorts, Instagram Reels, or TikTok.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class VerticalDerivative(Scene):\\n    def construct(self):\\n        title = Text(\\\"Calculus Shorts\\\", font_size=40, color=YELLOW)\\n        title.to_edge(UP, buff=1.0)\\n        func = MathTex(r\\\"f(x) = x^2\\\", font_size=50)\\n        deriv = MathTex(r\\\"f'\\''(x) = 2x\\\", font_size=50, color=BLUE)\\n        deriv.next_to(func, DOWN, buff=0.8)\\n        self.play(Write(title))\\n        self.play(Write(func))\\n        self.wait(0.5)\\n        self.play(TransformFromCopy(func, deriv))\\n        self.wait(1.5)\",\n        \"scene_name\": \"VerticalDerivative\",\n        \"aspect_ratio\": \"9:16\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Fvertical_derivative.mp4\"\n    }\n}'\n```\n\n---\n\n### 🖼️ Scenario 7: Fast Animated GIF Preview for Documentation \u002F Web\n\n**When:** Creating a quick, lightweight GIF animation for a README, web page, or tutorial.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class PulseDot(Scene):\\n    def construct(self):\\n        dot = Dot(color=PURPLE, radius=0.3)\\n        self.add(dot)\\n        self.play(dot.animate.scale(2).set_color(TEAL), rate_func=there_and_back, run_time=1.5)\\n        self.wait(0.5)\",\n        \"scene_name\": \"PulseDot\",\n        \"quality\": \"preview\",\n        \"format\": \"gif\",\n        \"output_path\": \"data\u002Fpulse_dot.gif\"\n    }\n}'\n```\n\n---\n\n## 📚 Deep Reference Documents\n\nFor comprehensive mathematical contracts, complete constructor signatures, and visual design rules, refer to the on-demand reference documents in `references\u002F`:\n\n| Reference Document | Scope & Contents |\n|:---|:---|\n| [templates_api_reference.md](references\u002Ftemplates_api_reference.md) | Exhaustive API signatures, parameters, constraints, and action methods for all 14 templates. |\n| [visual-kit-api.md](references\u002Fvisual-kit-api.md) | Complete SafeScene lifecycle, region geometry, layout bounds, and transition contracts. |\n| [layout-composition.md](references\u002Flayout-composition.md) | Frame safety rules, avoiding offscreen overflow, and group-first layout composition. |\n| [animation-patterns.md](references\u002Fanimation-patterns.md) | Semantic snapshot transitions, `show` vs `transform` continuity, and hold times. |\n| [math-visual-clarity.md](references\u002Fmath-visual-clarity.md) | Standardized math colors, LaTeX typography, cognitive load reduction, and visual hierarchy. |\n| [educational-storyboarding.md](references\u002Feducational-storyboarding.md) | Pacing, pedagogical scene breakdown, and instructional storyboarding principles. |\n\n","# Mathematical & Scientific Animation (Manim)\n\n## When to Use\n\nActivate this skill when the user asks to:\n- Create mathematical animations, geometry transformations, or formula morphs.\n- Build clean educational math lessons using `SafeScene` and prebuilt `templates`.\n- Visualize calculus, coordinate systems, linear algebra, or physics phenomena.\n- Generate educational math videos (MP4), WebM overlays, or animated GIF demonstrations.\n- Render transparent animations for video compositing or slide presentations.\n- Export single-frame mathematical figures or diagrams to PNG.\n\n---\n\n## The **math_animate** Tool\n\nThis skill uses the `math_animate` tool to compile and render Python Manim scenes into high-quality media files.\n\n### 📝 PARAMETERS:\n\n| Parameter | Type | Required | Default | Description |\n|:---|:---|:---:|:---|:---|\n| `example` | `string` | No | — | Curated quality examples inspector. Pass `\"list\"` to view all curated `scene_name`s in `command.json`, or pass `\"\u003Cscene_name>\"` to view its full code and parameters. |\n| `scene_code` | `string` | **Yes\\*** | — | Python code defining a Manim Scene (`Scene`, `ThreeDScene`, or `SafeScene`). \\*Not required if `example` is provided. |\n| `scene_name` | `string` | No | *auto-detected* | Name of the Scene class to render (e.g. `\"EquationLesson\"`). |\n| `output_path` | `string` | No | `data\u002Fmath_animate\u002F\u003CScene>_\u003Ctimestamp>.\u003Cfmt>` | Target filepath for output. Always placed in `data\u002F` directory. |\n| `aspect_ratio` | `string` | No | `\"16:9\"` | Aspect ratio: `\"16:9\"` (landscape) or `\"9:16\"` (vertical mobile \u002F Shorts \u002F Reels). |\n| `quality` | `string` | No | `\"medium\"` | Preset: `\"preview\"` (draft), `\"low\"` (480p), `\"medium\"` (720p), `\"high\"` (1080p), `\"4k\"` (2160p). |\n| `format` | `string` | No | `\"mp4\"` | Output format: `\"mp4\"`, `\"gif\"`, `\"png\"`, `\"webm\"`. (Default: `\"gif\"` if `quality=\"preview\"` without explicit format). |\n| `transparent` | `string` | No | `\"false\"` | Render with an alpha\u002Ftransparent background (`\"true\"` \u002F `\"false\"`). |\n| `background_color` | `string` | No | *default black* | Hex color code for canvas background (e.g. `\"#1a1a2e\"`). |\n| `allow_unsafe_code`| `string` | No | `\"false\"` | Bypass AST security denylist check (`\"true\"` \u002F `\"false\"`). |\n\n### 🎬 QUALITY & ASPECT RATIO PRESETS:\n\n| Quality Preset | 16:9 Resolution | 9:16 Resolution | Frame Rate | Intended Use |\n|:---|:---|:---|:---|:---|\n| `\"preview\"` | 854x480 | 480x854 | 15 fps | Quick draft test (MP4 or GIF) |\n| `\"low\"` | 854x480 | 480x854 | 15 fps | Fast development draft |\n| `\"medium\"` | 1280x720 | 720x1280 | 30 fps | Standard balance of speed and clarity (Default) |\n| `\"high\"` | 1920x1080 | 1080x1920 | 60 fps | Full HD crisp video |\n| `\"4k\"` | 3840x2160 | 2160x3840 | 60 fps | Ultra-high definition presentation \u002F master output |\n\n---\n\n## 📋 HOW TO CALL THIS TOOL:\n\nThe agent executes `human-skills` with the JSON payload passed directly as a string argument:\n\n```bash\nhuman-skills '{\"tool_name\": \"math_animate\", \"tool_args\": {\"scene_code\": \"class CircleToSquare(Scene):\\n    def construct(self):\\n        circle = Circle(color=BLUE)\\n        square = Square(color=RED)\\n        self.play(Create(circle))\\n        self.play(Transform(circle, square))\\n        self.wait(1)\", \"scene_name\": \"CircleToSquare\", \"quality\": \"medium\", \"aspect_ratio\": \"16:9\", \"format\": \"mp4\", \"output_path\": \"data\u002Fcircle_to_square.mp4\"}}'\n```\n\n### ⚠️ RUNTIME INJECTIONS & SYSTEM GUARANTEES:\n- **Automatic Imports**: Both `from manim import *` and `from templates import *` are automatically injected into `scene_code`.\n- **Prebuilt Visual Kit**: `SafeScene`, `Layout`, and all 14 specialized templates are immediately available without manual imports.\n- **Scene Detection**: If `scene_name` is omitted, the tool automatically detects the single defined `Scene` class.\n- **AST Security**: Unsafe imports (`os`, `sys`, `subprocess`, `socket`, `open`, etc.) are blocked by default.\n\n---\n\n## 🎨 Visual Kit & SafeScene Architecture\n\nFor educational math animations, inherit from `SafeScene` rather than standard `Scene`. `SafeScene` automatically manages screen boundaries, responsive scaling, and eliminates overlap bugs.\n\n```mermaid\nflowchart TD\n    subgraph ScreenFrame[\"SafeScene Frame\"]\n        TOP[\"Title Region: self.show_title('...')\"]\n        MAIN[\"Main Content Region: self.show_main(content, layout=...)\"]\n        BOT[\"Bottom Caption Region: self.set_bottom_text('...')\"]\n    end\n    TOP --> MAIN --> BOT\n```\n\n### Core API Methods:\n\n| Method | Purpose |\n|:---|:---|\n| `self.show_title(text, color=WHITE)` | Writes title at top; replaces previous title cleanly if called again. |\n| `self.show_main(content, layout=Layout.CENTER, caption=None)` | Clears previous main content and fades in new content. |\n| `self.transform_main(content, layout=Layout.CENTER, caption=None)` | Smoothly morphs current main content into new content. |\n| `self.set_bottom_text(text_or_none, color=WHITE)` | Displays explanatory subtitle at bottom. Pass `None` to fade out. |\n| `self.play_action(animation)` | Executes template-owned animation (e.g. `self.play_action(template.action(...))`). |\n| `self.clear_content()` | Fades out both main content and bottom text. |\n| `self.fade_out_all()` | Fades out entire screen (title, main, bottom) at lesson end. |\n\n### Layout Control:\n- `layout=Layout.CENTER`: Automatically scales and centers a single template.\n- `layout=Layout.SPLIT`: Displays two templates side-by-side: `VGroup(left_template, right_template)`.\n- *For detailed frame mathematics and composition rules, see [visual-kit-api.md](references\u002Fvisual-kit-api.md) and [layout-composition.md](references\u002Flayout-composition.md).*\n\n---\n\n## 📦 Complete API Catalog of Prebuilt Math Templates\n\nAll 14 templates inherit `VisualTemplate`, enforce explicit `state` values, and are exposed globally via `from templates import *`.\n\n---\n\n### 1. `EquationTemplate`\nMathematical formulas, derivations, multi-step history, and expression morphing.\n- **Valid States**:\n  - `\"display\"`: Single formula. Requires `expression=\"str\"`. (Does NOT accept `expressions`).\n  - `\"derivation\"`: 1-3 step derivation history. Requires `expressions=[\"step1\", \"step2\", ...]`.\n  - `\"statements\"`: Up to 3 equivalent statements. Requires `expressions=[\"stmt1\", \"stmt2\"]`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `expression: str | None = None`\n  - `expressions: list[str] | None = None`\n- **Action Methods**:\n  - `set_expression(expression: str) -> Animation`: Morphs current equation into a new expression (`display` state).\n  - `advance_step(expression: str) -> Animation`: Advances derivation history with next step (`derivation` state).\n  - `highlight_formula(index: int | None = None) -> Animation`: Pulses yellow highlight around formula.\n- **Example**:\n  ```python\n  eq = EquationTemplate(state=\"display\", expression=\"E = mc^2\")\n  # Or derivation:\n  eq = EquationTemplate(state=\"derivation\", expressions=[\"2x + 4 = 10\", \"2x = 6\", \"x = 3\"])\n  self.play_action(eq.advance_step(\"x = 3\"))\n  ```\n\n---\n\n### 2. `FunctionGraphTemplate`\nFunction curves, tangents, secants, definite integrals, marked points, and comparative graphs.\n- **Valid States**: `\"curve\"`, `\"marked_points\"`, `\"secant\"`, `\"tangent\"`, `\"area\"`, `\"signed_areas\"`, `\"comparison\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `function_type: str = \"quadratic\"` (`\"quadratic\"`, `\"cubic\"`, `\"sine\"`, `\"cosine\"`, `\"exponential\"`, `\"linear\"`, `\"rational\"`)\n  - `function_parameters: dict | None = None` (e.g. `{\"a\": 1, \"b\": 0, \"c\": 0}`)\n  - `function_label: str = \"f(x)\"`\n  - `tangent_x: float = 1.0` (active tangent point for `\"tangent\"` state)\n  - `secant_xs: tuple[float, float] = (-1, 2)` (secant line points for `\"secant\"` state)\n  - `area_interval: tuple[float, float] = (0.5, 2)` (integral shading interval for `\"area\"` state)\n  - `marked_xs: list[float] = ()` (critical x-coordinates for `\"marked_points\"` state)\n  - `comparison_function_type: str | None = None` (second function for `\"comparison\"` state)\n  - `comparison_label: str = \"g(x)\"`\n  - `x_range: tuple[float, float, float] = (-5, 6, 1)`\n  - `y_range: tuple[float, float, float] = (-4, 7, 1)`\n  - `graph_x_range: tuple[float, float] = (-4.5, 4.5)`\n- **Action Methods**:\n  - `reveal_tangent() -> Animation`: Draws tangent line at `tangent_x`.\n  - `move_secant_point(target_x: float) -> Animation`: Moves secant point towards limit.\n  - `shade_interval(start: float, end: float) -> Animation`: Dynamically shades area under curve.\n  - `highlight_intercept() -> Animation`: Highlights axis intercept markers.\n- **Example**:\n  ```python\n  graph = FunctionGraphTemplate(state=\"tangent\", function_type=\"quadratic\", tangent_x=1.0)\n  self.play_action(graph.reveal_tangent())\n  ```\n\n---\n\n### 3. `VectorTemplate`\n2D Vectors, coordinate components, vector addition (triangle law), subtraction, projection, and scalar multiplication.\n- **Valid States**: `\"single\"`, `\"components\"`, `\"addition\"`, `\"subtraction\"`, `\"scalar_multiple\"`, `\"projection\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `vector_a: tuple[float, float]` (REQUIRED, e.g. `(3, 2)`)\n  - `vector_b: tuple[float, float] | None = None` (second vector for addition\u002Fsubtraction\u002Fprojection)\n  - `scalar: float = 2.0` (multiplier for `\"scalar_multiple\"` state)\n  - `vector_a_label: str = \"a\"`, `vector_b_label: str = \"b\"`, `result_label: str = \"r\"`\n  - `show_grid: bool = True`, `show_coordinate_labels: bool = True`\n  - `x_range: tuple[float, float, float] = (-5, 6, 1)`, `y_range: tuple[float, float, float] = (-5, 6, 1)`\n- **Action Methods**:\n  - `reveal_components() -> Animation`: Draws dashed orthogonal $x$ and $y$ component vectors.\n  - `reveal_resultant() -> Animation`: Animates resultant vector $\\vec{a} + \\vec{b}$.\n  - `set_scalar(target_scalar: float) -> Animation`: Scales vector dynamically.\n  - `highlight_vector(role: str) -> Animation`: Pulses vector arrow (`role=\"a\"`, `\"b\"`, or `\"r\"`).\n  - `highlight_projection() -> Animation`: Projects vector $\\vec{a}$ onto $\\vec{b}$.\n- **Example**:\n  ```python\n  vec = VectorTemplate(state=\"components\", vector_a=(3, 2))\n  self.play_action(vec.reveal_components())\n  ```\n\n---\n\n### 4. `MatrixTemplate`\nMatrix representations, cell highlights, row\u002Fcolumn operations, and matrix-matrix multiplication steps.\n- **Valid States**: `\"display\"`, `\"product_setup\"`, `\"product_progress\"`, `\"product_complete\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `matrix: list[list[float]] | None = None` (data matrix for `\"display\"` state, e.g. `[[1, 2], [3, 4]]`)\n  - `left_matrix: list[list[float]] | None = None` (multiplier matrix $A$ for `\"product_*\"` states)\n  - `right_matrix: list[list[float]] | None = None` (multiplicand matrix $B$ for `\"product_*\"` states)\n  - `left_label: str = \"A\"`, `right_label: str = \"B\"`, `result_label: str = \"C\"`\n  - `active_row: int = 0`, `active_column: int = 0`\n- **Action Methods**:\n  - `reveal_product_cell() -> Animation`: Computes dot product for `active_row` and `active_column`.\n  - `select_product_cell(row: int, column: int) -> Animation`: Moves active focus to specified cell.\n  - `highlight_row(row: int) -> Animation`: Outlines target row in yellow.\n  - `highlight_column(column: int) -> Animation`: Outlines target column in yellow.\n  - `highlight_cell(row: int, column: int) -> Animation`: Pulses target entry.\n- **Example**:\n  ```python\n  mat = MatrixTemplate(state=\"product_setup\", left_matrix=[[1, 2], [3, 4]], right_matrix=[[2, 0], [1, 2]])\n  self.play_action(mat.reveal_product_cell())\n  ```\n\n---\n\n### 5. `NumberLineTemplate`\nConfigurable real number line with point markers, single\u002Fmultiple intervals, arithmetic movements, and distance.\n- **Valid States**: `\"points\"`, `\"interval\"`, `\"intervals\"`, `\"operation\"`, `\"distance\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `x_range: tuple[float, float, float] = (-5, 6, 1)`\n  - `points: list[float] = ()` (labeled points for `\"points\"` state)\n  - `point_labels: list[str] | None = None`\n  - `start: float = -2`, `end: float = 2` (interval range for `\"interval\"` state)\n  - `left_closed: bool = True`, `right_closed: bool = True` (bracket\u002Fparenthesis styling)\n  - `intervals: list[tuple[float, float, bool, bool]] = ()` (for `\"intervals\"` state)\n  - `center: float | None = None`, `radius: float | None = None` (for absolute value `\"distance\"`)\n  - `value: float = 0`, `value_label: str | None = None` (for `\"operation\"`)\n- **Action Methods**:\n  - `move_point(target_value: float) -> Animation`: Slides marker along number line.\n  - `set_interval(start: float, end: float, left_closed: bool, right_closed: bool) -> Animation`: Updates interval bounds.\n  - `highlight_distance() -> Animation`: Highlights segment between center and radius.\n- **Example**:\n  ```python\n  numline = NumberLineTemplate(state=\"interval\", start=-1, end=3, left_closed=True, right_closed=False)\n  self.play_action(numline.move_point(2.0))\n  ```\n\n---\n\n### 6. `UnitCircleTemplate`\nTrigonometric unit circle, arbitrary angle arcs, coordinate readouts $(x, y) = (\\cos\\theta, \\sin\\theta)$, and reference triangles.\n- **Valid States**: `\"base\"`, `\"angle\"`, `\"coordinates\"`, `\"reference_triangle\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `angle_degrees: float = 30` (angle $\\theta$ in degrees)\n  - `angle_label: str | None = None`\n  - `coordinate_label: str | None = None`\n  - `cosine_label: str = r\"\\cos\\theta\"`, `sine_label: str = r\"\\sin\\theta\"`, `radius_label: str = \"1\"`\n  - `show_axes_labels: bool = True`\n- **Action Methods**:\n  - `rotate_to_angle(target_degrees: float, angle_label=None, coordinate_label=None) -> Animation`: Rotates radius ray to new angle.\n  - `reveal_coordinates() -> Animation`: Displays $(\\cos\\theta, \\sin\\theta)$ coordinates.\n  - `reveal_reference_triangle() -> Animation`: Draws right reference triangle inside circle.\n  - `highlight_projection(axis: str) -> Animation`: Pulses projection onto `\"x\"` or `\"y\"` axis.\n- **Example**:\n  ```python\n  circle = UnitCircleTemplate(state=\"coordinates\", angle_degrees=45)\n  self.play_action(circle.rotate_to_angle(60))\n  ```\n\n---\n\n### 7. `LinearTransformationTemplate`\nVisualizes 2D linear matrix transformations $T(\\vec{x}) = A\\vec{x}$ warping coordinate grid lines and basis vectors $\\hat{i}, \\hat{j}$.\n- **Valid States**: `\"setup\"`, `\"comparison\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `matrix: list[list[float]]` (REQUIRED, $2\\times 2$ matrix, e.g. `[[2, 1], [0, 1.5]]`)\n  - `vectors: list[tuple[float, float]]` (REQUIRED, vectors transformed by matrix, e.g. `[(1, 0), (0, 1)]`)\n  - `vector_labels: list[str] | None = None`\n  - `active_index: int = 0`\n  - `show_span: bool = False`, `show_matrix_label: bool = True`\n  - `x_range: tuple[float, float, float] = (-5, 6, 1)`, `y_range: tuple[float, float, float] = (-5, 6, 1)`\n- **Action Methods**:\n  - `apply_transformation() -> Animation`: Transforms grid and basis vectors using matrix $A$.\n  - `highlight_vector(index: int) -> Animation`: Pulses target vector.\n  - `highlight_span(index: int) -> Animation`: Visualizes span subspace.\n- **Example**:\n  ```python\n  lin_trans = LinearTransformationTemplate(state=\"setup\", matrix=[[1, 1], [0, 1]], vectors=[(1, 0), (0, 1)])\n  self.play_action(lin_trans.apply_transformation())\n  ```\n\n---\n\n### 8. `TriangleTemplate`\nRight triangles, scalene\u002Fisosceles\u002Fequilateral triangles, hypotenuse emphasis, altitudes, and angle bisectors.\n- **Valid States**: `\"right_base\"`, `\"right_labeled\"`, `\"right_hypotenuse_highlighted\"`, `\"right_squares\"`, `\"general_base\"`, `\"general_labeled\"`, `\"altitude\"`, `\"median\"`, `\"angle_bisector\"`, `\"non_right_labeled\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `triangle_type: str = \"scalene\"` (`\"right\"`, `\"scalene\"`, `\"equilateral\"`, `\"isosceles\"`)\n  - `leg_a: float | None = None`, `leg_b: float | None = None` (for right triangles)\n  - `width: float = 3.2`, `height: float = 2.2`, `apex_offset: float = 0.15`\n  - `vertex_labels: tuple[str, str, str] = ('A', 'B', 'C')`\n  - `side_labels: tuple[str, str, str] = ('a', 'b', 'c')`\n  - `active_vertex: str = 'A'`\n- **Action Methods**:\n  - `highlight_side(side: str) -> Animation`: Outlines side (`side=\"a\"`, `\"b\"`, or `\"c\"`).\n  - `highlight_angle(vertex: str) -> Animation`: Highlights angle arc at vertex (`vertex=\"A\"`, `\"B\"`, or `\"C\"`).\n  - `highlight_construction() -> Animation`: Emphasizes altitude, median, or bisector.\n- **Example**:\n  ```python\n  tri = TriangleTemplate(state=\"right_labeled\", leg_a=2.0, leg_b=3.0)\n  self.play_action(tri.highlight_side(\"c\"))\n  ```\n\n---\n\n### 9. `PythagoreanAreaTemplate`\nGeometric proof of $a^2 + b^2 = c^2$ with squares attached to right triangle sides.\n- **Valid States**: `\"c_square\"`, `\"ab_squares\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `leg_a: float = 1.35`\n  - `leg_b: float = 2.15`\n  - `include_side_labels: bool = True`\n- **Example**:\n  ```python\n  pyth = PythagoreanAreaTemplate(state=\"ab_squares\", leg_a=1.5, leg_b=2.0)\n  ```\n\n---\n\n### 10. `LineGeometryTemplate`\n2D Coordinate geometry, slopes, rise-over-run triangles, midpoints, segment distances, and line intersections.\n- **Valid States**: `\"point_plot\"`, `\"slope_rise_run\"`, `\"midpoint\"`, `\"distance\"`, `\"line_equation\"`, `\"intercepts\"`, `\"intersection\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `point_a: tuple[float, float]` (REQUIRED, e.g. `(0, 0)`)\n  - `point_b: tuple[float, float] | None = None` (second point, e.g. `(3, 2)`)\n  - `slope: float | None = None`, `y_intercept: float | None = None`\n  - `line2_slope: float | None = None`, `line2_y_intercept: float | None = None` (for `\"intersection\"`)\n  - `x_range: tuple = (-6, 6, 1)`, `y_range: tuple = (-4, 4, 1)`\n  - `labels: bool = True`\n- **Action Methods**:\n  - `show_slope_triangle() -> Animation`: Draws rise-over-run right triangle.\n  - `show_midpoint() -> Animation`: Displays midpoint dot and coordinate label.\n  - `show_distance() -> Animation`: Highlights segment distance with length label.\n  - `show_intercepts() -> Animation`: Points to $x$- and $y$-intercepts.\n  - `show_intersection() -> Animation`: Identifies solution point where two lines cross.\n- **Example**:\n  ```python\n  line = LineGeometryTemplate(state=\"slope_rise_run\", point_a=(1, 1), point_b=(4, 3))\n  self.play_action(line.show_slope_triangle())\n  ```\n\n---\n\n### 11. `CircleTheoremsTemplate`\nCircle geometry theorems: tangent-radius perpendicularity, chord bisectors, secants, central angles, and inscribed angles.\n- **Valid States**: `\"radius_tangent\"`, `\"chord\"`, `\"secant\"`, `\"arc_central\"`, `\"inscribed_angle\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `radius: float = 2.0`, `center: tuple[float, float] = (0, 0)`\n  - `chord_angle: float = 60`\n  - `secant_point: tuple[float, float] = (4, 0)`\n  - `arc_start_angle: float = 30`, `arc_end_angle: float = 150`\n  - `inscribed_vertex_angle: float = 200`\n  - `labels: bool = True`\n- **Action Methods**:\n  - `show_radius_tangent() -> Animation`: Marks $90^\\circ$ right angle between radius and tangent line.\n  - `show_perpendicular_bisector() -> Animation`: Draws chord bisector through center.\n  - `show_arc_angle() -> Animation`: Highlights central angle and subtended arc.\n  - `show_inscribed_relationship() -> Animation`: Demonstrates inscribed angle is half of central angle.\n- **Example**:\n  ```python\n  circle_thm = CircleTheoremsTemplate(state=\"radius_tangent\")\n  self.play_action(circle_thm.show_radius_tangent())\n  ```\n\n---\n\n### 12. `PolygonTransformationTemplate`\n2D Rigid transformations of arbitrary polygons: translations, reflections over axes, rotations about a center, and dilations.\n- **Valid States**: `\"original\"`, `\"translated\"`, `\"reflected\"`, `\"rotated\"`, `\"dilated\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `vertices: list[tuple[float, float]]` (REQUIRED, e.g. `[(0, 0), (2, 0), (1, 2)]`)\n  - `translation_vector: tuple[float, float] = (2, 1)` (for `\"translated\"` state)\n  - `reflection_axis: str = \"x\"` (`\"x\"` or `\"y\"` for `\"reflected\"` state)\n  - `rotation_angle: float = 90`, `rotation_center: tuple[float, float] = (0, 0)` (for `\"rotated\"` state)\n  - `dilation_factor: float = 2.0`, `dilation_center: tuple[float, float] = (0, 0)` (for `\"dilated\"` state)\n  - `x_range: tuple = (-6, 6, 1)`, `y_range: tuple = (-4, 4, 1)`\n  - `labels: bool = True`\n- **Action Methods**:\n  - `translate() -> Animation`: Moves polygon along `translation_vector`.\n  - `reflect() -> Animation`: Flips polygon across `reflection_axis`.\n  - `dilate() -> Animation`: Scales polygon by `dilation_factor`.\n- **Example**:\n  ```python\n  poly = PolygonTransformationTemplate(state=\"translated\", vertices=[(0, 0), (2, 0), (1, 2)], translation_vector=(2, 1))\n  self.play_action(poly.translate())\n  ```\n\n---\n\n### 13. `FunctionTranslationTemplate`\nVisualizes function shifts $f(x - h) + k$ and horizontal scaling $f(ax)$ against parent curves.\n- **Valid States**: `\"parent\"`, `\"comparison\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `parent_function = lambda x: x**2`\n  - `h: float = 0` (horizontal shift)\n  - `k: float = 0` (vertical shift)\n  - `a: float | None = None` (horizontal compression\u002Fexpansion factor)\n  - `anchor_point: tuple[float, float] | None = (0, 0)`\n  - `parent_label: str = \"f(x)\"`, `transformed_label: str | None = None`\n  - `x_range: tuple[float, float, float] = (-4, 5, 1)`, `y_range: tuple[float, float, float] = (-3, 7, 1)`\n- **Action Methods**:\n  - `shift_horizontal(target_h: float) -> Animation`: Animates horizontal translation.\n  - `shift_vertical(target_k: float) -> Animation`: Animates vertical translation.\n  - `scale_horizontal(target_a: float) -> Animation`: Scales curve horizontally.\n- **Example**:\n  ```python\n  f_trans = FunctionTranslationTemplate(state=\"comparison\", h=2, k=1)\n  self.play_action(f_trans.shift_horizontal(2))\n  ```\n\n---\n\n### 14. `FractionModelTemplate`\nProportional fraction visual models: horizontal fraction bars, circular pie models, and partition grids.\n- **Valid States**: `\"bar\"`, `\"grid\"`, `\"circle\"`.\n- **Constructor Parameters**:\n  - `state: str` (REQUIRED)\n  - `numerator: int = 1`\n  - `denominator: int = 2`\n  - `show_label: bool = True`\n  - `label: str | None = None`\n  - `grid_shape: tuple[int, int] | None = None` (e.g. `(2, 5)` for $2\\times 5$ grid of 10)\n  - `show_part_numbers: bool = False`\n- **Action Methods**:\n  - `set_fraction(numerator: int, denominator: int) -> Animation`: Updates filled portions.\n  - `highlight_filled_parts() -> Animation`: Pulses active numerator fractions.\n  - `highlight_wholes() -> Animation`: Highlights complete unit wholes.\n  - `show_equivalent_fraction(multiplier: int) -> Animation`: Subdivides parts to show equivalence (e.g. $1\u002F2 = 2\u002F4$).\n- **Example**:\n  ```python\n  frac = FractionModelTemplate(state=\"circle\", numerator=3, denominator=4)\n  self.play_action(frac.show_equivalent_fraction(multiplier=2))\n  ```\n\n---\n\n## Scenario-Based Instructions\n\n### 📐 Scenario 1: Step-by-Step Derivation with SafeScene & EquationTemplate\n\n**When:** Explaining algebraic proofs, step-by-step problem solving, or formula derivations.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class QuadraticDerivation(SafeScene):\\n    def construct(self):\\n        self.show_title(\\\"Solving Quadratic Equation\\\")\\n        eq = EquationTemplate(state=\\\"derivation\\\", expressions=[\\\"ax^2 + bx + c = 0\\\", \\\"ax^2 + bx = -c\\\", \\\"x^2 + \\\\\\\\frac{b}{a}x = -\\\\\\\\frac{c}{a}\\\"])\\n        self.show_main(eq, layout=Layout.CENTER)\\n        self.set_bottom_text(\\\"Step 1: Isolate the variable terms and normalize\\\")\\n        self.wait(1.5)\\n        self.play_action(eq.advance_step(\\\"x = \\\\\\\\frac{-b \\\\\\\\pm \\\\\\\\sqrt{b^2 - 4ac}}{2a}\\\"))\\n        self.set_bottom_text(\\\"Final solution found by completing the square\\\")\\n        self.wait(2)\\n        self.fade_out_all()\",\n        \"scene_name\": \"QuadraticDerivation\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Fquadratic_derivation.mp4\"\n    }\n}'\n```\n\n---\n\n### 📈 Scenario 2: Calculus Tangent & Graph with FunctionGraphTemplate\n\n**When:** Demonstrating derivatives, tangent lines, or curve behavior.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class TangentLesson(SafeScene):\\n    def construct(self):\\n        self.show_title(\\\"Derivative as Slope of Tangent\\\")\\n        graph = FunctionGraphTemplate(state=\\\"tangent\\\", function_type=\\\"quadratic\\\", tangent_x=1.0)\\n        self.show_main(graph, layout=Layout.CENTER)\\n        self.set_bottom_text(\\\"Initial tangent line at x = 1.0\\\")\\n        self.wait(1)\\n        self.play_action(graph.reveal_tangent())\\n        self.set_bottom_text(\\\"Slope of tangent line equals the derivative f'(1)\\\")\\n        self.wait(2)\\n        self.fade_out_all()\",\n        \"scene_name\": \"TangentLesson\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Ftangent_lesson.mp4\"\n    }\n}'\n```\n\n---\n\n### ⚖️ Scenario 3: Side-by-Side Comparison with Layout.SPLIT\n\n**When:** Comparing two mathematical representations or before\u002Fafter states.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class VectorComparison(SafeScene):\\n    def construct(self):\\n        self.show_title(\\\"Vector Components vs Resultant\\\")\\n        v_comp = VectorTemplate(state=\\\"components\\\", vector_a=(3, 2))\\n        v_single = VectorTemplate(state=\\\"single\\\", vector_a=(3, 2))\\n        self.show_main(VGroup(v_comp, v_single), layout=Layout.SPLIT)\\n        self.set_bottom_text(\\\"Left: Orthogonal components; Right: Resultant vector\\\")\\n        self.wait(1.5)\\n        self.play_action(v_comp.reveal_components())\\n        self.wait(2)\\n        self.fade_out_all()\",\n        \"scene_name\": \"VectorComparison\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Fvector_comparison.mp4\"\n    }\n}'\n```\n\n---\n\n### 🧊 Scenario 4: 3D Surface & Camera Motion\n\n**When:** Demonstrating 3D vector fields, surfaces, or rotating perspective geometries using `ThreeDScene`.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class ThreeDSphere(ThreeDScene):\\n    def construct(self):\\n        axes = ThreeDAxes()\\n        sphere = Surface(lambda u, v: np.array([1.5 * np.cos(u) * np.cos(v), 1.5 * np.cos(u) * np.sin(v), 1.5 * np.sin(u)]), u_range=[-np.pi\u002F2, np.pi\u002F2], v_range=[0, 2*np.pi], resolution=(16, 32), fill_color=BLUE_D, fill_opacity=0.7)\\n        self.set_camera_orientation(phi=75 * DEGREES, theta=-45 * DEGREES)\\n        self.add(axes)\\n        self.play(Create(sphere))\\n        self.begin_ambient_camera_rotation(rate=0.2)\\n        self.wait(2)\\n        self.stop_ambient_camera_rotation()\",\n        \"scene_name\": \"ThreeDSphere\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Fthreed_sphere.mp4\"\n    }\n}'\n```\n\n---\n\n### 🎭 Scenario 5: Transparent Overlay for Video Editing (WebM \u002F Alpha)\n\n**When:** Rendering motion graphics with a transparent background to composite over live footage or slide decks.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class LowerThird(Scene):\\n    def construct(self):\\n        banner = Rectangle(width=6.0, height=1.0, color=GOLD, fill_opacity=0.3)\\n        text = Text(\\\"Mathematical Proof\\\", font_size=32, color=WHITE)\\n        group = VGroup(banner, text).to_corner(DL, buff=0.8)\\n        self.play(FadeIn(group, shift=RIGHT))\\n        self.wait(2)\\n        self.play(FadeOut(group, shift=LEFT))\",\n        \"scene_name\": \"LowerThird\",\n        \"aspect_ratio\": \"16:9\",\n        \"quality\": \"medium\",\n        \"format\": \"webm\",\n        \"transparent\": \"true\",\n        \"output_path\": \"data\u002Flower_third_overlay.webm\"\n    }\n}'\n```\n\n---\n\n### 📱 Scenario 6: Mobile-Friendly Vertical Video (9:16 Shorts \u002F Reels \u002F TikTok)\n\n**When:** Rendering vertical animations for mobile feeds, YouTube Shorts, Instagram Reels, or TikTok.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class VerticalDerivative(Scene):\\n    def construct(self):\\n        title = Text(\\\"Calculus Shorts\\\", font_size=40, color=YELLOW)\\n        title.to_edge(UP, buff=1.0)\\n        func = MathTex(r\\\"f(x) = x^2\\\", font_size=50)\\n        deriv = MathTex(r\\\"f'\\''(x) = 2x\\\", font_size=50, color=BLUE)\\n        deriv.next_to(func, DOWN, buff=0.8)\\n        self.play(Write(title))\\n        self.play(Write(func))\\n        self.wait(0.5)\\n        self.play(TransformFromCopy(func, deriv))\\n        self.wait(1.5)\",\n        \"scene_name\": \"VerticalDerivative\",\n        \"aspect_ratio\": \"9:16\",\n        \"quality\": \"medium\",\n        \"format\": \"mp4\",\n        \"output_path\": \"data\u002Fvertical_derivative.mp4\"\n    }\n}'\n```\n\n---\n\n### 🖼️ Scenario 7: Fast Animated GIF Preview for Documentation \u002F Web\n\n**When:** Creating a quick, lightweight GIF animation for a README, web page, or tutorial.\n\n```bash\nhuman-skills '{\n    \"tool_name\": \"math_animate\",\n    \"tool_args\": {\n        \"scene_code\": \"class PulseDot(Scene):\\n    def construct(self):\\n        dot = Dot(color=PURPLE, radius=0.3)\\n        self.add(dot)\\n        self.play(dot.animate.scale(2).set_color(TEAL), rate_func=there_and_back, run_time=1.5)\\n        self.wait(0.5)\",\n        \"scene_name\": \"PulseDot\",\n        \"quality\": \"preview\",\n        \"format\": \"gif\",\n        \"output_path\": \"data\u002Fpulse_dot.gif\"\n    }\n}'\n```\n\n---\n\n## 📚 Deep Reference Documents\n\nFor comprehensive mathematical contracts, complete constructor signatures, and visual design rules, refer to the on-demand reference documents in `references\u002F`:\n\n| Reference Document | Scope & Contents |\n|:---|:---|\n| [templates_api_reference.md](references\u002Ftemplates_api_reference.md) | Exhaustive API signatures, parameters, constraints, and action methods for all 14 templates. |\n| [visual-kit-api.md](references\u002Fvisual-kit-api.md) | Complete SafeScene lifecycle, region geometry, layout bounds, and transition contracts. |\n| [layout-composition.md](references\u002Flayout-composition.md) | Frame safety rules, avoiding offscreen overflow, and group-first layout composition. |\n| [animation-patterns.md](references\u002Fanimation-patterns.md) | Semantic snapshot transitions, `show` vs `transform` continuity, and hold times. |\n| [math-visual-clarity.md](references\u002Fmath-visual-clarity.md) | Standardized math colors, LaTeX typography, cognitive load reduction, and visual hierarchy. |\n| [educational-storyboarding.md](references\u002Feducational-storyboarding.md) | Pacing, pedagogical scene breakdown, and instructional storyboarding principles. |\n\n",{"name":5,"tags":44,"author":51,"version":52,"description":7,"trigger_patterns":53},[45,24,19,46,47,48,49,34,22,50],"animation","manim","visualization","video","latex","safescene","Human Skill Team","2.2.0",[54,46,55,56,57,58,59,60,61,50,62],"math animation","render manim","math video","animate equation","calculus animation","geometry animation","latex animation","plot animation","math template","main","74715deacdc69119d739f38916f8ee4f0f979ebf","skills\u002Fstorage\u002Fmy_skills\u002Fmath-animate",0,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills","https:\u002F\u002Fgithub.com\u002Fmdnaimul22","AI Agents Workflows Automation | Specializing in Python, FastAPI, MCP Agents & Custom ERP.","2026-11-11 21:16:57",{"source":8,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add mdnaimul22\u002Fhuman-skills --skill math-animate",{"tool":77,"command":78},"bunx","bunx skills add mdnaimul22\u002Fhuman-skills --skill math-animate",{"tool":80,"command":81},"pnpm","pnpm dlx skills add mdnaimul22\u002Fhuman-skills --skill math-animate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002FSKILL.md",true,[85,91,95,99,103,107,111,115,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181],{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"command.json","REFERENCE","参考文档",12460,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Fcommand.json",{"path":92,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fanimation-patterns.md",2113,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Freferences\u002Fanimation-patterns.md",{"path":96,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002Feducational-storyboarding.md",1428,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Freferences\u002Feducational-storyboarding.md",{"path":100,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Flayout-composition.md",8071,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Freferences\u002Flayout-composition.md",{"path":104,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":105,"sourceHtmlUrl":106},"references\u002Fmath-visual-clarity.md",2157,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Freferences\u002Fmath-visual-clarity.md",{"path":108,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":109,"sourceHtmlUrl":110},"references\u002Ftemplates_api_reference.md",15322,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Freferences\u002Ftemplates_api_reference.md",{"path":112,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":113,"sourceHtmlUrl":114},"references\u002Fvisual-kit-api.md",2802,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Freferences\u002Fvisual-kit-api.md",{"path":116,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":119,"sourceHtmlUrl":120},"scripts\u002Fmath_animate.py","SCRIPT","脚本",27418,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Fscripts\u002Fmath_animate.py",{"path":122,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":123,"sourceHtmlUrl":124},"templates\u002F__init__.py",1448,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002F__init__.py",{"path":126,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":127,"sourceHtmlUrl":128},"templates\u002Fcircle_theorems_template.py",11406,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fcircle_theorems_template.py",{"path":130,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":131,"sourceHtmlUrl":132},"templates\u002Fequation_template.py",5066,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fequation_template.py",{"path":134,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":135,"sourceHtmlUrl":136},"templates\u002Ffraction_model_template.py",8489,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Ffraction_model_template.py",{"path":138,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":139,"sourceHtmlUrl":140},"templates\u002Ffunction_graph_template.py",16995,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Ffunction_graph_template.py",{"path":142,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":143,"sourceHtmlUrl":144},"templates\u002Ffunction_translation_template.py",6956,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Ffunction_translation_template.py",{"path":146,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":147,"sourceHtmlUrl":148},"templates\u002Fline_geometry_template.py",13037,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fline_geometry_template.py",{"path":150,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":151,"sourceHtmlUrl":152},"templates\u002Flinear_transformation_template.py",6815,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Flinear_transformation_template.py",{"path":154,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":155,"sourceHtmlUrl":156},"templates\u002Fmatrix_template.py",10359,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fmatrix_template.py",{"path":158,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":159,"sourceHtmlUrl":160},"templates\u002Fnumber_line_template.py",9566,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fnumber_line_template.py",{"path":162,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":163,"sourceHtmlUrl":164},"templates\u002Fpolygon_transformation_template.py",8175,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fpolygon_transformation_template.py",{"path":166,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":167,"sourceHtmlUrl":168},"templates\u002Fpythagorean_area_template.py",6562,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fpythagorean_area_template.py",{"path":170,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":171,"sourceHtmlUrl":172},"templates\u002Ftriangle_template.py",13942,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Ftriangle_template.py",{"path":174,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":175,"sourceHtmlUrl":176},"templates\u002Funit_circle_template.py",6883,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Funit_circle_template.py",{"path":178,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":179,"sourceHtmlUrl":180},"templates\u002Fvector_template.py",9428,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fvector_template.py",{"path":182,"resourceType":117,"resourceTypeDesc":118,"sizeBytes":183,"sourceHtmlUrl":184},"templates\u002Fvisual_kit.py",8058,"https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fmath-animate\u002Ftemplates\u002Fvisual_kit.py",[186,194,202,209,216,223],{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":193},"01M767791C1KRP2ZRW2Z73VZ5Q","system-lifecycle-designer","Universal architectural methodology for designing granular, atomic, and sub-atomic lifecycles and end-to-end workflows for single functionality integrations across any domain (daemons, batch jobs, request transactions, resource pools). Provides patterns for deterministic identity, pre-commit validation, differential reconciliation, sticky leasing, state machines, transactional persistence, and closed-loop feedback.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fmy_skills\u002Fsystem-lifecycle-designer\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":195,"name":196,"nameZh":6,"description":197,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":198,"categories":199,"keywords":200,"publishedAt":201},"01M748ABPN5F1FANHH6HKZQMXT","style-sampling","Make a new episode in a proven video style - Collage Explainer, Finance Explainer, Animated Science Explainer, 3D Brand Explainer, 3D True Crime - on the person's topic. Use for \"an episode of\", \"in the style of\", \"sample this style\", 「用这个风格做一集」. One video to copy is reverse-any-video.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fheygen-com_hyperframes\u002Fstyle-sampling\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":203,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":206,"categories":207,"keywords":208,"publishedAt":201},"01M748A59V04PKW4HA0XQ81FGP","reverse-any-video","Rebuild any video file as an editable HyperFrames project - motion graphics, talking heads, live action or AI-generated footage - checked against the original frame by frame. Use to reverse, recreate, remake, replicate or copy a video, or 「复刻这个视频」「照着这个视频做一个」.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Fheygen-com_hyperframes\u002Freverse-any-video\u002FSKILL.md",[],[],{"skillNo":210,"name":211,"nameZh":6,"description":212,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":213,"categories":214,"keywords":215,"publishedAt":201},"01M7487T50P55CSXMWXZ0G9KRG","typescript-patterns","TypeScript patterns for strict, type-safe, maintainable code in modern TypeScript and JavaScript applications. Covers strict compiler configuration, type design, narrowing, discriminated unions, generics, async and error handling, module boundaries, dependency hygiene, and type-level testing. Use when writing or reviewing TypeScript or JavaScript code.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Faffaan-m_ECC\u002Ftypescript-patterns\u002FSKILL.md",[],[],{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":222,"publishedAt":201},"01M7487ERZRGPC5NJ75077Y238","test-collaboration","Inventory and govern a project's test assets. Connect requirements, business rules, risks, bugs, and cross-boundary contracts to stable TEST-IDs and executable evidence in the repository's existing test registry or TESTS.md. Use for test inventory, test gap analysis, unit\u002Fintegration\u002Fcontract\u002FE2E\u002Fsmoke classification, bug-to-test regression protection, consumer\u002Fprovider contract testing, test-necessity review, and pre-delivery evidence review.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Faffaan-m_ECC\u002Ftest-collaboration\u002FSKILL.md",[],[],{"skillNo":224,"name":225,"nameZh":6,"description":226,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":227,"categories":228,"keywords":229,"publishedAt":201},"01M748721J3GKR2WS6K0QWFC35","story-lifecycle","Manage a file-based epic → story → sprint development loop without requiring an external project management tool. Creates and tracks epics, breaks them into user stories, assigns them to sprints, and drives implementation story by story. Use when starting a new feature initiative or when the team has no Jira\u002FLinear\u002FTaiga but needs structured delivery tracking.","https:\u002F\u002Fgithub.com\u002Fmdnaimul22\u002Fhuman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fstorage\u002Faffaan-m_ECC\u002Fstory-lifecycle\u002FSKILL.md",[],[]]