♻️

Code Review Prompt

Get a thorough code review with actionable feedback

prompt template
Review this code as a senior engineer would:

```
[PASTE_CODE_FOR_REVIEW]
```

**Context:** [WHAT_THIS_CODE_DOES]
**PR goal:** [WHY_THIS_CHANGE_WAS_MADE]

Review for:
1. **Correctness** — bugs, edge cases, off-by-one errors, race conditions
2. **Security** — injection, XSS, auth bypass, sensitive data exposure
3. **Performance** — unnecessary work, N+1 queries, memory leaks
4. **Readability** — naming, structure, complexity, "WTF per minute" factor
5. **Maintainability** — coupling, testability, future change difficulty

For each issue:
- **Line reference** — which line(s)
- **Severity** — 🔴 Must fix / 🟡 Should fix / 🟢 Nit
- **What's wrong** — clear explanation
- **Suggested fix** — concrete code change

End with:
- Overall assessment (Approve / Request changes)
- 1-2 things done well (positive feedback matters)
- The single most important thing to fix if time is limited

How to Use This Prompt

  1. 1Copy the prompt template above
  2. 2Paste into Claude, ChatGPT, or Cursor
  3. 3Replace [bracketed placeholders] with your specific project details
  4. 4Iterate on the AI output to refine and customize the results