lean-error-fixer

Classify Lean 4 build errors and generate REPL-verified fixes.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/my04337/shapez2-in-lean --skill lean-error-fixer
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: lean-error-fixer
Source: https://github.com/my04337/shapez2-in-lean/tree/main/.github/skills/lean-error-fixer
Command: npx skills add https://github.com/my04337/shapez2-in-lean --skill lean-error-fixer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Lean build errors block progress; this skill analyzes Lean 4 build errors and proposes REPL-verified fixes to speed up debugging.

Core Features & Use Cases

  • Classify Lean 4 build errors by type (unknown identifiers, type mismatches, unsolved goals, etc.) and generate candidate fixes.
  • Validate fixes in a REPL-powered loop to ensure suggested changes are sound.
  • Route to other skills (lean-diagnostics for routing, lean-goal-advisor for goal analysis) to coordinate complex fixes.

Quick Start

Run a lean-build to generate diagnostics, then run the lean-error-fixer to produce REPL-verified fixes.

Frequently Asked Questions about lean-error-fixer

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

FAQPage Schema
How do I fix Lean 4 build errors like unknown identifiers and type mismatches?▼

To fix Lean 4 build errors, you can use an automated error fixer that classifies issues like unknown identifiers and type mismatches, then generates candidate corrections. It validates these fixes in a REPL-powered loop to ensure the suggested changes are sound.

What is the best way to automate Lean build error diagnosis and correction?▼

Automating Lean build error diagnosis involves classifying build errors and generating REPL-verified fixes. This approach speeds up debugging by routing complex issues to specialized diagnostic and goal analysis workflows to coordinate comprehensive corrections.

Do I need a prebuilt diagnostics file to classify Lean 4 build errors?▼

Yes, diagnosing Lean 4 build errors requires a prebuilt .lake/build-diagnostics.jsonl file. You must run a lean-build first to generate these diagnostics before the error fixer can analyze them and propose REPL-validated corrections.

How does REPL validation work for Lean type mismatch fixes?▼

REPL validation for Lean type mismatch fixes works by testing candidate corrections in a loop. This mechanism checks proposed changes against the Lean environment to ensure the suggested fixes are sound and actually resolve the build errors.

Can I use this approach to fix unsolved goals in my Lean project?▼

Yes, you can fix unsolved goals in a Lean project by classifying them and generating candidate fixes. The system coordinates with lean-goal-advisor workflows for goal analysis to analyze and validate corrections for these specific errors.

Why are my Lean error fixes not working during automated diagnosis?▼

Lean error fixes might not work if the prebuilt .lake/build-diagnostics.jsonl file is missing or outdated. Ensure you run a fresh lean-build to generate accurate diagnostics before attempting REPL validation and automated correction.