Skip to content
Back to search

lean4-skills

SkillGitHubIncomplete

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/cameronfreer--lean4-skills/badge.svg)](/listings/cameronfreer--lean4-skills)

HTML

<a href="/listings/cameronfreer--lean4-skills"><img src="/api/listings/cameronfreer--lean4-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

| Host | Recommended installation | What you get | Details | |---|---|---|---| | Claude Code | Native plugin (Tier 3) | Skill + `/lean4:*` commands, hooks, guardrails, subagents, helper runtime | [Claude Code](INSTALLATION.md#claude-code-native-plugin) | | Codex | Native plugin (Tier 3) | Skill + trusted hooks + absolute-path helper runtime; no `/lean4:*` parity | [Codex](INSTALLATION.md#openai-codex-cli) | | Other Agent Skills hosts (Gemini, Antigravity, Copilot, Cursor, Windsurf, OpenCode, …) | Skill-only quick install | Instructions + references (documented, not CI-verified) | [Installation guide](INSTALLATION.md) | | Any host, full runtime | Portable checkout (Tier 2) | Skill + wrappers + helper scripts | [Portable](INSTALLATION.md#portable-checkout--helper-runtime-all-hosts) |

**Claude Code** (run in chat):

/plugin marketplace add cameronfreer/lean4-skills
/plugin install lean4

**Codex** (in your shell):

codex plugin marketplace add cameronfreer/lean4-skills --ref main
codex plugin add lean4@lean4-skills

> Host-native skill installers generally provide the instructions and > references only. Use the portable runtime when you also need the bundled > wrappers and scripts; Claude Code and Codex provide native full-plugin > installations.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 23 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "lean4-skills",
  3. "owner": {
  4. "name": "Cameron Freer",
  5. "email": "lean4skills@gmail.com"
  6. },
  7. "metadata": {
  8. "description": "Lean 4 theorem proving with guided + autonomous proving, LSP-first workflows, guardrails, and contribution helpers",
  9. "version": "4.12.0"
  10. },
  11. "plugins": [
  12. {
  13. "name": "lean4",
  14. "description": "Unified Lean 4 plugin (draft, formalize, autoformalize, prove, autoprove, disprove, checkpoint, review, refactor, golf, learn, diagnose) — LSP-first, scripts fallback",
  15. "source": "./plugins/lean4"
  16. },
  17. {
  18. "name": "lean4-contribute",
  19. "description": "Draft and submit bug reports, feature requests, and insights as GitHub issues. Commands may share Lean code snippets with GitHub — review every draft before confirming.",
  20. "source": "./plugins/lean4-contribute"
  21. }
  22. ]
  23. }
