When should you use it?
- Agents produce more code than humans can review
- Review has become the bottleneck
- You track reverts and incidents to stay safe
Not for: Cutting review without watching reverts and incidents; Large or risky changes that still need deep human reading
What do you need, and what do you get?
You need
- Tests, builds and screenshots the agent can run
- A subagent that reads diffs with clean eyes
- Metrics for reverts and incidents
You get
- Changes reviewed and fixed before a human looks
- Pull requests merging with one human at most
- A guardrail that catches regressions early
How does it work, step by step?
- Ask what could go wrongFor every change, work out whether a person or an automated test is better placed to catch each risk.
- Move review earlierKeep review going as code is written, rather than waiting until a pull request opens.
- Make the agent prove itAsk it to run the tests or a build and paste the real output rather than asserting it passed.
- Add a fresh-context reviewerLet a subagent read the change with clean eyes, and run skills that hunt bugs and simplify.
- Guard with revert ratesTrack reverts and incidents; if they rise, you moved work, not saved it.
The prompt
Our own prompt, inspired by Addy Osmani and written to work in Claude Code and Claude. Values in lime are placeholders.
For this change, first tell me what could go wrong and whether a person or an automated test is better placed to catch each risk. Then run our tests and build, and show me the output rather than saying it passed. Have a separate reviewer pass over the change with clean eyes, hunting bugs and simplifying where possible. Summarize what still needs human judgment before I review.
Inspired by Addy Osmani: How the Claude Code team does code review / claude.dev Blog. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.
What can go wrong?
- Cutting review time only helps if reverts and incidents do not rise; watch both.
- Fewer human eyes is fine for routine changes, but reserve human attention for the risky ones.
Our take
The sharpest idea in Addy Osmani's piece is treating review as something that happens while work is produced, not a final checkpoint, combined with requiring the agent to demonstrate its work instead of asserting it. If changes arrive already tested, explained and corrected once, the human reviewer can spend scarce attention on design, risk and intent rather than typos and missing tests. A fresh-context reviewer, an agent session that did not write the code, catches the blind spots an author misses, much as a colleague does. The honest part is the guardrail: reverts and incidents are the real measure. Cutting review time is easy; cutting it without shipping more breakage is the goal, and if those numbers climb, the process has simply moved cost downstream. Start by listing the risks of a change before any review happens, and track revert rates before and after adopting the process. Keep human review mandatory for security, data migrations and anything customer-facing, regardless of how confident the agent sounds.
Where the time goes back: Teams drowning in agent-written code reclaim human attention for the problems only people can solve, without more bugs slipping through.
FAQ
What is the goal?
How is review done before a PR?
Source and credit
Inspired by Addy Osmani. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.
- Inspired by
- How the Claude Code team does code review / claude.dev Blog
- Creator
- Addy Osmani
- Published on
- claude.dev
- Original date
- Oct 15, 2026
- License
- Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
- Originally for
- Claude Code
- AI dry run
- Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails. - Verified
- Oct 23, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.
Are you the creator? Claim or correct this page.