By mattrobball
Review Lean 4 / Mathlib code against community conventions: style, naming, documentation, proof quality, and library design
A Claude Code plugin that reviews Lean 4 / Mathlib code against community conventions.
/mathlib:review launches four parallel review agents that audit your changed .lean files:
| Agent | Focus |
|---|---|
| Style & Naming | Line length, by placement, indentation, snake_case/UpperCamelCase, symbol dictionary, Type* |
| Documentation | Copyright headers, module docstrings, docBlame, section organization, import discipline |
| Proof Quality | Tactic selection (grind, gcongr, positivity), redundant sequences, @[simp]/@[ext] attributes, sorry detection |
| Generality | Type class assumptions (Ring vs Semiring), FunLike/SetLike patterns, simp normal form, API completeness |
After all agents report, it fixes issues directly, runs lake exe runLinter and lake exe lint-style, and summarizes what changed.
# Add the marketplace
/plugin marketplace add YOUR_GITHUB_USER/mathlib-claude-plugin
# Install the plugin
/plugin install mathlib@mathlib-tools
Or test locally without installing:
claude --plugin-dir ~/misc/mathlib-claude-plugin
In any Lean 4 / Mathlib project with uncommitted changes:
/mathlib:review
The review checklist is compiled from:
Apache-2.0
Runs pre-commands
Contains inline bash commands via ! syntax
Bash prerequisite issue
Uses bash pre-commands but Bash not in allowed tools
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
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 claimnpx claudepluginhub mattrobball/mathlib-claude-plugin --plugin mathlibComprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Tools to maintain and improve CLAUDE.md files - audit quality, capture session learnings, and keep project memory current.
Comprehensive PR review agents specializing in comments, tests, error handling, type design, code quality, and code simplification
Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.
Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review
Comprehensive C4 architecture documentation workflow with bottom-up code analysis, component synthesis, container mapping, and context diagram generation