Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.79 KB

README.md

File metadata and controls

42 lines (26 loc) · 1.79 KB

Write Lean Code

Lean 4 and Mathlib conventions for code, proofs, naming, documentation and compile-time tests that mirror the public library API.

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 .lean file: 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

Additional workflows

Compile-time test conventions are in skills/write-lean-code/references/tests/workflow.md. The single Lean review checklist includes mirrored test coverage where the project uses that convention.