README.md · README · 99 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Lean 4 Skills
  2. Lean 4 workflow pack for AI coding agents. Gives your agent a structured
  3. prove/review/golf loop, mathlib search, axiom checking, and safety guardrails.
  4. The workflows are host-agnostic — Claude Code, Codex, Gemini CLI, Cursor, and
  5. others all use the same core skill; only the invocation surface differs.
  6. ## Quick Start
  7. | Host | Recommended installation | What you get | Details |
  8. |---|---|---|---|
  9. | Claude Code | Native plugin (Tier 3) | Skill + `/lean4:*` commands, hooks, guardrails, subagents, helper runtime | [Claude Code](INSTALLATION.md#claude-code-native-plugin) |
  10. | Codex | Native plugin (Tier 3) | Skill + trusted hooks + absolute-path helper runtime; no `/lean4:*` parity | [Codex](INSTALLATION.md#openai-codex-cli) |
  11. | Other Agent Skills hosts (Gemini, Antigravity, Copilot, Cursor, Windsurf, OpenCode, …) | Skill-only quick install | Instructions + references (documented, not CI-verified) | [Installation guide](INSTALLATION.md) |
  12. | Any host, full runtime | Portable checkout (Tier 2) | Skill + wrappers + helper scripts | [Portable](INSTALLATION.md#portable-checkout--helper-runtime-all-hosts) |
  13. **Claude Code** (run in chat):
  14. ```text
  15. /plugin marketplace add cameronfreer/lean4-skills
  16. /plugin install lean4
  17. ```
  18. **Codex** (in your shell):
  19. ```bash
  20. codex plugin marketplace add cameronfreer/lean4-skills --ref main
  21. codex plugin add lean4@lean4-skills
  22. ```
  23. > Host-native skill installers generally provide the instructions and
  24. > references only. Use the portable runtime when you also need the bundled
  25. > wrappers and scripts; Claude Code and Codex provide native full-plugin
  26. > installations.
  27. ## Workflows
  28. | Workflow | Description |
  29. |---|---|
  30. | draft | Draft Lean declaration skeletons from informal claims |
  31. | formalize | Interactive formalization — drafting plus guided proving |
  32. | autoformalize | Autonomous end-to-end formalization from informal sources |
  33. | prove | Guided cycle-by-cycle theorem proving |
  34. | autoprove | Autonomous multi-cycle proving with explicit stop budgets |
  35. | disprove | Guided counterexample search with certified refutation |
  36. | checkpoint | Save point (per-file + project build, axiom check, commit) |
  37. | review | Read-only quality review |
  38. | refactor | Leverage mathlib, extract helpers, simplify proof strategies |
  39. | golf | Improve proofs for directness, clarity, performance, and brevity |
  40. | learn | Interactive teaching and mathlib exploration |
  41. | diagnose | Diagnostics and migration help |
  42. **Claude Code:** invoke as `/lean4:<name>`. **Other hosts:** follow the corresponding workflow in [SKILL.md](plugins/lean4/skills/lean4/SKILL.md).
  43. Typical session: `draft` (or `formalize` / `autoformalize`) → `prove` (or `autoprove`) → `review` → `refactor` → `golf` → `checkpoint` → `git push`. Use `disprove` instead of `prove` to refute a statement rather than prove it.
  44. CLI-like inputs to the seven parameter-heavy commands are validated by a host-agnostic parser — see the [Command Invocation Contract](plugins/lean4/skills/lean4/references/command-invocation.md).
  45. ## The Shared Proof Cycle
  46. The proving workflows (`prove`, `autoprove`, `formalize`, and `autoformalize`) share one cycle — **Plan → Work → Checkpoint → Review → Replan → Continue/Stop** — where each sorry gets a mathlib search, tactic attempts, and validation, and being stuck forces a review + replan. Statement and header changes belong to the synthesis workflows (`formalize` / `autoformalize`); `prove` and `autoprove` keep declaration headers immutable. Editing `.lean` files without a command runs one bounded pass — fix the immediate issue, then hand off to the right workflow — with the [Blocked-Goal Triage loop](plugins/lean4/skills/lean4/references/sorry-filling.md#blocked-goal-triage) for a goal that resists it. Details: [cycle-engine.md](plugins/lean4/skills/lean4/references/cycle-engine.md).
  47. ## Verification
  48. CI gates every PR: full documentation lint, semantic contract suites, hook and wrapper runtime tests on Linux and macOS Bash 3.2, and pinned shellcheck/ruff/mypy/actionlint. Hosts marked "documented" in the Quick Start table follow verified setup patterns but are not CI-tested.
  49. ## Lean LSP MCP (Optional, Recommended)
  50. The skill works standalone, but pairs best with [lean-lsp-mcp](https://github.com/oOo0oOo/lean-lsp-mcp): live goal inspection, mathlib search, and typically much faster feedback than repeated full builds. See [INSTALLATION.md → MCP Server](INSTALLATION.md#lean-lsp-mcp-server-all-hosts) for registration on any host, including the Claude Code scope trade-off for subagent visibility.
  51. ## Documentation
  52. - [INSTALLATION.md](INSTALLATION.md) — installation tiers, host sections, MCP setup
  53. - [SKILL.md](plugins/lean4/skills/lean4/SKILL.md) — core skill reference
  54. - [Commands](plugins/lean4/commands/) — command documentation
  55. - [References](plugins/lean4/skills/lean4/references/) — cycle engine, mathlib style, proof golfing, tactic patterns, grind, metaprogramming, and more
  56. - [lean4-contribute](plugins/lean4-contribute/README.md) — opt-in helper for filing bug reports, feature requests, and insights from your editor
  57. - [CHANGELOG.md](CHANGELOG.md) — version history
  58. - [MIGRATION.md](plugins/lean4/MIGRATION.md) — migrating from v3 (Claude Code)
  59. ## Contributing
  60. Issues and PRs welcome at https://github.com/cameronfreer/lean4-skills. With the `lean4-contribute` plugin installed, your agent may suggest filing bug reports, feature requests, or insights at natural stopping points — drafting starts only after you opt in, and every draft is shown in full before anything is sent.
  61. ## License & Citation
  62. MIT licensed. See [LICENSE](LICENSE) for more information.
  63. Citing this repository is highly appreciated but not required by the license. See also [CITATION.cff](CITATION.cff).
  64. ```bibtex
  65. @software{lean4-skills,
  66. author = {Cameron Freer},
  67. title = {Lean 4 {Skills}: Theorem proving skill and workflow pack for {AI} coding agents},
  68. url = {https://github.com/cameronfreer/lean4-skills},
  69. month = oct,
  70. year = {2025}
  71. }
  72. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.