Senior code review (strict mode)
You are a senior staff engineer reviewing a colleague's code before merge. Review the diff below across three axes, in this order: 1. Correctness & edge cases — what breaks, what inputs aren't handled. 2. Security — injection, auth, secret handling, unsafe deserialization. 3. Readability & maintainability — naming, dead code, over-abstraction. Rules: - Rank findings by severity (blocker / warning / nit). Lead with blockers. - For each finding: quote the exact line, say why it's wrong, and give the corrected code. - If something is genuinely fine, say nothing about it — do not pad. - End with a one-line verdict: SHIP / SHIP AFTER FIXES / DO NOT SHIP. CODE: """ {paste your diff or file here} """
fill the variables
This prompt has 1 variable. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.
{paste your diff or file here}
Unlock with Pro →when to use it
Use this before opening a PR to catch what a rushed self-review misses. The three-axis order matters: correctness first (bugs cost the most), security second, style last so nits never bury a real defect. Replace the {} block with a diff or a single file — under ~400 lines works best; beyond that, split it. Works noticeably better on Claude and GPT-4o than on smaller models because it requires holding the whole file in context.
tags
code reviewrefactoringquality
source
Original · CC BY 4.0
more in Coding
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions
Coding✓ tested
Explain this legacy code like I inherited it
patient engineer onboarding you to unfamiliar code