lean-setup

Bootstrap Lean 4 toolchains and verify lean and lake environment alignment.

2|Updated May 26, 2026
One-click install
npx skills add https://github.com/r-irbe/proof-skills --skill lean-setup-r-irbe
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lean-setup
Source: https://github.com/r-irbe/proof-skills/tree/main/skills/_overrides/lean-setup
Command: npx skills add https://github.com/r-irbe/proof-skills --skill lean-setup-r-irbe

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bootstraps a Lean 4 clone by configuring and verifying toolchains, ensuring that lean and lake environments are consistent and ready for development.

Core Features & Use Cases

  • Bootstraps a fresh leanprover/lean4 clone by provisioning and linking stage0 and stage1 toolchains.
  • Validates lean --version and lake env lean --version to ensure commit-hash alignment and reproducibility.
  • Provides safety checks and gating to prevent drift when retirement or reconfiguration occurs.

Quick Start

Run an initial bootstrap to prepare the Lean toolchain for a new clone and verify consistency.

Frequently Asked Questions about lean-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bootstrap a fresh leanprover/lean4 clone and verify the toolchain?▼

To bootstrap a fresh leanprover/lean4 clone, you provision and link stage0 and stage1 toolchains, then validate lean --version and lake env lean --version for consistency.

Why does my Lean 4 environment drift after reconfiguring the toolchain?▼

Lean 4 environment drift occurs when toolchain versions mismatch. Pinning four lean-toolchain files and validating commit-hash alignment prevents this drift and ensures reproducibility.

What is the best way to repair a broken Lean 4 lake environment?▼

Repairing a broken Lean 4 lake environment involves re-linking stage0 and stage1 toolchains, pinning lean-toolchain files, and running safety checks to validate version consistency.

Do I need elan to link stage0 and stage1 in a Lean 4 bootstrap?▼

Linking stage0 and stage1 in a Lean 4 bootstrap uses elan and lake to provision toolchains. These tools ensure lean and lake environments align with the expected commit hashes.

What are the limitations when pinning lean-toolchain files for reproducibility?▼

Pinning lean-toolchain files limits flexibility to prevent drift, requiring safety checks and gating during retirement or reconfiguration to ensure safe handoffs and maintain version consistency.