draft

A Lean 4 command that turns an informal mathematical claim into a declaration outline, usually with a placeholder where the proof will go. Lean 4 is a proof-checking programming language.

In plain words
What is it for?
Use it to draft theorem statements from text or a PDF, optionally try an initial proof, check elaboration, and save the result to a Lean file.
Why use it?
It gives you a structured starting point when translating ordinary mathematical wording into code.

Command

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.

agentmods
npx agentmods add commands/frenzymath/archon/draft
Clone the repo
git clone --depth 1 https://github.com/frenzymath/Archon
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,019 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00010 $0.02019
Opus 5 $0.00005 $0.01009
Sonnet 5 $0.00002 $0.00404
Haiku 4.5 $0.00001 $0.00202

Measured 2d ago against content hash 06b53075dd17, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

draft 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 2d 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/archon/.archon-src/skills/lean4/commands/draft.md · 121 lines

How it starts

The opening of the file, as written. The whole thing — 121 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Lean4 Draft

Draft Lean 4 declaration skeletons from informal mathematical claims. Produces sorry-stubbed statements ready for /lean4:prove or /lean4:autoprove.

Usage

/lean4:draft "Every continuous function on a compact set is bounded"
/lean4:draft --mode=attempt "Zorn's lemma implies AC"
/lean4:draft --source ./paper.pdf          # Ingest, pick claims, draft skeletons
/lean4:draft --source ./paper.pdf "Theorem 3.2"  # Source as context, topic as claim
/lean4:draft --output=file --out=MyTheorem.lean "..."

Inputs

Arg Required Default Description
topic no Informal claim to draft. Optional when --source provides it (source-led flow). At least one of topic or --source must be given; omitting both is a hard error.
--mode no skeleton skeleton | attempt. skeleton produces sorry-stubbed declarations only. attempt adds a proof-attempt loop (lean_multi_attempt) before finalizing.
--elab-check no best-effort best-effort | strict. Elaboration check strictness for drafted skeletons.
--level no intermediate beginner | intermediate | expert
--output no chat chat | scratch | file
--out no Output path. Required when --output=file; hard error if missing.
--overwrite no false Allow overwriting existing files with --output=file. Without flag, existing target → hard error.
--source no File path, URL, or PDF to seed drafting. See learn-pathways.md.
--intent no math auto | usage | math. See learn-pathways.md.
--presentation no auto informal | supporting | formal | auto. Controls user-facing display, not Lean backing. See learn-pathways.md.
--claim-select no first | named:"..." | regex:"...". Noninteractive claim selection from --source. See below.

Read the full file on GitHub · 121 lines

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. 2d ago First seen · 121 lines · 10 tokens per session scan A 06b53075dd17

Subscribe to this mod's changes

draft is a command published in the GitHub repository frenzymath/Archon (213 stars, last pushed 16d ago), licensed Apache-2.0. It adds 10 tokens to every session and 2,019 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.