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.
git clone --depth 1 https://github.com/CBirkbeck/mathlib-qualityWrote 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.
[](https://agentmods.dev/commands/cbirkbeck/mathlib-quality/mathlibable)<a href="https://agentmods.dev/commands/cbirkbeck/mathlib-quality/mathlibable"><img src="https://agentmods.dev/badge/commands/cbirkbeck/mathlib-quality/mathlibable/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.
<a href="https://agentmods.dev/commands/cbirkbeck/mathlib-quality/mathlibable"><img src="https://agentmods.dev/badge/commands/cbirkbeck/mathlib-quality/mathlibable.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.16696 |
| Opus 5.5 | $0.00000 | $0.06678 |
| Sonnet 5.5 | $0.00000 | $0.03339 |
| Haiku 4.5 | $0.00000 | $0.01670 |
Grade A, and why
mathlibable 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.
How it starts
The opening of the file, as written. The whole thing — 1,360 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/mathlibable — Should this declaration be in mathlib?
Take one Lean declaration and answer the question: should mathlib have this? The answer is rarely obvious. The skill exists to do the search work that makes the answer well-founded — and to refuse to produce a verdict without the evidence.
This is a hard, slow workflow. Mathlib's bar isn't "is this true and useful"; it is "is this the right statement at the right level of generality, and not already there in some form we should be reusing?" Getting that right takes thorough literature + mathlib search. Skipping the search produces wrong verdicts.
Usage
/mathlibable <Foo.bar> # Mode A: one declaration; full 10-phase workflow
/mathlibable <file.lean> # Mode B: every public decl in this file; orchestrator-worker
/mathlibable <file1.lean> <file2.lean> ... # Mode B: same, across multiple files
There is no --quick flag and no --exhaustive flag. Every invocation runs
the full exhaustive literature search. Mathlib is Bourbaki 2.0 — adding the
right declaration in the right form requires doing the thorough work every
time. Producing a verdict in five minutes by skipping channels is exactly the
failure mode this skill exists to prevent.
Mode B is slow by design. Each public declaration in the file(s) gets its
own full 10-phase workflow (one Agent per decl). On a 30-decl file with the
exhaustive lit search, plan on hours. The orchestrator narrates a one-line
scoreboard between dispatches so you can leave it running. If you only want
to know which declarations are worth investing this kind of work in, run
/overview first — its Step 9 mathlibable triage assigns each decl to
SKIP / LIKELY-NO / LIKELY-YES / WORTH-FULL-CHECK based on cheap
signals only.
Prerequisites
lake buildclean (the declaration must elaborate; we read its full elaborated type, not a sorry-placeholder).- The declaration exists in the current Lean project. Mathlib-tree decls aren't in
scope — if you want to ask "should this mathlib decl be more general?", use
/generaliseinstead. - Optional but highly valuable: a
.mathlib-quality/references/directory of source-paper PDFs / notes. The literature search reads these first; with them, the standard-form question is often answered in seconds. Without them, the skill falls back to WebSearch + ChatGPT MCP + nLab/Stacks; still works, takes longer.
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.
- 1mo ago First seen · 1,360 lines · 0 tokens per session scan A 4beeb5d910a7
mathlibable is a command published in the GitHub repository CBirkbeck/mathlib-quality (35 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 16,696 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.
Other commands, from other repositories
verify-math
Verify a self-authored mathematical result end to end by routing claims across adversarial review, numerical falsification, symbolic or CAS checks, and Lean, then aggregating one report. Use when a theorem, proposition, conjecture, or paper-wide mathematical argument needs the appropriate combination of verification…
diff
Quantitative volume comparison between a CadQuery model and a reference STEP file.
simulation-calibrator
Test and refine simulation accuracy with validation loops, bias detection, and continuous improvement frameworks.
arg-diagram
ARG academic-paper diagram mode — standalone structural & conceptual diagram generation.
plot
Publication Polish. Runs after results-analysis (Phase 7). Audits all tables and figures produced in Phases 4–7, upgrades them to top-journal standards by calling the table and figure skills.
graphite-morphology-classify
Classify graphite in a cast-iron micrograph per ASTM A247 / ISO 945-1, quantify nodularity, and read the matrix — the single most diagnostic observation in a cast-iron case.