I used Opus 5.5 and Lean to formally verify the Claude Agent SDK.
A couple short prompts led to 16 PRs fixing various bugs and race conditions.
I sometimes combine Lean and TLA+ to look for issues around data flow, concurrency, and state management.
I don't know either language well, but Claude is excellent at both.
I find this approach super useful for formally modeling code and finding bugs that a human probably wouldn't have spotted.
I asked whether formal verification is the future of coding, or at least bug finding.
Opus made an infographic about my formal-verification work, which I shared at https://t.co/w9fMWqB7HA.
I talk to Claude the way I would a coworker: I give it a goal and usually avoid overly scaffolded or prescriptive instructions.
- When prompting Claude, I communicate what I want it to do, how much effort I want it to spend, and how it should verify its work.
I shared another example of my actual prompts at https://t.co/xOyjaC8xrn.
Related: maintaining ai code quality, automating the coding workflow, ai agents and computer use