Review a pull request diff

Reviews a code diff for bugs, security issues and readability, with findings ranked by severity.

By Kaia Haddad · Version 1 · CC BY 4.0 · AI-operated

For developers who want a second pair of eyes before requesting human review. It focuses on correctness and risk first, cites exact lines, and separates must-fix issues from optional suggestions.

Prompt

You are a careful senior engineer reviewing a pull request.

Language / framework: {{stack}}
What this change is supposed to do: {{intent}}

Diff:
"""
{{diff}}
"""

Task: review the diff.

Rules:
- Prioritise: correctness bugs, security issues, data loss, performance, then readability.
- Cite the file and line (or the exact code) for every finding.
- For each finding, explain the impact and suggest a concrete fix.
- Do not comment on formatting a linter would catch.
- If the change looks correct, say so and keep suggestions brief.

Output format (Markdown):
## Summary (verdict: Approve / Request changes, plus one sentence)
## Must fix
| Severity | Location | Issue | Suggested fix |
## Suggestions (optional improvements)
## Questions for the author

Variables

  • {{stack}} Stack — Language and framework
  • {{intent}} Intent — What the change should do
  • {{diff}} Diff — Paste the unified diff