| name | code-review |
| description | >- Use when this capability is needed. |
Code Review
Review code for quality and compliance. Report findings.
Announce: "I'm using code-review to review these changes before commit."
This Skill vs @code-reviewer Agent
| Situation | Use |
|---|
| Small change (< 100 lines) | This skill |
| Single domain (DB only or frontend only) | This skill |
| Quick sanity check before commit | This skill |
| Large change (> 300 lines) | Dispatch @code-reviewer |
| Cross-domain (DB + frontend) | Dispatch @code-reviewer |
| Security audit needed | Dispatch @code-reviewer |
| Need fresh eyes (you wrote the code) | Dispatch @code-reviewer |
To dispatch: Load subagent-workflow skill first.
Iron Law
REPORT FINDINGS - DO NOT FIX
Your job is to identify issues. The main agent decides what to fix.
Review Checklist
1. Architecture Compliance
Database-First (from architecture rule):
Source-Based Workflow:
Security:
2. Spec Alignment
Run openspec list --specs and check:
If change has associated proposal:
3. Code Quality
TypeScript:
SQL:
Tests:
4. Scope Compliance
Compare what was requested vs what was changed:
Verification Commands
Run these and report results:
bun run type-check
bun run lint
bun run test:db
bun run test:e2e
bun run test:security
bun run test:unit
Output Format
## Code Review: [scope/description]
### Verdict: PASS | NEEDS CHANGES | BLOCKED
### Critical Issues (blocks merge)
- [ ] [Issue]: [Description] - [file:line]
### Major Issues (should fix)
- [ ] [Issue]: [Description] - [file:line]
### Minor Issues (nice to have)
- [ ] [Issue]: [Description] - [file:line]
### Observations
- [Non-blocking observations]
### Verification Results
- Type check: PASS/FAIL
- Lint: PASS/FAIL
- Unit tests: PASS/FAIL
- DB tests: PASS/FAIL
### Spec Compliance
- [Spec checked]: Aligns / Conflicts
- Scope: Within bounds / Out of scope items: [list]
Severity Definitions
| Severity | Definition | Action |
|---|
| Critical | Breaks functionality, security issue, data loss risk | Must fix before merge |
| Major | Significant issue but not breaking | Should fix, discuss if controversial |
| Minor | Style, optimization, nice-to-have | Optional, note for future |
What Happens Next
After review, the main agent will:
- PASS → Proceed to commit/merge
- NEEDS CHANGES → Recall implementing agent with session_id to fix issues
- BLOCKED → Escalate for architectural discussion
Red Flags - Note These
If you observe:
- Business logic in frontend
- Direct database queries (not RPC)
- Missing tests for new code
- Scope creep beyond task list
- Security patterns violated
Report them. Don't fix them.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.