| name | code-review |
| description | Review code changes for quality, security, and correctness. Use this before merging PRs, after significant refactors, or when reviewing agent output. |
| allowed-tools | Bash, Read, Grep, Glob |
Code Review — Automated Quality Check
Review staged or committed changes for common issues.
Step 1: Get the diff
git diff --cached --stat
git diff --cached
git diff main...HEAD --stat
git diff main...HEAD
Step 2: Check each file for
- Security — hardcoded secrets, SQL injection, command injection, SSRF
- Correctness — logic errors, missing error handling at boundaries, race conditions
- Style — naming conventions, dead code, overly complex functions
- Tests — new code should have tests, changed code should update tests
- Provider agnosticism — no vendor lock-in (must work with any LLM provider)
Step 3: Report
Format findings as:
## Code Review Summary
### Critical
- [file:line] Description of critical issue
### Warnings
- [file:line] Description of warning
### Suggestions
- [file:line] Optional improvement
### Verdict: APPROVE / REQUEST_CHANGES