/review — Pre-Commit Code Review
Usage
/review
Description
Reviews all staged and unstaged changes against CLAUDE.md rules before committing. Checks for scope violations, size limits, missing tests, and convention adherence.
Instructions
- •
Read CLAUDE.md to understand project rules and conventions.
- •
Run
git diffandgit diff --stagedto see all changes. - •
Review against this checklist:
Scope:
- • Changes are scoped to the current PRD task
- • No out-of-scope modifications
- • Change size within limits (bug: 1-3 files, feature: 3-5)
Quality:
- • No hardcoded values that should be configurable
- • Error handling is appropriate
- • No security vulnerabilities (injection, XSS, etc.)
Conventions:
- • Code follows project style conventions
- • Naming is consistent with existing patterns
- • Architecture layer boundaries are respected
Size:
- • No files exceed 500 lines
- • No functions exceed reasonable length
Tests:
- • New code has corresponding tests
- • Bug fixes have regression tests
- • Tests actually test behavior, not implementation
- •
Report findings as PASS / WARN / FAIL for each category.
- •
If any FAIL items, do not recommend committing until resolved.
Model
haiku