Hysen Labs
Open-source project
cameronfreer/lean4-skills avatar
cameronfreer

lean4-skills

Lean 4 theorem proving skill and workflow pack for AI coding agents

391 stars44 forksShellMIT
DEEP OPEN-SOURCE ANALYSIS

Lean 4 Skills packs theorem proving workflows for coding agents

A host agnostic skill set that gives AI agents a structured prove, review, and golf loop for Lean 4 with mathlib search and guardrails.

Installation across hosts

Lean 4 Skills is designed to work with many agent hosts rather than one. Claude Code and Codex get native plugins that include the skill, command invocations, hooks, guardrails, and helper runtimes, while other hosts such as Gemini, Copilot, Cursor, Windsurf, and OpenCode receive a skill only quick install with documentation and references. A portable checkout option bundles wrapper scripts and helper runtime for any host that needs them. Installation details live in INSTALLATION.md, and the host native installers are documented as providing instructions and references even when they are not run through continuous integration.

The workflows

The pack defines a set of workflows that cover the formalization lifecycle: draft turns an informal claim into Lean declaration skeletons, formalize and autoformalize move toward proofs, prove and autoprove run the actual theorem proving with explicit stop budgets, disprove searches for counterexamples, and checkpoint saves a state with a build and axiom check. Review, refactor, golf, learn, and diagnose round out the set. A typical session chains draft or formalize, then prove, review, refactor, golf, checkpoint, and finally a git push, with disprove used when the goal is to refute rather than prove.

Verification and tooling

Continuous integration gates every pull request with a full documentation lint, semantic contract suites, hook and wrapper runtime tests on Linux and macOS Bash 3.2, and pinned versions of shellcheck, ruff, mypy, and actionlint. The shared proof cycle for the proving workflows follows a plan, work, checkpoint, review, replan, and continue or stop rhythm, where each unresolved goal gets a mathlib search, tactic attempts, and validation. The code is MIT licensed and the August 2026 snapshot shows 391 stars, 44 forks, and 34 open issues.

Editorial conclusion

The project is MIT licensed and reports 391 stars with 44 forks as of August 2026. Its CI pipeline enforces documentation linting, semantic contract suites, and runtime tests across Linux and macOS before changes are merged.

DEEP OPEN-SOURCE ANALYSIS

Official sources

Community notes

Community notes