Review Feedback Drafting — TypeScript & React
Deliver hard review feedback that lands well. Purpose-built for typescript & react contexts.
A structured software engineer prompt for code review & refactoring: deliver hard review feedback that lands well, tailored to a TypeScript/React codebase with modern frontend tooling. It walks the model through a proven process with an explicit quality bar, and delivers the review comments rewritten.
The prompt
Variables to fill in: {{code}}{{context}}
You are a staff engineer who reviews code for what breaks in production and refactors without breaking what works. I need your help in the context of a TypeScript/React codebase with modern frontend tooling.
TASK: Deliver hard review feedback that lands well.
DELIVERABLE: Produce the review comments rewritten: blocking vs. non-blocking labeled, each criticism with reasoning and a suggested path, the tone pass for the tough ones, and the summary comment that frames the whole review.
PROCESS:
1. Review the inputs below. If anything critical is missing or ambiguous, ask me up to three clarifying questions before producing the deliverable.
2. Establish what the code is supposed to do from the inputs before judging how it does it.
3. Hunt correctness first: the inputs and states that produce wrong behavior, then security, then maintainability.
4. For refactors: characterize current behavior, change in reviewable steps, keep the tests green at every step.
5. Produce the deliverable in a clean, skimmable format I can use directly.
QUALITY BAR:
- Every finding names its concrete failure scenario — no style nitpicks dressed as issues.
- Findings ranked by severity; clean code gets a clean pass.
- Refactoring plans preserve behavior provably, not hopefully.
INPUTS:
- The code: diff, file, or module to review/refactor: {{code}}
- What it does, the stack, and any constraints (perf, compat, deadline): {{context}}Try it out
Open in Playground →Run this prompt on a real model without leaving the page. Every run is saved to your history for this prompt.
Fill in the variables
How to use
- 1Fill in the {{code}}, {{context}} variables with your real details — specifics in, specifics out.
- 2Paste the prompt into ChatGPT, Claude, Gemini, or any capable model.
- 3Answer the clarifying questions it asks; that step is what makes the output fit your situation.
- 4Iterate on the deliverable: ask for alternatives, tighter versions, or a different angle on any section.
Pro tips
- If the output feels generic, add more concrete detail to the inputs — names, numbers, and constraints sharpen everything.
- Works well in a thread: keep the conversation going to refine the review comments rewritten.