Code review with Claude Opus 5.5: a prompt to find bugs before merging
Review code with Claude Opus 5.5 before merging: the official prompt, effort level selection and a method to verify each reported issue.
Reading time: 10 min

The revision of the code is the use case where Claude Opus 5.5 gives the most surprising result, and not for the maximum level of effort: Anthropic reports that a first user has seen Opus 5.5 at the lowest effort level find more bugs than Opus 5 at the top level, with fewer false alarms. If it is also true about your code — and it occurs in one afternoon — the pre-merge revision becomes a pass at almost no cost.
The method lies all in one prompt, that of the official guide, and one rule: each report must tell how to make the code fail. Verified data on 23 September 2026.
In summary
- Ask only blocking problems, not all observations.
- For each: file and line, why it is wrong, how to prove it fails.
- Start from low effort level: for review it may be enough, and it costs less.
- A Report without demonstration It's an opinion.
- It replaces the first past, not human review.
- The pull request descriptions are more readable: the model explains in plain language.
The official prompt, line by line
Translated from Anthropic's guide:
"Review the diff of this branch over main. Only list the problems you would block the merge for. For each one, give me the file and line, why it's wrong, and how to prove it fails."
| Phrase | What He Gets |
|---|---|
| "the diff of this branch compared to main" | Precise perimeter: not the whole repository, only changes |
| "only the problems you'd block the merge for" | Short list. No style, no preferences |
| "file and line" | Each entry can be reached in one click |
| "because it's wrong" | Distinguish a bug from a different habit |
| "how to prove it fails" | Verification: a test, an input, a sequence of steps |
The last line is the one that separates this revision from a generic comment. If the model fails to tell how the problem reproduces, reporting is not a bug: it's an opinion, and treat her as such.
Why Low Effort Level Can Be Enough
Opus 5.5 has five levels of reasoning, from low to max, and the default is medium. The instinct says: to find bugs you need the maximum. The data reported by Anthropic says the opposite for the revision: at the lowest level found more bugs than Opus 5 at the high level, with fewer false positives.
The plausible explanation is that reviewing a diff is a task of attention, not deep reasoning: reading well every line counts more than thinking long. The high level serves when the bug is in the interaction between distant parts of the system, not in the wrong line.
The economic consequence is that the pre-merge review becomes almost free: low level, short prompt, limited diff. How they set up and what they cost the levels is in the reasoning levels of Opus 5.5.
The four-step method
- First passed to low level with the official prompt. Get a short list of reports, each with its own demonstration.
- Test the demonstrations: in Claude Code the model can run the test it proposes; in the app you run it. What does not fail as described is discarded.
- Second pass at high level only if needed: when the diff touches distributed logic, competition, or distant parts between them.
- Human review of what remains: architecture, readability, product choices. Things that a test does not measure.
What to ask and what not to ask
Ask
- Blocker issues, with file, line, and demonstration
- Unmanaged conditions: empty inputs, null values, network errors
- Regressions from existing tests
- Differences between what the code does and what the pull request says to do
Don't ask
- "What do you think of this code"
- Style hints mixed with bugs
- To rewrite everything "in a better way"
- To show the internal reasoning: it is signaled by filters
A separate case is the description of the pull request: Opus 5.5 explains its changes in plain language, and Anthropic points it out as one of the differences from Opus 5. Ask it to write it down: "Describe what changes this diff and why, so that those who haven't seen the code can decide whether to approve."
Turning reports into tests
The value of a revision is not in the list: it is in what you do with it. Each verified report already contains the raw material of a test, because the prompt asked "how to prove that it fails": that input, that sequence, that limit case.
- Take the demonstration proposed by the model — the amount with three decimal places, the empty field, the request repeated twice.
- Ask for the test: "Write a test that reproduces this problem and that today fails." In Claude Code the model performs it and confirms that it fails.
- Correct, and ask to rerun: the test must pass, and the rest of the suite also.
- Leave the test in the repository. That's how the bug doesn't come back, and that's how the suite grows on real cases instead of imagined ones.
In a month this cycle produces a suite that covers exactly the errors your code tends to make, not the ones in the manuals. For setting up work in Claude Code — stop rules, file checklists, subs — see Opus 5.5 in Claude Code; to understand why the low level can suffice and what it costs to raise it, the levels of reasoning.
Verification of reports remains necessary in specialised services as well. Anthropic OSS Scanner for open source maintainers produces results to be confirmed: availability is selective and a raw report is not yet a proven vulnerability.
Non-your own code revision
A frequent case in SMEs: the provider delivers a form, or a freelancer leaves a project, and no one in the company is able to judge it. The review prompt also works here, with a change: instead of the diff over main, the perimeter is the whole module, and the request is added "also report anything that depends on external services, credentials or configurations that I don't see".
The result is not a judgment on the quality of the supplier. It's a list of concrete things to ask before acceptance: that value written in the code, that call without error management, that test that's missing. Those who do not program can take it to a meeting, as explained in Claude for the code.
Practical examples
Software house, 8 developers, Bologna. Pull request of 600 lines on a billing form. First passed to low level: four reports, three with reproducible test, one without (discarded). One of the three was a wrong rounding of the totals with VAT: the test proposed by the model was an amount with three decimal places. Total time: twelve minutes, including ten to run tests.
Single developer, tailor-made e-commerce, Rimini. Use the prompt in the app by pasting the diff before each deployment, because it doesn't work in Claude Code. The model cannot perform the tests, but the "how to prove it fails" request still produces the exact input to try. He stopped asking for "find errors" —which returned twenty style observations —and only asks for blockers.
Checks before and after a change
If the rule must prevent a writing, the guide to PreToolUse and protected files explains the check before the tool. For feedback on a change that has already happened, PostToolUse with formatter and test deals with order and execution. Before conclusion, one Stop hook with conditions and limits can collect a proof: none of these steps replace the diff review.
Mistakes to Avoid
- Asking for all comments. The two real bugs disappear among the twenty preferences.
- Accepting reports without demonstration. Without a way to make it fail, it's not a bug.
- Starting at the maximum level. It costs more and, for review, you don't have to find more.
- Revisiting the entire repository instead of diff. Wide perimeter, weak reports.
- Skipping Human Review because "AI has already looked." He looked at mechanical bugs, not choices.
- Asking for internal reasoning to "understand how he found the bug". It is reported and the request switches to an earlier model.
How to apply it in the company
For a team, review with Opus 5.5 works if it becomes a fixed pass, not an initiative of the individual:
- The official prompt in a shared file of the repository, so everyone uses the same.
- First mandatory pass before opening the pull request, at the low level.
- Demonstrations become tests: each bug found adds a case to the suite, so it doesn't come back.
- Human review reads short list, not the whole diff. The reviewer's time goes on the choices.
For the overall picture of the work in Claude Code — long runs, stop rules, subagent — see Opus 5.5 in Claude Code. For comparison with other instruments, Claude for the code.
Conclusion
The revision of the code with Opus 5.5 applies for a precise reason: It costs almost nothing and produces verifiable reports. The prompt is three lines, the effort level can stay low, and the "tell me how to make it fail" rule turns every entry into something you control in a minute. The human auditor remains, but reads a list of four things instead of six hundred lines.
If you want to go from testing with ChatGPT to an AI system integrated into business processes, Giallo Studio custom designed agents and automations.
Giallo Studio guides: methodology and sources
How we apply it in the company
Related resources
Claude Opus 5.5 in Claude Code: long runs, stop rules and subagents
The levels of reasoning of Claude Opus 5.5: what they are and when to raise them
Claude AI for code and development
ChatGPT for coding
Claude Opus 5.5: what it is, what it changes and who it suits
Claude Code hook not running: a debugging guide
Hooks and MCP: filters and handlers in Claude Code
Claude Code Notifications: local hooks and permissionsFAQ
What is the prompt for code review with Opus 5.5?
That of the official guide: review the diff of this branch with respect to main; list only the problems for which you would block the merge; for each, give the file and line, why it is wrong, and how to prove that it fails. The decisive part is the last: every report must be verifiable.
Do you need the maximum effort level for code review?
No. Anthropic reports that a first user saw Opus 5.5 at the lowest effort level finding more bugs than Opus 5 at the high level, with fewer false alarms. For review it is better to start from the low level and raise only if the results require it.
Why ask only the problems that block the merge?
Because a review that lists everything — style, preferences, suggestions — hides the two real errors among twenty observations. Limiting it to issues that block the merge keeps the list short and makes every item significant.
How do you verify an issue reported by the model?
With the demonstration that the prompt requires: how to make the code fail. If the model cannot tell how to reproduce the problem, the report is an opinion and should be treated as such.
Does AI code review replace human review?
No. It replaces the first pass: the one that finds mechanical bugs, unmanaged conditions, obvious logic errors. Human review remains for architecture, product choices and readability.
Does this also apply to those who don't use Claude Code?
Yes. The same prompt works in the app by pasting the diff, with the only difference that the model can't run the tests on its own. In Claude Code it can do that, and it's the strongest demonstration.