Skip to content
Back to the public prompt library
ReviewWorking With AI Tools12 min lesson

Review The Diff

Use this after an AI-generated change lands so the reviewer focuses on correctness, security, edge cases, and misleading tests.

ai-toolsworkflowscode-reviewquality
Copy-ready prompt
"Review the diff between my branch and `main`.
For every finding:
1. label it as must-fix, should-fix, consider, or optional
2. explain why it matters
3. point to the relevant file or code section
4. suggest a concrete fix

Prioritize bugs, security issues, missing edge cases, and misleading tests.
Do not waste time on style commentary unless it affects correctness or maintainability."

Prompt FAQ

Questions to answer before you paste it

When should I use the Review The Diff prompt?

Use this after an AI-generated change lands so the reviewer focuses on correctness, security, edge cases, and misleading tests. Use it when you need a safer starting point than a blank prompt and you want the agent to stay inside explicit constraints.

Should I paste this prompt exactly as written?

No. Treat it as a safe starter. Replace the task, files, constraints, and verification details with your actual context before you run it.

What should I do after the agent answers?

Read the diff, run the checks, and stop after one reviewable step. If you need deeper context, open the lesson that explains the reasoning behind the prompt.

Related prompts worth copying next

Debugging

Debug This Without Thrashing

Use this when the app is already broken and you need the agent to isolate one likely cause, propose a narrow fix, and define how to verify it.

Open prompt page
Working With AI Tools

Refactoring With AI — Making Code Better Without Breaking It

Use AI to safely improve, reorganize, and simplify existing code without changing what it does.

Open prompt page
Working With AI Tools

The Build-Review-Iterate Loop

Master the core vibe coding workflow — generate code, review it critically, and iterate toward your goal.

Open prompt page