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.
- License 许可
- CC-BY-4.0
- 最近更新
- 2026-11-14
- Stars
- ★ 12
- Forks
- 5
01 前言 Front Matter
- 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.
02 资源文件 7
- 参考文档agents/openai.yaml237 B
- 参考文档INDEX.md2.9 KB
- 许可证LICENSE18.2 KB
- 参考文档LICENSES/Apache-2.0.txt11.1 KB
- 参考文档PROVENANCE.md2.6 KB
- 参考文档SOURCES.md1.5 KB
- 参考文档THIRD_PARTY_NOTICES.md2.1 KB
03 SKILL.md 正文
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-architecturefor public declarations, abstractions, module boundaries, or imports;lean-search-discoverybefore attempting a new proof;lean-proof-patternswhile translating or repairing a proof;lean-naming-stylefor declarations, files, namespaces, and docstrings;lean-elaborationfor measured performance diagnosis or repair;lean-elaboration-testfor a repository-wide performance snapshot;lean-statement-auditfor exact source-to-declaration correspondence;lean-orchestratorfor 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
- Read
AGENTS.mdorCLAUDE.md, the Lake configuration, toolchain file, target module, and nearby imports. - Identify the authoritative mathematical source when a declaration represents an external claim. Preserve its binders, carriers, quantifiers, hypotheses, constants, and endpoint conditions.
- Search Mathlib and the project before adding a declaration or inventing a proof route.
- 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.
- Make the smallest coherent edit and validate it with the repository's guarded command or the narrowest appropriate Lake/Lean command.
- Audit affected public declarations for
sorry, custom axioms, hidden stronger hypotheses, quantifier drift, and constant-dependence drift. Run#print axiomsfrom an untracked probe or other repository-approved audit path, not from a compiled source file. - 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.
04 同仓库更多 Skills
zarr-python
Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3/GCS storage, and NumPy/Dask/Xarray integration. Use for array layout, bounded I/O, format migration, or scientific metadata preservation.
yeet
Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.
xarray
N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF/GRIB/Zarr files, climate/weather/oceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.
writing-mstest-tests
Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for "review" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected/actual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext/lifecycle; timeout/cancellation; OS/CI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest/non-.NET code.
wgs-prs
End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core/sarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti/Tv and Het/Hom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.