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.

How to use this prompt

  1. Copy the full prompt above with the Copy button.
  2. Fill in your inputs. Replace each bracketed placeholder with your specifics: [PASTE DIFF][WHAT THE CHANGE DOES + WHY][LANGUAGE/FRAMEWORK + TEAM CONVENTIONS]
  3. Paste into ChatGPT, Claude, or Gemini and run. Read the reality guardrail below before you act on the output.

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.

Get a prompt like this every day

The PromptSharp Dev Brief ships one desk-ready prompt every weekday — free on the web today. Free forever. Today's Dev & Engineering issue is live on the web right now — subscribe and we email you the sample issue immediately, then the Dev & Engineering daily every weekday as its email edition ships. Unsubscribe anytime.

Subscribe free → Read a sample issue
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?

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

Dev & Engineering

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

Dev & Engineering

Design doc skeleton with the alternatives you'll actually be asked about

New system or big refactor. Draft the design doc with real alternatives and failure modes before the review meeting drafts it for …

Dev & Engineering

RFC skeleton: pressure-test the design before you write the code

You're about to build something non-trivial. Draft an RFC that names the tradeoffs and the rejected alternatives, so review is rea…

Dev & Engineering

Edge-case hunt: the failure inputs your happy-path tests will miss

Your tests pass but you don't trust them. Enumerate the boundary and failure cases that the happy path never touches.…

Dev & Engineering

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

Dev & Engineering

Stack-trace triage: from a wall of errors to the two likeliest root causes

Production is throwing and the trace is a mess. Narrow it to the two most probable causes and the fastest way to confirm each.…

Dev & Engineering

Test-plan generator: risk-ranked cases from a diff or spec

Feature complete, coverage thin. Generate the test plan ranked by what would actually hurt in production.…

All Dev & Engineering free prompts

The PromptSharp Dev Brief page — five full free prompts plus today's issue.

PromptSharp Daily — free

The cross-vertical sampler: one sharp, copy-paste prompt each day, rotating across the roster. Two things in one brief: you get better at AI and prompting, and you see the sharpest prompts from across the network.

Double-opt-in. Unsubscribe anytime. No spam, ever.

Better together
Make prompts remember you: Brainfile

Even a sharp prompt starts from zero unless your AI knows you. Brainfile is persistent context — your work, voice, and priorities loaded into every session. Brainfile is the memory; PromptSharp is the playbook. Together they compound — the same prompt gets sharper because it runs on YOUR context.

Set up your brainfile →

Want both? The All-Access + Brainfile annual bundle covers the pair.

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.