stage2-build
leanprover/lean4/.claude/skills/stage2-build/SKILL.md
Build and run tests against the stage2 Lean compiler. Use when asked to build, rebuild, or test against stage2.
Skill9.4k starsChanged 28 days ago
What's in it
- Testing Stage 2
Tools it asks for
- Bash
- Read
--- name: stage2-build description: Build and run tests against the stage2 Lean compiler. Use when asked to build, rebuild, or test against stage2. allowed-tools: Bash, Read --- # Testing Stage 2 Building stage2 is expensive, so confirm with the user before starting a stage2 build. Build it as follows: ```bash make -C build/release stage2 -j$(nproc) ``` Stage 2 is *not* automatically invalidated by changes to `src/`, which allows for faster iteration when fixing a specific file in the stage 2 build. But to invalidate any files that already passed the stage 2 build (as well as for final validation), ```bash make -C build/release/stage2 clean-stdlib ``` must be run manually before building. To rebuild individual stage 2 modules without a full `make stage2`, use Lake directly: ```bash cd build/release/stage2 && lake build Init.Prelude ``` To run tests in stage2, replace `-C build/release` with `-C build/release/stage2` in the usual test commands (see the project `.claude/CLAUDE.md` "Running Tests" section).
More agent context in leanprover/lean4
7 other files this repository gives its agents.
AGENTS.md
CLAUDE.md
Skill
- ci-log-retrieval.claude/skills/ci-log-retrieval/SKILL.md
- profiling.claude/skills/profiling/SKILL.md
- release-highlights.claude/skills/release-highlights/SKILL.md
- stage2-olean-test.claude/skills/stage2-olean-test/SKILL.md
- zulip-extract.claude/skills/zulip-extract/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool registry_write, action report. How to connect one.

