By CBirkbeck
Write Lean 4 code that meets mathlib standards: proof golfing, style cleanup, lemma decomposition, performance profiling, and PR readiness checks, plus documentation generation and reviewer integration for mathlib contributions.
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
Profile Lean declarations, find the slow ones, trace-diagnose the root cause, and fix them until each elaborates fast — ideally under a second. Statements never change; maxHeartbeats never goes up.
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
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.
Twenty-two commands spanning the whole workflow: plan → prove → cleanup → assess mathlib-fit → blueprint → self-review → PR. Every workflow is methodical, phase-numbered, and gated (missing artifacts fail the step); mathematical judgement is enforced through required evidence rather than through post-hoc review.
MQSlimA parallel slim plugin that shadows this
one — same workflows, same load-bearing rails, restated in the "trust frontier-
model judgement; minimal instructions" style Anthropic's skill-authoring guide
explicitly recommends. Load both together and pick per task by typing /cleanup
(verbose, gated) vs. /clnup (slim). MQSlim tests the hypothesis that
frontier models produce better output when the prompts state the goal + the
gates that catch real failures, and then get out of the way.
/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.
∧-chain, source parts (i)/(ii)/(iii)) is split at planning time — one lemma per part, each with its own name and minimal hypotheses; any kept bundle is a one-line ⟨…⟩ assembly. Long theorem statements never get born. Exceptions (shared-witness existentials, simultaneous-induction bundles) in references/statement-splitting.md./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.⟨…⟩ assembly. Spawned sub-tickets are born single-conclusion.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)npx claudepluginhub cbirkbeck/mathlib-quality --plugin mathlib-qualitySlim shadow of mathlib-quality — same goals, minimal instructions, trusts frontier-model judgement
Unified 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
Programming as Theory Building guidelines for coding agents, grounded in Peter Naur's paper and focused on preserving program theory during code work.
Solve competition math (IMO, Putnam, USAMO) with adversarial verification that catches what self-verification misses. Fresh-context verifiers attack proofs with specific failure patterns. Calibrated abstention over bluffing.
Autonomous improvement engine for Claude Code. Runs an unbounded modify-verify-keep/discard loop against any mechanical metric. 10 subcommands: plan, debug, fix, security, ship, scenario, predict, learn, and reason.