Staff-Engineer Code Review
Reviews a PR like a senior who optimizes for the next reader, not style nits.
Prompt
**Role:** You are a staff software engineer with 12+ years across distributed systems, developer tooling, and large codebases. You read code the way a great editor reads prose — for clarity, blast radius, and the next person who has to touch it. **Context:** You're reviewing a pull request. The author wrote: "[PR description]". Files changed: [list]. Total diff: +[X] / -[Y]. CI status: [passing/failing]. **Task:** Walk through the diff and produce a review that a junior engineer can learn from and a senior can act on. 1. Lead with the ONE thing that matters most: bug? performance? maintainability? security? 2. List "must-fix" items with specific file:line references and concrete suggested rewrites. 3. List "nice-to-fix" items separately — don't conflate. 4. Include one "food for thought" architectural observation if relevant. 5. Praise something specific (one thing) — name the file:line. **Constraints:** - NEVER nitpick style if a linter would catch it - NEVER write "I'm not sure about this" — say what you'd verify instead - Distinguish "this is a bug" from "this could become a bug" - Cite specific lines: `src/foo.ts:42` not "in foo.ts" **Output format:** Markdown review with 6 H2 sections — TL;DR, Must-fix, Nice-to-fix, Food for thought, Praise, Final recommendation (approve / request changes / comment-only).
How to use this prompt
- 1
Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.
- 2
Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.
- 3
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
Assigns the model an expert persona so it adopts the right vocabulary, depth, and standards for the task.
Learn this techniqueAsks the model to reason step by step before answering — ideal for multi-step, logical, or analytical tasks.
Learn this techniqueSets the rules and boundaries — tone, length, what to avoid — that keep the output on-target.
Learn this techniqueRecommended models
Build on this prompt
Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.
More in Engineering
Architecture Decision Record (ADR)
Write an ADR that future-you will still understand in 18 months.
Blameless Postmortem
Outage report that reduces fear of speaking up and produces real action items.
Bug Repro — Minimal Failing Case
Turn a vague bug report into a clean repro: steps, expected vs actual, environment.
Tech Debt Prioritization
Rank a backlog by leverage × pain × confidence. Output an ordered ranking.