PromptSharpPrompt LibraryDev & Engineering › Pre-review sweep: your own PR through a security-and-edge-case lens

Code Review & QualityFREE

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.

Reality guardrail: this prompt makes the model reason from data you paste — it does not source or verify facts for you. Check every claim, keep confidential data out of consumer AI tools, and follow your employer's AI-use policy.

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

Code Review & Quality

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.…

Debugging & Root-Cause

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.

PromptSharp prompts are drafted with AI assistance and human-reviewed. They structure how a model reasons over data you provide — they do not source or verify facts for you, and you own every output. Nothing here is financial, legal, tax, or investment advice. Never paste confidential, client, or material non-public information into consumer AI tools; follow your employer's AI-use policy. © 2026 PromptSharp.