lean-build
Skill3 starsChanged 24 days agoApache-2.0View on GitHub
USE FOR: building Lean 4 projects with Lake, validating changes with `lake env lean`. DO NOT USE FOR: bisecting which Lean version caused a regression (@lean-bisect). TRIGGERS: build, lake, lake env lean, lake exe cache get, stale artifacts.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- sudeepgupta90/my-ai-marketplacetheir own version, first seen Nov 8, 2026
- mjlueck-hash/cavemantheir own version, first seen Nov 8, 2026
- dhruvsaxena1998/skillstheir own version, first seen Nov 8, 2026
- MMACABRE/SKILLStheir own version, first seen Nov 8, 2026
- VorElze/hermes-office-skillstheir own version, first seen Nov 1, 2026
- jjsizemore/jjskillstheir own version, first seen Nov 1, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- JuliusBrussee/caveman★ 118ksame name
- nomdedev/agent-manager-template★ 2same name
- xingtu1996/dsh-xingtu-skills★ 2same name
- dhruvsaxena1998/skills★ 1same name
- jjsizemore/jjskills★ 1same name
- mjlueck-hash/caveman★ 1same name
- MMACABRE/SKILLS★ 1same name
- Gopyr/gopyr-skills-hub★ 0same name
- pengawasmknan/claude-skills★ 0same name
- sudeepgupta90/my-ai-marketplace★ 0same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository65 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ai-guard-judge-evalSkill
- applied-data-information-securitySkill
- applied-engineering-disciplinesSkill
- applied-legal-reasoningSkill
- epistemic-discovery-engineSkill
- epistemic-mappingSkill
- hol-metamath-adapterSkill
- isabelle-isar-adapterSkill
- itp-cross-portingSkill
- lean-ai-formalizationSkill
- lean-applied-reasoningSkill
- lean-axiom-closureSkill
- lean-bigraph-modelingSkill
- lean-bisectSkill
- lean-blueprintSkill
- lean-causal-reasoningSkill
- lean-competitive-mathSkill
- lean-convergence-verificationSkill
- lean-core-onlySkill
- lean-dag-visualizerSkill
- lean-deep-auditSkill
- lean-doc-feedbackSkill
- lean-doc-improvementSkill
- lean-doc-requirementsSkill
- lean-enforcementSkill
- lean-formalization-breakdownSkill
- lean-gatewaySkill
- lean-integration-protocolSkill
- lean-knowledge-formalizationSkill
- lean-math-analysisSkill
- lean-math-discreteSkill
- lean-math-dynamicalSkill
- lean-math-foundationsSkill
- lean-math-optimizationSkill
- lean-math-stochasticSkill
- lean-mweSkill
- lean-nested-learningSkill
- lean-package-researchSkill
- lean-pedagogical-expositionSkill
- lean-proof-refactorSkill
- lean-proof-repairSkill
- lean-proof-reviewSkill
- lean-proofSkill
- lean-prSkill
- lean-quality-engineSkill
- lean-replay-verificationSkill
- lean-reportSkill
- lean-researchSkill
- lean-retroactive-auditSkill
- lean-retro-methodologySkill
- lean-review-councilSkill
- lean-security-formalizationSkill
- lean-setupSkill
- lean-specificationSkill
- lean-tautology-triageSkill
- lean-upstream-portingSkill
- lean-vendor-substrateSkill
- lean-zettelkastenSkill
- math-product-managementSkill
- The first 60 shown.
The file
Files
Building Lean Projects with Lake
Agnostic Lake-build contract for any Lake-managed repository (
lakefile.leanorlakefile.toml). Replaces the legacy Mathlib-onlylean-buildslug, with general Lake conventions, offline.ileanindexing, and generated C99 inspection.
Routing
- USE FOR: running
lake env lean,lake build <Module>,lake exe cache get,lake clean,lake exe runLinter,lake update <dep>-- including merge-conflict resolution, targeted module iteration, offline.ileaninspection, inspecting generated C99 in.lake/build/ir/, binary.oleankernel verification, and CI-quality local checks. - DO NOT USE FOR: bisecting a Lean version-pin regression (use
@lean-bisect); minimising a build failure to a self-contained MWE (use@lean-mwe);
Workflow
- Pick scope -- single-file (
lake env lean MyFile.lean), targeted module (lake build <Module>.Foo.Bar -q --log-level=info), or full suite (only when broad / pre-CI). Default to targeted iteration to save compute and tokens. - Fetch cache -- for Mathlib-dependent projects, run
lake exe cache get(orlake exe cache get!if cache appears corrupt). For non-Mathlib projects, skip this step (no shared cache). - Build + parse -- run with
-q --log-level=info. Address errors in strict priority order: syntax errors -> type errors -> unsolved goals -> linters. - Leverage build artifacts:
.ileanfiles (.lake/build/lib/**/*.ilean): parse directly for zero-latency symbol definitions and cross-references without waiting for
Recovery & STOP
- Build result looks impossible (ghost errors, missing oleans for a built module) ->
lake clean; for Mathlib, alsolake exe cache get; re-run targeted build once. If still impossible, STOP and re-anchor. - Build hangs > 10 min on a small target -> STOP, suspect dependency cycle or runaway elaboration; hand to
@lean-mweto isolate. lake updateaccidentally invoked mid-iteration -> STOP,git diff lake-manifest.json; revert unless the task is explicitly a dependency update.
Handoffs
- Predecessors / successors: see FM
handoffs. Typical inbound:@lean-setup(after a clean install) or@lean-proof(after a tactic write). Typical outbound:@lean-proof(for active proof repair),@lean-mwe/@lean-bisect/@lean-prfor build failures surviving clean rebuilds. - Sister skill:
@lean-setupfor toolchain repair;@lean-prooffor interactive proving. - REDIRECT pointer:
lean-buildslug routes here (preserved per Chesterton-protocol).
Detailed reference
Full encyclopedic reference, decision trees, and lookup tables live in
references/lean-build-handbook.md .
See also
../../references/lean-build-handbook.md-- Completelean-buildHandbook../lean-gateway/SKILL.md-- Top-level skill router
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

