Skip to content
Skills Library
Programming · Building & coding

lean-workflow

/lean-workflow

Route Lean 4 work through a repository's Mathlib/Lake conventions. Use when editing Lean files, checking source fidelity or axioms, searching dependencies, validating focused targets, or protecting dependency build artifacts.

Licence
Apache-2.0
Last repository change
13.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Route Lean 4 work through a repository's Mathlib/Lake conventions. Use when editing Lean files, checking source fidelity or axioms, searching dependencies, validating focused targets, or protecting dependency build artifacts.

Original author description

Route Lean 4 work through a repository's Mathlib/Lake conventions. Use when editing Lean files, checking source fidelity or axioms, searching dependencies, validating focused targets, or protecting dependency build artifacts.

How it works

  1. Build and dependency hygiene
  2. Workflow
Original SKILL.md headings · 37 lines, 420 words
SKILL.md preview
---
name: lean-workflow
description: Route Lean 4 work through a repository's Mathlib/Lake conventions. Use when editing Lean files, checking source fidelity or axioms, searching dependencies, validating focused targets, or protecting dependency build artifacts.
---

# Lean workflow

Use this as the general router for a Lean 4 repository built with Lake and Mathlib. Read the repository's own instructions first; they override generic commands and thresholds here. Select a more focused sibling skill when it applies:

- `lean-project-architecture` for public declarations, abstractions, module boundaries, or imports;
- `lean-search-discovery` before attempting a new proof;
- `lean-proof-patterns` while translating or repairing a proof;
- `lean-naming-style` for declarations, files, namespaces, and docstrings;
- `lean-elaboration` for measured performance diagnosis or repair;
- `lean-elaboration-test` for a repository-wide performance snapshot;
- `lean-statement-audit` for exact source-to-declaration correspondence;
- `lean-orchestrator` for an explicitly authorized multi-agent formalization effort.

Use `build-proof-dependency-graph` for a source-level proof dependency database. It records source topology; it does not determine Lean proof status.

## Build and dependency hygiene

- Treat pinned dependencies and their compiled artifacts as read-only during routine project work.
- Never delete dependency `.olean`, `.ilean`, trace, hash, IR, or object files as an invalidation shortcut.
- Follow repository-provided build wrappers and cache guards. Otherwise validate the narrowest project target that covers the edit, for example `lake build Project.Foo.Bar`.
- Do not run `lake clean`, update the toolchain or dependency pins, or trigger a full dependency rebuild without explicit authorization.
- Before a destructive project-artifact invalidation, resolve the exact project-owned path and confirm that no dependency tree can match it.
- Distinguish project compilation from dependency compilation in build and performance reports.

## Workflow

1. Read `AGENTS.md` or `CLAUDE.md`, the Lake configuration, toolchain file, target module, and nearby imports.
2. Identify the authoritative mathematical source when a declaration represents an external claim. Preserve its binders, carriers, quantifiers, hypotheses, constants, and endpoint conditions.
3. Search Mathlib and the project before adding a declaration or inventing a proof route.
4. Do not move proof obligations into hypotheses, introduce custom axioms, or disguise unfinished proofs. Keep any explicitly authorized draft theorem quarantined and visibly marked under the repository's draft policy.
5. Make the smallest coherent edit and validate it with the repository's guarded command or the narrowest appropriate Lake/Lean command.
6. Audit affected public declarations for `sorry`, custom axioms, hidden stronger hypotheses, quantifier drift, and constant-dependence drift. Run `#print axioms` from an untracked probe or other repository-approved audit path, not from a compiled source file.
7. Report exact commands and targets, skipped validation, remaining placeholders, and source mismatches.

If work is delegated, obey the repository's agent policy and give each worker a bounded, disjoint task. Do not infer a model requirement, concurrency policy, or permission to spawn agents from this skill.
Files in this package (2)
  • SKILL.md 3 KB
  • agents/openai.yaml 1 KB

Versions

The database has no other skills named lean-workflow.

Database snapshot: 13.11.2026 · package version 01110e5f31c0 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90lean-naming-style
    Use when naming Lean declarations, organizing files, adding docstrings, or cleaning code so it matches Mathlib conventions and review expectations.
  • 100lean4
    Use when editing .lean files, debugging Lean 4 builds (type mismatch, sorry, failed to synthesize instance, axiom warnings, lake build errors), searching mathlib for lemmas, formalizing mathematics in Lean, finding a counterexample to, refuting, or disproving a Lean statement,…
  • 100lean4-mathlib
    Formalizes and checks mathematical statements in Lean 4 with Mathlib, covering the lake project layout and pinned toolchain, `lake exe cache get` before `lake build`, searching Mathlib through Loogle, `exact?`, `apply?` and `simp?`, tactic hygiene, finishing without `sorry`,…
  • 100lean-verify
    Machine-checked proofs with Lean 4 + Mathlib through the `lean` MCP server on the Spark. Use to prove a safety invariant (core disjointness, disk floor, lease exclusion, queue bounds, protocol/state-machine properties) about an explicit model, and to check that a proof has no…
  • 100cipherlean
    Formalize a theorem from a cryptanalysis paper in Lean 4 + Mathlib: pin the statement and every hypothesis (implicit ones too), encode and state it, test it on a toy instance and a counterexample, prove it lemma by lemma, check with lake build and an axiom report (no sorry,…
  • 90lean-search-discovery
    Use when searching Mathlib for existing declarations, likely theorem names, relevant files, or proof ingredients before attempting a new Lean proof.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.