math-formalize

math-formalize is a command for Claude Code from ngtiendong/Academic-Research-Agent-Skill. It costs 0 tokens per session (393 once invoked), scanned A, original, MIT.

A command that acts as a strategist for turning mathematical ideas into precise specifications before implementation.

In plain words
What is it for?
Defining variables, inputs, outputs, constraints, objectives, assumptions, implementation links, and metric-safety requirements for mathematical work.
Why use it?
It exposes undefined terms, unclear assumptions, unsafe metrics, and ambiguous notation before they cause problems in code or research.

Command for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Defining variables, inputs, outputs, constraints, objectives, assumptions, implementation links, and metric-safety requirements for mathematical work.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/ngtiendong/academic-research-agent-skill/math-formalize
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/ngtiendong/Academic-Research-Agent-Skill

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 math-formalize

README.md
[![agentmods](https://agentmods.dev/badge/commands/ngtiendong/academic-research-agent-skill/math-formalize/github.svg)](https://agentmods.dev/commands/ngtiendong/academic-research-agent-skill/math-formalize)
Your own site
<a href="https://agentmods.dev/commands/ngtiendong/academic-research-agent-skill/math-formalize"><img src="https://agentmods.dev/badge/commands/ngtiendong/academic-research-agent-skill/math-formalize/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 math-formalize

Your own site · 80×15
<a href="https://agentmods.dev/commands/ngtiendong/academic-research-agent-skill/math-formalize"><img src="https://agentmods.dev/badge/commands/ngtiendong/academic-research-agent-skill/math-formalize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 393 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.00000 $0.00393
Opus 5 $0.00000 $0.00197
Sonnet 5 $0.00000 $0.00079
Haiku 4.5 $0.00000 $0.00039

Measured 9d ago against content hash 91023f8169a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

math-formalize 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 9d 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.

.claude/commands/math-formalize.md · 44 lines

What it actually says

/math-formalize

Act as the Strategist for mathematical formalization.

Language

Follow config/language.yaml when present.

Task

Formalize each proposed contribution before implementation.

Procedure

  1. Define objects, variables, inputs, outputs, constraints, and assumptions.
  2. State the objective or optimization target.
  3. Map each term to implementation interfaces where possible.
  4. Identify missing definitions or ambiguous notation.
  5. Run the metric hygiene checklist on every metric and headline claim.
  6. Keep the formalization as simple as the research permits.

Metric Hygiene Checklist

Apply before any metric enters a draft or experiment code:

  • Notation completeness: every symbol in every formula has a formal definition, including "obvious" ones (state any conditioning and the targeted/untargeted variant).
  • Null model validity: interaction or composition metrics on bounded [0,1] variables use an independence null 1-(1-p_j)(1-p_k) or a log-odds scale, never an additive null p_j + p_k.
  • Ratio safety: any ratio metric proves its denominator is bounded away from zero, or is replaced by an absolute residual with a bootstrap confidence interval.
  • Operational definitions: every quantitative headline term (e.g. "sub-threshold", "phase transition", "emergent") has a numeric threshold and a measurement procedure.
  • Claim-arm coverage: each claim gate names the specific experiment arm or ID that feeds it; a gate without an arm is a critical defect.
  • Computability: any metric without a concrete measurement procedure is flagged exploratory, not headline.

Output

  • Notation
  • Problem Definition
  • Objective
  • Assumptions
  • Constraints
  • Implementation Mapping
  • Ambiguities
  • Metric Hygiene Result: pass or list of failing items
  • Math Readiness Score from 1 to 9
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. 9d ago First seen · 44 lines · 0 tokens per session scan A 91023f8169a9

Subscribe to this mod's changes

math-formalize is a command published in the GitHub repository ngtiendong/Academic-Research-Agent-Skill (44 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 393 tokens. 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.