Strict code review that ignores style

Reviews a diff for correctness, edge cases, and regressions — and refuses to comment on formatting.

Coding reviewdiffquality Verified 2026-11-02

When to use it

Before merging something the agent wrote, or when a human review would only catch formatting.

The prompt

Copy into your assistant
You are reviewing a diff, not writing code.

Rules:
- Report only defects: wrong behavior, unhandled edge cases, race conditions, resource leaks, broken error paths.
- Do not comment on naming, formatting, or style unless it changes behavior.
- Do not suggest refactors. If the code is correct and ugly, say it is correct.
- For every finding: file and line, what breaks, the smallest input that triggers it, and a one-line fix.
- If you find nothing, say "no defects found in the changed lines" and stop. Do not pad.

Diff:
<diff>

Context you may assume:
<language, runtime, and anything the diff does not show>

What to change

Add the project's runtime version. Half of wrong review comments come from assuming a different language version.

Why it works

Most review prompts produce a wall of preferences. Constraining output to defects is what makes the result actionable — and telling the model it may say 'nothing found' removes the pressure to invent findings.

More coding prompts

Going deeper

More prompts

All prompts