grok-math-director

grok-math-director is an agent for Claude Code from HarleyCoops/Math-To-Manim. It costs 44 tokens per session (516 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to calculate or check physics and homework answers, convert units, differentiate or integrate expressions, validate LaTeX, and prepare animated math explanations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/harleycoops/math-to-manim/grok-math-director
About the project

Math To Manim turns questions about mathematics or physics into checked visual explanations and rendered Manim animations. It is intended for learners who want concepts explained through ordered reasoning, notes, and motion. Catalogue add-ons provide agents that create and support these explainers.

HarleyCoops/Math-To-Manim · 2,773 stars · on GitHub

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.

Clone the repo
git clone --depth 1 https://github.com/HarleyCoops/Math-To-Manim

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grok-math-director

README.md
[![agentmods](https://agentmods.dev/badge/agents/harleycoops/math-to-manim/grok-math-director/github.svg)](https://agentmods.dev/agents/harleycoops/math-to-manim/grok-math-director)
Your own site
<a href="https://agentmods.dev/agents/harleycoops/math-to-manim/grok-math-director"><img src="https://agentmods.dev/badge/agents/harleycoops/math-to-manim/grok-math-director/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for grok-math-director

Your own site · 80×15
<a href="https://agentmods.dev/agents/harleycoops/math-to-manim/grok-math-director"><img src="https://agentmods.dev/badge/agents/harleycoops/math-to-manim/grok-math-director.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00044 $0.00516
Opus 5.5 $0.00018 $0.00206
Sonnet 5.5 $0.00009 $0.00103
Haiku 4.5 $0.00004 $0.00052

Measured 1mo ago against content hash c0d56edc9b27, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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. 1mo ago 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,773 stars, last pushed 3d ago), licensed MIT. It adds 44 tokens to every session and 516 once invoked, about $0.0002 per session on Opus 5.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

domain-reviewer

Substantive domain review for a lecture deck or a manuscript section. Template agent — customize the 5 review lenses for your field. Checks derivation correctness, assumption sufficiency, citation fidelity, code-theory alignment, and logical consistency. Use after content is drafted or before teaching.

pedrohcgs/claude-code-my-workflow · 61 tokens

book-author

Creates and manages scientific book projects in PaperLab. Handles the full lifecycle: project scaffolding, chapter writing with LaTeX equations, notebook creation for computational figures, book building, and rendering to HTML/Word/PDF/ODF. Does NOT handle paper writing — use the scientific-writer agent for papers.

equinor/neqsim · 66 tokens

acoustics-physicist

Reasons from impedance Z=p/u, Helmholtz number kL regime, and the sonar equation SL-TL-NL+DI+PG through impedance tubes (ISO 10534), anechoic and reverberation rooms, laser vibrometry, and k-Wave/COMSOL simulation while treating edge diffraction inflating absorption above one, near-field versus far-field confusion…

K-Dense-AI/scientific-agents · 104 tokens

additive-manufacturing-engineer

Reasons from melt-pool physics, VED, and thermal history through LPBF vs DED process selection, build orientation anisotropy, support design, powder lot control, CT/metallography NDE, and ASTM F42 / ISO-ASTM 529xx qualification—not generic 3D printing.

K-Dense-AI/scientific-agents · 69 tokens

aeronautical-engineer

Reasons from airfoil polars, drag buckets, and static margin through AVL/DATCOM stability derivatives, wind-tunnel blockage and wall corrections, FAR 25 §25.101–25.207 compliance matrices, and AC 25-7 flight-test evidence—not generic aerospace or pure CFD aerodynamics.

K-Dense-AI/scientific-agents · 68 tokens

agroecologist

Reasons from socio-ecological farm systems, functional diversity, soil-biology-mediated fertility, and yield-service trade-offs through mother-baby and mixed-model trials, N/P/C mass balances, PLFA/amplicon and pollinator surveys, and NDVI/FRAGSTATS landscape analysis, while treating edge-effect and plot-size…

K-Dense-AI/scientific-agents · 98 tokens