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.
npx agentmods add commands/frenzymath/archon/autoformalizegit clone --depth 1 https://github.com/frenzymath/ArchonWrote 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/frenzymath/archon/autoformalize)<a href="https://agentmods.dev/commands/frenzymath/archon/autoformalize"><img src="https://agentmods.dev/badge/commands/frenzymath/archon/autoformalize.svg" alt="Measured on agentmods" 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 | $0.00014 | $0.01496 |
| Opus 5 | $0.00007 | $0.00748 |
| Sonnet 5 | $0.00003 | $0.00299 |
| Haiku 4.5 | $0.00001 | $0.00150 |
Grade A, and why
autoformalize 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 4d 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 — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Lean4 Autoformalize
Autonomous end-to-end formalization: extracts claims from a source, drafts Lean skeletons, and proves them — all unattended. Combines /lean4:draft and /lean4:autoprove in a single command.
Usage
/lean4:autoformalize --source ./paper.pdf --claim-select=first --out=Paper.lean
/lean4:autoformalize --source ./paper.pdf --claim-select=regex:"Theorem.*" --out=Paper.lean --rigor=checked
/lean4:autoformalize --source ./notes.md --claim-select=named:"Main Lemma" --out=Lemma.lean
Inputs
| Arg | Required | Default | Description |
|---|---|---|---|
| --source | yes | — | File path, URL, or PDF for claim extraction. |
| --claim-select | yes | — | first | named:"..." | regex:"...". Queue-extraction filter applied once at startup. |
| --out | yes | — | Target file for formalized claims. |
| --statement-policy | no | rewrite-generated-only |
preserve | rewrite-generated-only | adjacent-drafts. |
| --rigor | no | sketch |
sketch | checked. Rigor for drafted skeletons. |
| --draft-mode | no | skeleton |
skeleton | attempt. Passed to draft phase. |
| --draft-elab-check | no | best-effort |
best-effort | strict. Passed to draft phase. |
| --max-cycles | no | 20 | Hard stop: max total cycles per claim |
| --max-total-runtime | no | 120m | Hard stop: max total runtime |
| --max-stuck-cycles | no | 3 | Hard stop: max consecutive stuck cycles per claim |
| --deep | no | stuck | never, stuck, or always |
| --deep-sorry-budget | no | 2 | Max sorries per deep invocation |
| --deep-time-budget | no | 20m | Max time per deep invocation |
| --max-deep-per-cycle | no | 1 | Max deep invocations per cycle |
| --deep-snapshot | no | stash | V1: stash only |
| --deep-rollback | no | on-regression | on-regression | on-no-improvement | always | never |
| --deep-scope | no | target | target | cross-file |
| --deep-max-files | no | 2 | Max files per deep invocation |
| --deep-max-lines | no | 200 | Max added+deleted lines per deep invocation |
| --deep-regression-gate | no | strict | strict | off |
| --commit | no | auto | auto | never |
| --golf | no | never | prompt | auto | never |
| --review-source | no | internal | internal | none (coerced from external/both — see autoprove) |
| --review-every | no | checkpoint | N (sorries) | checkpoint | never |
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.
- 4d ago First seen · 116 lines · 14 tokens per session scan A 77dc99f4520f
autoformalize is a command published in the GitHub repository frenzymath/Archon (213 stars, last pushed 17d ago), licensed Apache-2.0. It adds 14 tokens to every session and 1,496 once invoked, about $0.0001 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.
Other commands, from other repositories
derive
Save a clean reference derivation of a target equation or theorem to derivations/. Draws from course materials (textbook, lecture notes) rather than testing the user.
afsim-learn
Command "afsim-learn" from qingzhoupro/afsim-skill, covering /afsim-learn — 文档解析融入 skill, 使用方式, 方式一:提供文件路径, 方式二:直接粘贴文档内容 and 方式三:指定分类.
openehr-explain
One-stop router that explains or looks up any openEHR thing — auto-detects an archetype, a template, an RM/AM/BASE type, an RM structural concept, an ADL idiom, an AQL query or keyword, or a terminology code (replaces /archetype-explain, /template-explain, /type-spec, /rm-structure, /adl-idiom, /terminology).
thesis
Plan, structure, or strengthen a PhD/research thesis or dissertation in AEC.
talk
Turn a paper (or several) into an academic talk — outline, slides, speaker notes, backups, rehearsal plan.
notebook
Draft and execute the paired notebook for a chapter (separable from prose drafting).