
Write Lean Code
- 2 repo stars
- Updated July 24, 2026
- cboone/agent-harness-plugins
A Lean 4 style guide and Mathlib conventions covering naming, proofs, formatting, and metaprogramming.
About
Write-lean-code is a Lean 4 style guide and set of Mathlib conventions covering naming, proofs, formatting, and metaprogramming. It keeps formal-methods code idiomatic and consistent with the broader Lean ecosystem. Aimed at developers contributing to Lean libraries and proofs.
- Lean 4 style guide
- Mathlib conventions
- Naming and formatting
- Metaprogramming guidance
Write Lean Code by the numbers
- Data as of Jul 25, 2026 (Skillselion catalog sync)
/plugin marketplace add cboone/agent-harness-plugins/plugin install write-lean-code@agent-harness-pluginsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| repo stars | ★ 2 |
|---|---|
| Last updated | July 24, 2026 |
| Repository | cboone/agent-harness-plugins ↗ |
What it does
A Lean 4 style guide and Mathlib conventions covering naming, proofs, formatting, and metaprogramming.
README.md
Write Lean Code
Lean 4 style guide and Mathlib conventions.
Type: Skill
Trigger: /write-lean-code (also activates automatically)
Installation
See the marketplace install instructions.
What It Does
Provides Lean 4 style conventions covering naming, proof style, formatting, Mathlib API discovery, build infrastructure, metaprogramming, and general functional-programming idioms. Activates automatically when working with .lean files, Lean docstrings, the proofs/ directory, or any discussion of Lean naming or design decisions.
Includes a condensed essential checklist plus comprehensive references organized by topic. Covers Lake build wiring patterns, Mathlib search workflows, and PFR-downstream conventions.
Usage
/write-lean-code
The skill also activates automatically when Claude Code touches Lean source.
Examples
- Editing a
.leanfile: activates automatically - "review this Lean proof for style": activates automatically
- Naming a new lemma or definition: activates automatically
- "/write-lean-code": loads the full style guide explicitly
See Also
- Write Lean Tests: the sibling test-side conventions for compile-time API regression tests
- Write Math: mathematical exposition for Lean docstrings and informal proof prose
- Write Formalization Roadmap: structuring multi-milestone proof projects
- All plugins