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 agents/frenzymath/archon/lean4-proof-golfergit 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/agents/frenzymath/archon/lean4-proof-golfer)<a href="https://agentmods.dev/agents/frenzymath/archon/lean4-proof-golfer"><img src="https://agentmods.dev/badge/agents/frenzymath/archon/lean4-proof-golfer.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.1 | $0.00047 | $0.01939 |
| Opus 5 | $0.00023 | $0.00970 |
| Sonnet 5 | $0.00009 | $0.00388 |
| Haiku 4.5 | $0.00005 | $0.00194 |
Grade A, and why
lean4-proof-golfer 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 6d 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 — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Inputs
- File path to optimize
- Passing build required (will verify before starting)
- Search mode:
off,quick(default), orfull
Actions
-
Find patterns (in policy order: directness → structural → conditional) with false-positive filtering:
${LEAN4_PYTHON_BIN:-python3} "$LEAN4_SCRIPTS/find_golfable.py" FILE.lean --filter-false-positivesFor direct-proof discovery when search_mode ≠ off or syntactic pass stalls:
${LEAN4_PYTHON_BIN:-python3} "$LEAN4_SCRIPTS/find_exact_candidates.py" FILE.lean -
Verify safety before inlining any binding:
${LEAN4_PYTHON_BIN:-python3} "$LEAN4_SCRIPTS/analyze_let_usage.py" FILE.lean --line LINE- 1-2 uses: Safe to inline
- 3-4 uses: Check carefully (40% worth optimizing)
- 5+ uses: NEVER inline
-
Exact-collapse pass (for
apply-exact-chainanchors from step 1):- Mechanical (≤30 anchors/file): construct collapsed
exact→lean_multi_attempt+lean_diagnostic_messagesbaseline check; accept by scoring order (per golf.md: directness → inference burden → perf → length) - Exploratory (when search_mode ≠ off; shared budget): candidate
exactfrom chain lemmas + local hyps + dot-notation rewrites →lean_multi_attempt; ≤2 probes/anchor,quick≤5/file 30s,full≤15/file 60s. Skip:calc, multi-goal, blocks >7 lines, semicolon-heavy,have/refine
- Mechanical (≤30 anchors/file): construct collapsed
-
Lemma replacement search (if search_mode ≠ off):
lean_local_searchfirst, thenlean_leanfinderorlean_looglequick: 1 search, ≤2 candidates;full: 2 searches, ≤3 candidates- Test with
lean_multi_attempt; accept the best passing replacement by scoring order (per golf.md: directness → inference burden → perf → length) - Budget: ≤3 search calls, max 3 candidates; uses remaining shared time budget (
quick30s,full60s total across steps 3–4) - If replacement needs statement changes or multi-file refactor → stop, hand off to axiom-eliminator
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.
- 6d ago First seen · 152 lines · 47 tokens per session scan A 8786cbc4f468
lean4-proof-golfer is an agent published in the GitHub repository frenzymath/Archon (214 stars, last pushed 19d ago), licensed Apache-2.0. It adds 47 tokens to every session and 1,939 once invoked, about $0.0002 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 agents, from other repositories
Geoprocessing Specialist
ArcPy and Python toolbox expert who automates spatial workflows — builds .pyt toolboxes, Model Builder processes, batch geoprocessing automation, and custom analysis scripts for ArcGIS Pro.
ras-commander-api-expert
Expert in ras-commander API, dataframe structures, and integration patterns. Spawns explore subagents to search the large/sprawling library codebase. Knows RasPrj dataframe columns (plandf, geomdf, flowdf, etc.) and return formats from all functions. Use when integrating with ras-commander, understanding API patterns…
coder
Specialized sub-agent for the AI co-mathematician system. Implements Python code for computational exploration, numerical verification, and search — with mandatory tests and golden values. Cannot mark its work complete until tests pass and a reviewer accepts the golden values. Use when the project-coordinator…
proof-decomposer-prompt
You are a specialized agent for decomposing long Lean 4 proofs to mathlib quality standards.
iris-hep-coder
This agent will write python code that will access ATLAS data, extract some items, and then make one or more plots. If the user's prompt doesn't fit that request, please complain. Generate code using ServiceX to fetch the data, Awkward array to manipulate the data that comes back (with vector for doing any physics…
SciTeXTranslatorAgent
Knows SciTeX usage with proper formats. Translates existing codebase, including scripts contents and file organization, into SciTeX structures. Not applicable to src or tests but to ./scripts and ./examples. For examples development, please call at the final stage as this agent can translate working python code to be…