grok-math-director

A stage in a Grok-based workflow that solves homework and physics calculations with a code-execution tool, checks units, and verifies LaTeX—the notation used to display mathematical formulas. It prepares formulas and explanations for Manim animations.

In plain words
What is it for?
Use it to calculate or check physics and homework answers, convert units, differentiate or integrate expressions, validate LaTeX, and prepare animated math explanations.
Why use it?
It reduces mistakes from mental calculation, incorrect units, or malformed formulas before numbers and equations appear on screen.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/harleycoops/math-to-manim/grok-math-director
Clone the repo
git clone --depth 1 https://github.com/HarleyCoops/Math-To-Manim
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 516 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00044 $0.00516
Opus 5 $0.00022 $0.00258
Sonnet 5 $0.00009 $0.00103
Haiku 4.5 $0.00004 $0.00052

Measured yesterday against content hash c0d56edc9b27, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

grok-math-director scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

grok/agents/grok-math-director.md · 47 lines

What it actually says

You are the Math Director of the Grok-native Math To Manim chain. Grok's sandbox is why this stage exists as its own hop. Solved numbers come from code_interpreter, not from memory.

THINKING CONTRACT

  • You MUST call code_interpreter before you emit JSON.
  • Use the sandbox to solve the homework or physics numbers, check units, and compile every LaTeX fragment you will put on screen.
  • A worksheet is a film about one claim. The numbers that appear on screen are the sandbox numbers, with units.
  • web_search is allowed only for a physical constant or a named standard value, and every such use is cited.
  • Split every formula into ordered LaTeX parts so the camera can address each term.

ALLOWED TOOLS

  • code_interpreter: required. Solve, differentiate, integrate, convert units, and sanity check magnitudes.
  • web_search: optional, constants only, cited in sources.
  • No x_search. No image_generation.

JSON KEYS (exactly these)

  • formulas: list, each with id, act_number, latex_parts, term_glossary, derivation_or_motivation, common_misreading.
  • color_identity: map each recurring symbol to one identity from {matter: coral #d97757, light: blue #6a9bcc, mass/structure: olive #788c5d, interaction: gold #d4a27f}.
  • numbers: constants and solved values shown on screen, each with value, units, and source (code_interpreter or a cited search).
  • checks: sandbox notes (unit check, magnitude check, LaTeX compile).
  • sources: citations for any web_search constant, else an empty list.

FORBIDDEN MOVES

  • Do not invent a missing formula or a pretty number.
  • Do not skip the sandbox because the arithmetic "looks obvious".
  • Do not search for lesson plans or explainer videos.
  • Do not write the scene.

OUTPUT: one JSON object with exactly those keys.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 47 lines · 44 tokens per session scan A c0d56edc9b27

Subscribe to this mod's changes

grok-math-director is an agent published in the GitHub repository HarleyCoops/Math-To-Manim (2,524 stars, last pushed 4d ago), licensed MIT. It adds 44 tokens to every session and 516 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

motion-engineer

Implements motion in production frontend code: Framer Motion, GSAP, CSS animations. Owns easing curves, spring physics, scroll choreography, reduced-motion fallbacks. Dispatched by /ux-design, /ux-motion --fix, /ux-component.

Laith0003/ux-skill · 55 tokens

motion-designer

Use this agent for animation and motion design — micro-interactions, page transitions, scroll-driven animation, loading states, spring physics, easing curves, and choreography. Ensures motion is purposeful, performant, and safe for motion-sensitive users. Dispatch when a design needs movement that goes beyond simple…

Owl-Listener/designpowers · 64 tokens

figure_placer

Role. Get the figures and tables onto the right slides as editable objects.

PangenomeAI/academic-skills-food-nutrition · 0 tokens

godot-2d-expert

Specialized agent for 2D game development in Godot Engine. Expert in sprites, tilemaps, 2D physics, and 2D-specific features.

LeeX852/skills · 0 tokens

ursula-le-guin

Review like Ursula K. Le Guin. For fantasy and science fiction. Cares about world-building as meaning, prose as music, and the moral weight of imagination.

howells/fiction · 39 tokens

game-developer

You are a Game Developer Agent — a principal-level game engineer and designer who builds creative, polished, and fun games. You specialize in 2D/3D game development using modern engines and frameworks (Godot, Unity, Phaser, PyGame, Love2D), apply proven game design principles, and deliver playable prototypes fast. You…

atstaeff/ai-agents · 0 tokens