by hirosassa
Claude Code skill: find bugs and prove optimizations equivalent with Lean 4
# Add to your Claude Code skills
git clone https://github.com/hirosassa/lean-verifylean-verify is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by hirosassa. Claude Code skill: find bugs and prove optimizations equivalent with Lean 4. It has 62 GitHub stars.
lean-verify's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/hirosassa/lean-verify" and add it to your Claude Code skills directory (see the Installation section above).
lean-verify is primarily written in Shell. It is open-source under hirosassa on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh lean-verify against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
A Claude Code skill that uses the Lean 4 theorem prover as a small, practical tool for:
bv_decide).It targets small functions and single rewrite rules, not whole-program verification. It is language-agnostic (Rust, C, Go, TypeScript, ...): you model the target in Lean, then translate any counterexample back to the original code.
With the GitHub CLI (gh skill, preview):
gh skill install hirosassa/lean-verify lean-verify
# target a specific agent / scope if needed, e.g. --agent claude-code
With APM (Agent Package Manager):
apm install hirosassa/lean-verify
# deploys to .claude/skills/lean-verify (and/or other detected agents); pin with --target claude
Or clone manually:
git clone https://github.com/hirosassa/lean-verify /tmp/lean-verify
cp -r /tmp/lean-verify/skills/lean-verify ~/.claude/skills/
Lean itself is installed on demand by the skill (see references/setup.md), after asking you.
| Path | Contents |
|---|---|
skills/lean-verify/SKILL.md |
Skill entry point: when to use it, workflow, modeling pitfalls |
skills/lean-verify/references/bug-hunting.md |
Counterexample-driven bug hunting |
skills/lean-verify/references/perf-equivalence.md |
Proving optimizations equivalent |
skills/lean-verify/references/tactics.md |
Tactic cheat sheet (core-only first) |
skills/lean-verify/references/setup.md |
Installing Lean / elan, minimal lake project |
skills/lean-verify/scripts/check_lean.sh |
Checks the Lean environment |
skills/lean-verify/assets/examples/ |
Runnable Lean examples |
lean skills/lean-verify/assets/examples/induction_decide_omega.lean
lean skills/lean-verify/assets/examples/bv_overflow_and_strength_reduction.lean # bad_ng is expected to fail with a counterexample
MIT