From lean
Guides efficient Mathlib builds with Lake: fetch olean cache, quiet verbose-reduced builds, target specific files. Saves tokens for local verification before CI.
npx claudepluginhub leanprover/skills --plugin leanThis skill uses the workspace's default tool permissions.
Fetch the Mathlib olean cache before build:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Fetch the Mathlib olean cache before build:
lake exe cache get
Use lake exe cache get! (with !) to force re-download if the cache appears corrupt.
When building Mathlib reduce verbosity to save on tokens:
lake build -q --log-level=info
For merge conflict resolution or small fixes build only the affected files: lake build Mathlib.Foo.Bar -q --log-level=info.
Often it is fine to leave a complete build to CI. If you need a thorough local build, use lake build Mathlib MathlibTest Archive Counterexamples && lake exe runLinter.