By CBirkbeck
Enforce mathlib code quality and style for Lean 4 projects: format code, golf proofs, meet naming conventions, generate documentation, and run a pre-PR checklist that verifies builds, linters, and file quality via community-learned patterns.
Author or update the project's verso-blueprint — a Verso-based Lean module pairing each declaration with its mathematical statement and a paragraph-level proof sketch, producing an interactive HTML dep-graph + progress summary. Uses the standard `leanprover/verso-blueprint` tooling (the one behind verso-sphere-packing, verso-flt, verso-carleson, verso-noperthedron); this skill focuses on authoring high-quality unformalisations. Statements use Verso directives (`:::theorem "label" (lean := "Foo.bar")`), dep-graph edges use `{uses "label"}[]`, math is KaTeX (``$`...` `` inline, ``$$`...` `` display). Lean status (sorry-free vs. in-progress) is auto-computed from the `(lean := …)` reference — no manual `\leanok` to keep in sync. Reads the Lean source, docstrings, project references in `.mathlib-quality/references/`, and any existing `decomposition.md` / `plan.md` artifacts from `/develop`. Per-declaration orchestrator-worker pattern with a final cross-link / `{uses}` validation pass.
Bump mathlib version and fix resulting breakage
Project-wide cleanup using an orchestrator-worker pattern. The main session is the orchestrator — it does NOT read files, run lean_* tools, or edit. It dispatches batched per-file Agent calls with tight prompts (working dir + branch + build state + sequence + target), then narrates progress in one-line scoreboards between dispatches. Actual work happens in fresh subagent contexts so the orchestrator's context stays light and the session sustains across many hours / days. The proven pattern from a 28-day, 9000-message, 395-dispatch marathon.
Contribute local learnings back to the mathlib-quality repo via PR
Break long proofs into helper lemmas
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A Claude Code skill plugin for developing, proving, cleaning up, and bringing Lean 4 code up to mathlib standards.
Built on 14,000+ real mathlib PR review comments with 7,273 before/after code suggestions, extracted into concrete golfing rules and quality principles.
/develop, then Execute with /beastmodeThe development workflow is split into planning and execution to prevent the "agent
reconsiders the whole approach mid-proof" failure mode. /develop does the strategic
thinking; /beastmode does the tactical implementation; neither does the other's
job.
/develop — planning only.
/cleanup-all; final-of-everything cleanup. The cadence is verified at planning time and re-checked at every resume audit.--continue audits the ticket board against the current code and proposes updates (including missing cleanup tickets); --takeover creates a plan for an existing project. Both end with a hand-off to /beastmode./develop stops./beastmode — marathon execution. Stops at nothing — but stays on-target.
/develop --continue to replan inline and keeps going.lake build broken on entry).sorry, no new axioms (#print axioms checked), maximum generality, gates run on the diff before marking the ticket done./cleanup)Methodical 8-phase workflow for any Lean file. Replaces what used to be three commands (/check-style, /check-mathlib, plus the original /cleanup):
lake build baseline check; aborts if the project doesn't currently compile (we can't tell what we broke without a clean baseline)/check-styleset_option removal + batched mechanical replacements/check-mathlib), and inline /generalise mechanical pass with literature search for public decls/generalise)golfing-rules.md and proof-patterns.md applied systematically (data-driven from 7,273 PR suggestions)npx claudepluginhub cbirkbeck/mathlib-quality --plugin mathlib-qualityUnified Lean 4 plugin (draft, formalize, autoformalize, prove, autoprove, checkpoint, review, refactor, golf, learn, doctor) — LSP-first, scripts fallback
Skills for developing with Lean 4 and Mathlib — proof methodology, toolchain setup, bisection, and more
Multi-agent collaborative theorem proving with LeanTree and Ensue Memory Network
ライブラリ更新pull requestのレビュー手順。dependabot/renovatebot PRの分析、release note調査、コード更新、過去の失敗調査を行う。
Programming as Theory Building guidelines for coding agents, grounded in Peter Naur's paper and focused on preserving program theory during code work.
PROJECT.md-first autonomous development with hybrid auto-fix documentation. 8-agent pipeline, auto-orchestration, docs auto-update on commit (true vibe coding). Knowledge base system with 90% faster repeat research. Strict mode enforces SDLC best practices automatically. Works for ANY Python/JavaScript/TypeScript/Go project.