lean-bisect
Skill3 starsChanged 24 days agoApache-2.0View on GitHub
USE FOR: bisecting Lean 4 toolchain versions or commits to find which one introduced a regression. DO NOT USE FOR: building a project (@lean-build). TRIGGERS: bisect, regression, "which commit broke".
1 other project uses a version of this.
Adopted by
Most recently taken up by
- leanprover/skillstheir own version, first seen Feb 21, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- leanprover/skills★ 72same name
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-blueprintSkill
- lean-buildSkill
- 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
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 81
Use the lean-bisect script (in the lean4 repo at script/lean-bisect) to find which commit introduced a behavior change.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bisecting Lean Toolchains
Toolchain bisecting contract for Lean 4 and Mathlib. Guides pinpointing introducing commits across compiler releases or nightlies using
script/lean-bisect.
Routing
- USE FOR: running
script/lean-bisecton a self-contained Lean test file to identify the Lean 4 commit or nightly that introduced a behaviour change; comparing exit-code, stdout, and stderr signatures across a commit range; isolating regressions in tactic behaviour, elaborator output, panic conditions, or build success. - DO NOT USE FOR: building any Lake project (use
@lean-build); reducing a Mathlib-dependent failure to a self-contained repro (use@lean-mwefirst; bisect operates on standalone files); writing the proof or repairing the failure itself (use@lean-proof); filing the upstream bug report after the
Workflow
- Prepare -- confirm the test file is self-contained (no
Mathlibimports). If Mathlib-dependent, hand off to@lean-mwefirst to produce a standalone repro. STOP otherwise. - Verify endpoints -- manually run
lake env lean(or bareleanfor vendored toolchains) on the failing version and the known-good version. Confirm they show different behaviour before starting the bisect. - Bisect --
script/lean-bisect /tmp/test.lean <range>with the appropriate--timeout. Use--ignore-messagesif only exit code matters; use#guard_msgsto capture exact diagnostics; use--nightly-onlyto keep cycles bounded across long ranges.
Recovery & STOP
- Same signature on both endpoints -> STOP, the test does not discriminate; redesign before bisecting.
- Mathlib import re-appears after minimisation -> STOP, route back to
@lean-mwe;lean-bisectcannot test versions where the Mathlib toolchain pin doesn't match. - Timeout exhaustion (3 consecutive
--timeoutincreases without resolution) -> STOP, the test is too slow; reduce or isolate further.
Handoffs
- Predecessors / successors: see FM
handoffs. Typical inbound:@lean-mwe(after Mathlib-free repro) or direct from@lean-proof(when the operator already has a standalone file). Typical outbound:@lean-pr(upstream report) or@lean-zettelkasten(record the pattern). - Sister skill:
@lean-mwe-- usually chained before bisect.
Use the lean-bisect script (in the lean4 repo at script/lean-bisect) to find which commit introduced a
behavior change.
Detailed reference
Full encyclopedic reference, decision trees, and lookup tables live in
references/lean-bisect-handbook.md .
See also
../../references/lean-bisect-handbook.md-- Completelean-bisectHandbook../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.

