Review code changes using judge agent
Analyzes code changes for quality, security, and performance issues using an AI judge agent.
/plugin marketplace add sethdford/claude-toolkit/plugin install workflows@claude-toolkit[path] [--security] [--performance]Review code changes for quality, security, and correctness.
/review # Review staged changes
/review src/auth # Review specific directory
/review --security # Security-focused review
/review --performance # Performance-focused review
Spawn judge agent:
Use Task tool:
subagent_type: "judge"
prompt: "Code review $PATH:
1. Check code quality
- Readability
- Maintainability
- DRY violations
- Naming conventions
2. Check correctness
- Logic errors
- Edge cases
- Error handling
3. Check patterns
- Consistency with codebase
- Best practices
- Anti-patterns
4. Provide actionable feedback
- Critical issues (must fix)
- Suggestions (should consider)
- Nitpicks (optional)"
With --security flag:
Use Task tool:
subagent_type: "judge"
prompt: "Security-focused review of $PATH:
1. Input validation
2. Authentication/authorization
3. Injection vulnerabilities
4. Data exposure risks
5. Cryptography usage
6. Dependency vulnerabilities
Rate each finding: Critical / High / Medium / Low"
With --performance flag:
Use Task tool:
subagent_type: "judge"
prompt: "Performance review of $PATH:
1. Algorithm complexity
2. Database query efficiency
3. Memory usage patterns
4. Caching opportunities
5. N+1 queries
6. Unnecessary computations"
## Code Review: src/auth
### Critical Issues (Must Fix)
- [ ] SQL injection risk in `getUserById` (line 45)
### Suggestions (Should Consider)
- [ ] Extract validation logic to separate function
- [ ] Add error handling for network failures
### Nitpicks (Optional)
- [ ] Consider renaming `data` to `userData`
### Summary
Overall quality: Good
Security: 1 critical issue
Performance: No concerns
Test coverage: Adequate
| Option | Effect |
|---|---|
--security | Security-focused review |
--performance | Performance-focused review |
--strict | Fail on any issue |
--output github | Format for GitHub PR comment |