Guide · Agent skill
How to use the Lean Formalize agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
Lean Formalize is an agent skill, a set of instructions and scripts that an AI agent such as Claude loads when a task matches it. This guide explains what the lean-formalize skill makes the agent do with Lean, the proof assistant, how to install it, how to phrase requests so it triggers, and what it needs to run. By the end you will know whether it fits a proof you want checked and how to start.
Quick start
- 1Install the skill. Download the ZIP from the directory page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
- 2Prepare your Lean project. Make sure a Lean toolchain is installed and your project has a lockfile, so the skill can reuse the existing environment.
- 3State your goal. Give the statement, proof file or project and say whether you want a new proof, a continuation or an audit.
- 4Let the agent check the meaning. The agent fixes definitions and quantifiers against your original statement before implementing the proof.
- 5Review the build and axiom output. Check the build result and the axioms the final theorem depends on, then use the handoff commands to reproduce the build.
What the lean-formalize skill makes the agent do
The skill handles formal mathematical proofs written in Lean. It can develop and verify a proof, continue an incomplete Lean project, or audit whether an existing project proves the original statement. It turns a mathematical statement into Lean definitions and theorems, develops the missing lemmas, connects actual inputs to those lemmas, assembles the target theorem, and checks which axioms the final result depends on.
The skill also asks other AI reviewers from different model families to check key steps when you request cross-family review, and it produces a reproducible handoff with build commands. The skill says it is meant for cases where formal verification adds real value. Its own description says to use the proof-writer skill for ordinary mathematical drafting.
- Turns a statement into Lean definitions and theorems
- Develops missing lemmas and connects them to the original theorem
- Checks the axioms the final result depends on
- Optionally gets review from other model families through MCP reviewer tools
- Produces a reproducible handoff with build commands
Check what you need before installing
The skill expects a working Lean toolchain and an existing Lean project with a lockfile, or one that can be built. It reuses the existing environment rather than reinstalling it. It also needs Bash shell access so it can run builds and checks.
Reviewer backends such as Codex, Grok or Antigravity are optional. They are only needed if you ask for cross-family review. The skill is not suitable if you have no Lean setup, because it does not set one up for you.
- A Lean toolchain and a Lean project with a lockfile
- Bash shell access for builds and checks
- Optional reviewer backends through MCP, only if you request cross-family review
Install the lean-formalize skill
Download the ZIP for the lean-formalize skill from the directory page. Then install it using one of these two routes.
For a personal install across all your projects, unzip the download into ~/.claude/skills/. To limit it to a single project, unzip it into that project's .claude/skills/ folder. In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.
- Personal: unzip into ~/.claude/skills/
- Single project: unzip into the project's .claude/skills/ folder
- Claude apps: upload the ZIP under Settings → Capabilities → Skills
Trigger the skill with natural requests
You do not need a special command. Describe the task in plain language that mentions Lean or formal verification, and name the file, statement or project. The skill is designed to start when Lean is requested or when a specific proof step would benefit from formal checking.
The skill also starts when you ask for an audit. For an audit, the agent reads definitions and exported types, runs applicable checks and reports, and does not silently repair or weaken the theorem.
- "Formalize this lemma in Lean and check it: [statement]"
- "Continue the incomplete Lean proof in this project and tell me what is still missing."
- "Audit whether this Lean project proves the original theorem, without changing the statement."
- "Check which axioms the final theorem in this project depends on."
Use it well and stay safe
The skill can run Bash commands, which can include builds, and it uses the network. The source says it runs scripts and that it uses network access, so review what it is about to run if that matters to you. Keep the original statement as the comparison baseline, and read the output yourself.
A compiled conditional lemma is progress, not a full proof. The skill explicitly does not promise a proof of an open problem. Verify the results yourself: check the exit status of builds and read the axiom report.
- Expect shell commands and network use; review them if your setup is sensitive
- Keep your original statement unchanged unless you intentionally change the goal
- Do not treat a conditional lemma as a complete proof
- Use proof-writer or formula-derivation for short proofs and ordinary derivations
What people use it for
- Checking a mathematical claim in Lean when you need certainty beyond a written argument
- Continuing a colleague's incomplete Lean project and finding where it does not yet prove the original statement
- Auditing a Lean result to confirm which axioms it relies on
- Producing a reproducible Lean build with a clear record for sharing
Frequently asked questions
Is the lean-formalize skill free?
The source gives the licence as MIT. It does not state pricing, so check the directory page for any costs of the Claude product you use to run it.
What do I need to use the lean-formalize skill?
You need a Lean toolchain, a Lean project with a lockfile or one that can be built, and Bash shell access. Reviewer backends such as Codex or Grok are optional and only needed for cross-family review.
Where do I put the lean-formalize skill folder?
Unzip the downloaded ZIP into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder to use it in one project. In the Claude apps you can upload the ZIP under Settings → Capabilities → Skills.
Can the skill prove an open math problem?
No. The skill explicitly does not promise a guaranteed proof of an open problem, and a compiled conditional lemma is not a full proof.
When should I use proof-writer instead of lean-formalize?
Use proof-writer for ordinary mathematical drafting, short proofs and routine derivations. The skill says Lean adds overhead without benefit for these, so it is meant for claims where formal verification adds real value.
Does the skill run code on my machine?
Yes. The source says it runs scripts, uses Bash for builds and checks, and uses the network. Review what it runs if your environment is sensitive.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use lean-formalize if you need a specific mathematical claim checked in Lean, want help with the Lean code, or need to audit whether an incomplete project proves its original statement. Pick something else if you only need ordinary proofs or derivations, or if you have no Lean setup, since the skill expects an existing or buildable Lean environment.
Download the skill