PromptSharp › Prompt Library › Dev & Engineering › Pre-review sweep: your own PR through a security-and-edge-case lens
Pre-review sweep: your own PR through a security-and-edge-case lens
The PR is 'done'. Run the pre-review sweep so human reviewers spend their attention on design — not on nits and the missed null check.
The prompt — copy and run it
You are a staff engineer reviewing a pull request. I will paste the diff and its context. Produce: A) REVIEW TABLE — columns: file/line reference, severity (blocker / major / nit), category (correctness, security, performance, readability, tests), the issue in one sentence, and a suggested fix as a concrete code change. B) EDGE-CASE LIST — inputs and states the diff does not handle: empty, null, concurrent access, oversized input, malformed input, permission-denied. C) VERDICT — approve or request-changes, plus the 2 highest-risk lines in the diff and why. Inputs: [PASTE DIFF] · [WHAT THE CHANGE DOES + WHY] · [LANGUAGE/FRAMEWORK + TEAM CONVENTIONS] Rules: Do not invent code that is not in the diff — reference only pasted lines. Any claim about behavior you cannot see (callers, config, upstream state) must be marked "verify in repo". Never echo secrets or keys, and do not include proprietary code beyond what I pasted.
Why this prompt works
LLM review works best as a filter before human review — the machine catches the mechanical 80% so humans argue about design. Severity plus category forces triage instead of a wall of nits, and the 'verify in repo' rule prevents confident-but-wrong claims about code the model cannot see.
Want the daily version?
The PromptSharp Dev Brief delivers prompts like this every day. Honest status: sample stage — 50 waitlist signups start the free daily, and waitlist members see every issue first.
Frequently asked
When should I use this prompt?
The PR is 'done'. Run the pre-review sweep so human reviewers spend their attention on design — not on nits and the missed null check.
Why does this prompt work?
LLM review works best as a filter before human review — the machine catches the mechanical 80% so humans argue about design. Severity plus category forces triage instead of a wall of nits, and the 'verify in repo' rule prevents confident-but-wrong claims about code the model cannot see.
What mistake does this prompt help you avoid?
{'code': 'PF02', 'note': 'Confident-but-wrong review claims about code the model cannot see — the verify-in-repo rule, plus severity/category triage instead of a wall of nits.'}
Related Dev & Engineering prompts
Security-first PR review: a diff read that hunts the bug class, not the typo
You're reviewing a big PR and low on time. Get a structured read that prioritizes correctness and security over style nits.…
Root-cause interrogation: a hypothesis ladder from a bug report
Prod bug, vague repro, clock ticking. Structure the investigation before you start changing code at random.…
All Dev & Engineering free prompts
The PromptSharp Dev Brief page — five full free prompts plus the ladder status.
PromptSharp Daily — free
The cross-vertical sampler: one sharp, copy-paste prompt each day, rotating across the roster. See what each vertical is like before you commit to one.
Double-opt-in. Unsubscribe anytime. No spam, ever.
Home · Prompt Library · Pricing · Archive · Privacy · Terms · Refunds
Finance · CPG · Marketing · Sales · Consulting & Strategy · Product Management · Dev & Engineering · C-suite · Law · Personal Finance · Career & Job Search · Focus & Productivity · Learning · Health & Fitness · Parenting