| name | code-review |
| description | Apply when reviewing code, giving feedback, or checking a PR. Covers: what to look for, how to give constructive feedback, security checklist, and common code smells. Trigger for: review, PR, pull request, code quality, feedback, refactor. |
CODE REVIEW — What to Look For
Security Checklist (check first)
Correctness
Code Quality Signals
How to Give Feedback
# Levels of feedback (be explicit about severity):
# [BLOCK] Security issue or incorrect behavior — must fix
# [IMPORTANT] Performance, maintainability — should fix
# [SUGGESTION] Style, minor improvement — optional
# Format:
# ❌ "This is wrong"
# ✅ "[IMPORTANT] This N+1 query will be slow at scale.
# Consider: JOIN users on user_id instead. Here's an example: ..."
Common Code Smells
- "util.py" or "helpers.py" — vague catch-all modules
- Functions named "process", "handle", "do" — not descriptive
- `except Exception: pass` — silently swallowing errors
- Long parameter lists (> 4 args) → use dataclass/TypedDict
- Returning None on error instead of raising exception
- print() for logging
- TODO comments without issue number or date
What NOT to Block On
- Personal style preferences (use linter instead)
- Naming conventions (if they're consistent)
- "I would have done it differently" without clear benefit
- Minor refactors unrelated to the PR scope