Agent formal verify



















A skill for Claude Code, Codex, Pi, OpenCode and Antigravity that implements the targeted formal-verification method recently promoted by Boris Cherny. The agent models selected parts of your code, checks their properties, maps counter-examples to source lines, and helps reproduce and fix reachable bugs.
It uses TLA+ and TLC for thread interleavings, shutdown and resource ownership, and Lean 4 for arithmetic, bounds and sequential state transitions. A protocol that depends on arithmetic can use both. For Rust functions with bounded inputs and loops, Kani checks the production code for overflow, invalid memory access, panics and broken invariants.
Install
Claude Code
Run in Claude Code:
/plugin marketplace add michael-denyer/agent-formal-verify
/plugin install agent-formal-verify@agent-formal-verify
Codex
Run in your terminal:
codex plugin marketplace add michael-denyer/agent-formal-verify
codex plugin add agent-formal-verify@agent-formal-verify
Pi
Run in your terminal:
pi install npm:agent-formal-verify
To install from Git instead, use pi install git:github.com/michael-denyer/agent-formal-verify.
OpenCode
OpenCode 2.2 or later. Run in your terminal:
opencode plugin add agent-formal-verify
To install from Git instead, use opencode plugin add 'git+https://github.com/michael-denyer/agent-formal-verify.git'.
Antigravity
Clone or check out the repository, then run in your terminal:
agy plugin install /absolute/path/to/agent-formal-verify
Run setup once to prepare the shared Java, Python, TLC, elan, Lean, Rust and Kani tools. In Claude Code, use /agent-formal-verify:setup. In Codex, request the plugin's setup skill. In Pi, use /skill:setup. In OpenCode or Antigravity, request the setup skill. It reuses installed prerequisites and needs no target repository.
For local checkouts and skills-only installs, see shared installation.
Getting started
Use formal-verify to check this queue's shutdown protocol and window arithmetic.
In Claude Code, use /agent-formal-verify:formal-verify. In Codex, type $formal-verify or request the plugin's formal-verify skill. In Pi, use /skill:formal-verify. In OpenCode or Antigravity, request the formal-verify skill.
How it works