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 · 3,079 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 3mo 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 3mo 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.

src/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. 3mo 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 (3,079 stars, last pushed 7d 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

grok-math-director compared with agents from other repositories

grok-math-director next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
grok-math-directorHarleyCoops/Math-To-ManimAgent3.1k7d agoMITA44Claude Code
domain-reviewerpedrohcgs/claude-code-my-workflowAgent1.8k24d agoMITA61Claude Code
book-authorequinor/neqsimAgent177todayApache-2.0A66Claude Code
citizen-entomologistpjt222/agent-almanacAgent46todayMITA36Claude Code
worked-example-factoryequinor/neqsimAgent177todayApache-2.0A36Claude Code
taxonomic-entomologistpjt222/agent-almanacAgent46todayMITA35Claude Code
domain-reviewerbrycewang-stanford/Auto-Empirical-Research-SkillsAgent5.4kyesterdaynoneA56Claude Code