AGENT SKILL

ManimGX 数学动画制作

manimgx

编写、检查和渲染 ManimGX 场景:使用 Manim Community Edition 的 Python API 制作数学和 3D 动画,由 nodetool.manimgx 节点运行。适用于公式、证明、图表、几何、3D 曲面和讲解类动画。

License 许可
AGPL-3.0
最近更新
2026-11-15
Stars
★ 635
Forks
91

01 前言 Front Matter

name
manimgx
description
Write, inspect and render ManimGX scenes: math and 3D animations in Manim Community Edition's Python API, run by the nodetool.manimgx nodes. Use for equations, proofs, plots, geometry, 3D surfaces and explainer animations.

03 SKILL.md 正文

Animate with ManimGX

ManimGX renders animations written in Manim Community Edition's Python API on a Rust GPU engine. A scene is a Python module; the nodetool.manimgx nodes run it on the machine NodeTool runs on. They need manimgx installed there (ManimGX in the desktop Package Manager, or uv tool install manimgx with Python 3.13 or newer) and are absent from the hosted cloud, because a scene is a program.

Node Takes Gives
nodetool.manimgx.InspectScene code, scene_name, times, timeout ok, problems, report, storyboard, duration
nodetool.manimgx.RenderScene code, scene_name, width, height, fps, preset, crf, timeout video, storyboard, report, subtitles, duration
nodetool.manimgx.GenerateScene prompt, model, max_attempts, send_storyboard, width, height, fps, timeout video, code, storyboard, report, attempts

timeout is the limit in seconds for each ManimGX run (default 300).

GenerateScene runs the whole loop below inside one node with a language model, for up to max_attempts rounds (default 3, at most 8). Each round is a paid model call, and send_storyboard (on by default) sends the storyboard pictures to it, which needs a vision model. Confirm the model with the user before running it. Write the scene yourself when you can see the storyboard and fix it.

The loop

  1. Write the module. Start from the template under Authoring.
  2. Inspect it with InspectScene. ok: false means the scene failed: report holds the traceback trimmed to the scene's lines and a "did you mean" hint. problems: true means it ran but the 2D layout checks found clipped content, overlapping text or labels too small to read. Each problem is numbered in report and outlined on the storyboard. Look at the storyboard pictures, not only the report. 3D scenes get pictures and a timeline without layout checks.
  3. Fix and inspect again until ok is true and problems is false. To check particular moments, pass times: "1.5,end".
  4. Render with RenderScene at the size and frame rate asked for. Drafts at 1280x720 and 30 fps render in seconds. The default is 1920x1080 at 30 fps.
  5. Deliver the video and the scene's code. Save the code where the person can edit it, such as the code of a RenderScene node in their workflow.

From a code action or a Code node, call the nodes as functions:

import "@nodetool-ai/sandbox-nodetool/flow";
import { inspectScene, renderScene } from "@nodetool-ai/sandbox-flow/nodetool.manimgx";

const check = await inspectScene({ code, title: "Circle area" });
if (check.ok && !check.problems) {
  const film = await renderScene({ code, width: 1280, height: 720, fps: 30, title: "Circle area" });
}

Extra keys such as title above are the node's dynamic inputs.

Inputs from the workflow

Every node takes dynamic inputs. Their values reach the scene as a dict:

from nodetool_inputs import inputs

Numbers, strings, lists and dicts arrive as JSON. Image, audio and video inputs arrive as file paths: m.ImageMobject(inputs["logo"]) for an image, self.add_sound(inputs["voice"]) for audio.

A scene is Python that runs as the server user, with that user's file and network access. Only its environment is restricted, so it never sees the server's secrets. Treat scene code as trusted code: do not run a scene from a source the user has not vouched for.

Authoring

import manimgx as m
from nodetool_inputs import inputs


