lean-build

Build, test, and debug Lean 4 projects using Lake.

1|Updated Nov 11, 2025
One-click install
npx skills add https://github.com/Arthur742Ramos/ComputationalPathsLean --skill lean-build
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lean-build
Source: https://github.com/Arthur742Ramos/ComputationalPathsLean/tree/main/.claude/skills/lean-build
Command: npx skills add https://github.com/Arthur742Ramos/ComputationalPathsLean --skill lean-build

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill covers the essential workflows for configuring, building, testing, and debugging Lean 4 projects using Lake, making Lean development faster and more reliable.

Core Features & Use Cases

  • Build commands: lake build, lake build ComputationalPaths, lake build ComputationalPaths.Path.HIT.Circle
  • Run the executable: lake exe computational_paths
  • Clean artifacts: lake clean
  • Update dependencies: lake update
  • Debug tips for common build errors and toolchain issues

Quick Start

Build the full project with lake build, then run the executable with lake exe computational_paths to verify the install.

Frequently Asked Questions about lean-build

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

FAQPage Schema
How do I build a Lean 4 project with Lake?

Build Lean 4 projects with Lake using `lake build` for a full build, `lake build ComputationalPaths` for specific packages, or `lake build ComputationalPaths.Path.HIT.Circle` for targeted modules. Lake reads configuration from lakefile.toml and enforces toolchain settings via lean-toolchain.

How do I run and test a Lean 4 project after building?

Execute your Lean 4 project with `lake exe computational_paths` to run the built executable. Use `lake clean` to remove artifacts between test iterations, and `lake update` to refresh dependencies before re-running tests.

What should I check when a Lean 4 build fails?

Debug Lean 4 compilation issues by verifying your lean-toolchain file matches project requirements and lakefile.toml is properly configured. Use verbose output flags with lake build commands to expose explicit error guidance and identify missing dependencies or configuration mismatches.

Can I build specific modules instead of the entire Lean 4 project?

Yes, Lake supports targeted module builds. Use `lake build ComputationalPaths.Path.HIT.Circle` to compile individual modules rather than running a full build, reducing compilation time during development and debugging.

How do I update dependencies in a Lean 4 Lake project?

Run `lake update` to refresh all dependencies defined in lakefile.toml. This fetches the latest versions and ensures your toolchain and project dependencies stay synchronized before building or testing.

What files control configuration in a Lean 4 Lake project?

Two files control Lean 4 projects in Lake: lean-toolchain enforces the Lean compiler version and settings, while lakefile.toml defines project metadata, dependencies, build targets, and executable configurations.