Verified against Claude Code · 2026-07-29
Turn Claude Code into a consistent code reviewer instead of a vibes check
A fixed six-category code review rubric with a forced pass, concern, or blocking rating per category and a single final verdict, so every pull request gets the same systematic pass instead of whatever the model happens to notice first.
The prompt
Ready to copy — highlighted parts are example details you can swap.
You are reviewing this change as the senior engineer whose name goes on the approval, not as a friendly first reader. Cite exact file names and line numbers for every claim. Do not soften an actual defect into 'just a suggestion' if it should actually block the merge — say plainly whether it blocks. CHANGE UNDER REVIEW Adds a bulk CSV export endpoint at /api/reports/export that streams up to 50,000 rows. WHAT THIS CHANGE CLAIMS TO DO The PR description says this should let an admin export a full report without timing out, using a streaming response instead of building the whole CSV in memory. TEAM CONVENTIONS THIS DIFF SHOULD MATCH This codebase always wraps a streamed response in the existing withStreamingResponse helper in lib/http/streaming.ts rather than writing to the response object directly. KNOWN RISK AREAS FROM PAST INCIDENTS The team has been burned before by an export endpoint holding a database connection open for the full stream duration. REVIEW CATEGORIES 1. Correctness — does the logic do what the stated intent above claims? Any off-by-one, race condition, null or undefined path, or edge case the tests do not cover? 2. Security — injection risk, authorization gaps, secrets in code, unsafe deserialization, or unvalidated input crossing a trust boundary. 3. Tests — do the tests exercise the actual changed behavior, or just re-assert what the implementation already does? Name any case the diff clearly needed but did not add. 4. Readability and naming — would an engineer with no memory of writing this understand it in six months without asking the author? 5. Scope — does this diff do only what the stated intent says, or is there an unrelated change bundled in that was never mentioned? 6. Performance — any new N+1 query, unbounded loop, or blocking call introduced on a path that runs on every export click, currently a few dozen times per day, expected to grow with a new admin dashboard launch? OUTPUT FORMAT For each category: PASS, CONCERN, or BLOCKING, one line of reasoning, and a file and line reference for anything not PASS. End with one verdict — APPROVE, APPROVE WITH COMMENTS, or REQUEST CHANGES — and a one-sentence justification. No verdict is valid without one. CONSTRAINTS - A CONCERN that you would personally block on if this were your own team is a BLOCKING, not a CONCERN softened to avoid conflict. Rate honestly, not diplomatically. - If two categories point to the same root cause, such as a missing test also being a correctness risk, note the link rather than repeating the same explanation twice as if they were independent findings. - Do not raise a finding purely about style if it matches an existing, unremarked-on pattern already common elsewhere in this codebase — flag genuine inconsistency, not personal preference. - Read This codebase always wraps a streamed response in the existing withStreamingResponse helper in lib/http/streaming.ts rather than writing to the response object directly. before judging readability or scope, since a pattern that looks like an inconsistency to a reviewer unfamiliar with this codebase may in fact be the established local convention, and the reverse is just as costly: waving through a genuine departure from convention because it superficially resembles something seen elsewhere. Paste the diff or files under review below this line, unedited.
Customize
Optional — swap in your own details for the highlighted parts above.
Why this works
A generic 'review this pull request' prompt reliably produces a different-shaped answer every time — sometimes a paragraph on style with nothing on correctness — because the model has no fixed frame to fill in. Giving it six named, closed categories forces systematic coverage of the same ground every time, the same mechanic behind Claude Code's own structured review commands scanning by category rather than freeform impression. Requiring a PASS, CONCERN, or BLOCKING rating per category, not prose, also prevents the single most common failure mode of AI code review: a vague 'looks good overall' that never actually commits to a position on any specific line. The instruction to rate honestly rather than diplomatically targets a real, documented tendency in helpfulness-tuned models to soften a negative finding into gentler language than its actual severity warrants, precisely because agreeable phrasing reads as more pleasant in the moment — naming that bias explicitly and instructing directly against it is what actually changes the output, since the model otherwise has no signal that honesty and diplomacy are in tension here at all. Requiring a linked note when two categories share one root cause, rather than letting the same defect count as two separate findings, matters for reviewer trust across many reviews specifically: a review that inflates its own finding count by restating one bug under two headings looks more thorough than it is, and a team that later notices the padding will discount every future review from the same rubric, including the genuinely independent findings inside it. Requiring the review to be checked against the team's own stated conventions before a readability or scope finding is raised also matters because Claude Code, unlike a reviewer new to the team, has no independent memory of which patterns are the house style and which are genuine drift — without that check explicitly injected, it will just as often flag an established convention as inconsistent as it will miss a real one, and either mistake erodes trust in the rubric the same way a fabricated severity would.
What you get back
1. Correctness: PASS. 2. Security: PASS. 3. Tests: CONCERN — no test covers a zero-row export; add one before merge, file lib/reports/export.ts. 4. Readability and naming: PASS. 5. Scope: BLOCKING — this diff also reformats an unrelated file with no stated reason; split it out or explain it, file lib/utils/format.ts. 6. Performance: PASS — streaming avoids the N+1 the prior implementation had. Verdict: REQUEST CHANGES — the missing zero-row test and the unexplained unrelated file change should be resolved before this merges.
Verified against
Claude Code Sonnet 4.6 · 2026-07-29
GitHub Copilot Copilot Chat 1.252 (VS Code) · 2026-07-29
Changelog
- 2026-07-29 — Initial publish, verified against Claude Code (Sonnet 4.6) and GitHub Copilot Chat.
Building this for real?
This is a free starting point. If you'd rather have custom software built and running for your business, that's Scult's day job.
EXPLORE CUSTOM SOFTWARE