class CircleArea(m.Scene):
    def construct(self) -> None:
        circle = m.Circle(radius=1, color=m.BLUE, fill_opacity=0.3)
        formula = m.MathTex(r"A = \pi r^2").next_to(circle, m.RIGHT, buff=0.6)
        m.VGroup(circle, formula).center()
        self.play(m.Create(circle), m.Write(formula))
        self.wait(1)
  • Import manimgx as m. Put the animation in a Scene subclass's construct. With more than one scene in the module, set scene_name.
  • Time advances only through self.play(...) and self.wait(...). self.add(...) adds without animating.
  • Compose placement with VGroup, arrange, next_to, to_edge and center, so labels follow their subjects. The frame is about 14.2 units wide and 8 tall, centred on the origin.
  • Text for prose. MathTex with raw strings for LaTeX mathematics, or Typst. No LaTeX installation is needed.
  • For changing values, animate a ValueTracker and derive geometry from it. An updater uses elapsed time or current state, never a frame count, so the motion keeps its timing at any fps.
  • For 3D, derive from m.ThreeDScene: self.set_camera_orientation(phi=65 * m.DEGREES, theta=-45 * m.DEGREES), Surface, Sphere, Cube, ThreeDAxes, self.begin_ambient_camera_rotation(rate=0.5).
  • self.next_section("name") splits a film into sections. Subcaptions and self.say(...) produce subtitles, which RenderScene returns as SubRip text.

ManimGX's own reference lists every class and keyword: manimgx.academa.ai/reference, and llms.txt links the guides as Markdown. Where ManimGX and Manim CE differ, ManimGX's page is right.

Where the result goes next

video is an inline video ref. Save it as an asset, or place it on a timeline like any generated clip. A narrated explainer keeps its timing from the voice: write the script first (script-video), then size each scene's waits to its line.

04 同仓库更多 Skills

nodetool-ai
nodetool-ai/nodetool

humanizer

Rewrite AI-sounding text so it reads like the writer without changing what it says. Use when editing or reviewing prose for AI tells: not-X-but-Y contrasts, one-line closers, staged openers, forced triads, dashes everywhere, inflated claims, sales language, stock AI words, bold labels, or filler.

★ 635
nodetool-ai
nodetool-ai/nodetool

NodeTool可视化AI工作流构建

nodetool

使用 NodeTool MCP 服务器构建、验证、运行和调试可视化 AI 工作流,并处理资产、集合和任务。当用户提及 NodeTool,或要求在其 NodeTool 服务器上创建工作流图、节点或运行媒体生成时使用。

AI 工程师智能体开发
★ 635
nodetool-ai
nodetool-ai/nodetool

Wan 2.6 视频提示词编写

wan-2-6-prompting

为阿里的 Wan 2.6 视频模型编写提示词——文生视频采用全局风格描述行加上按时间用括号标记的分镜,图生视频只描述随时间变化的内容。涵盖各服务商的镜头模式切换、提示词预算、负面提示词、运动强度措辞、音频输入和提示词扩展。当模型 ID 指定 Wan 2.6 视频路由(alibaba/wan-2.6/text-to-video、alibaba/wan-2.6/image-to-video、wan-video/wan-2.6-t2v、wan-video/wan-2.6-i2v、wan-video/wan2.6-i2v-flash)用于 generate_video、animate_image 或 TextToVideo 节点时使用。不适用于 Wan 2.5 或 2.7,也不适用于 Wan 2.6 图像路由。

多媒体工程师视频生成与制作
★ 635
nodetool-ai
nodetool-ai/nodetool

可复用视频工作流搭建

video-workflow

构建可复用的 NodeTool 视频工作流,用于批量处理或重复输入。若只需制作单个成品,请使用 storyboard(分镜)技能。

多媒体工程师视频生成与制作
★ 635
nodetool-ai
nodetool-ai/nodetool

参考视频镜头结构复刻

video-clone

分析参考视频,并在 NodeTool 中使用新产品或新演员重现其镜头结构。

多媒体工程师视频生成与制作
★ 635
nodetool-ai
nodetool-ai/nodetool

多场景视频音频连续性处理

video-audio-continuity

让由生成视频剪辑而成的多场景作品中的声音保持连续——为什么每个场景各生成一段片段会在每处边界硬切音频、何时改为把所有场景写入同一次生成、能在服务商版权过滤下保留下来的声音设计词汇,以及如何检查返回内容的时长、宽高比和混音效果。当作品包含多个场景且视频模型会自行生成音频(Seedance 2、Veo 3、MiniMax H3、Kling 2.6 及更高版本),或剪辑的声音在镜头切换处中断时使用。

多媒体工程师视频生成与制作
★ 635