| name | code-reviewer |
| description | Standardized code review checklist for AI-generated code. Supports both local diff and PR review workflows. |
| metadata | {"version":"0.1.2"} |
Code Reviewer — Quality Gate
Review code against a standardized checklist. Works in two modes: local diff review and PR review.
Review Checklist
- Type Safety — No
any types, proper generics, strict null checks
- Error Handling — All async ops have try/catch, meaningful error messages
- Resource Cleanup — Streams closed, listeners removed, timers cleared
- API Consistency — Naming conventions, parameter ordering, return types
- Tests — Coverage for happy path + edge cases + error cases
- Build —
pnpm test passes, tsc --noEmit clean
- Security — No hardcoded secrets, proper input validation
- Idempotency — Operations safe to retry (especially for event handlers, webhooks)
Mode A: Local Diff Review
For reviewing code before pushing:
git diff main..HEAD --stat to see changed files
- Review each changed file against checklist
- Run
pnpm test to verify
- Report findings with severity
Mode B: PR Review (Cron Patrol)
For review-engineer cron patrol or manual PR review:
gh pr list --repo OWNER/REPO --state open to find PRs
gh pr checks <number> — CI must pass before code review
- CI pending → skip, wait for next patrol
- CI failed → reject with CI failure details
gh pr diff <number> — review changed code against checklist
- Verdict:
- PASS →
gh pr merge <number> --squash
- NEEDS_FIX →
gh pr review <number> --request-changes -b "details"
- UNCERTAIN → escalate to dev-mgr (via sessions_send if in multi-agent setup)
Output Format
## Review: #N — Title
### Critical
- file.ts:42 — description
### Warning
- file.ts:15 — description
### Info
- file.ts:8 — suggestion
### Verdict: PASS / NEEDS_FIX / ESCALATE
Severity Guide
- Critical = must fix before merge (type errors, missing error handling, security issues)
- Warning = should fix, can defer (style inconsistency, missing edge case test)
- Info = suggestion (optimization, naming improvement)
- ESCALATE = reviewer is unsure about a design decision or trade-off
Integration Notes
- The review-engineer cron patrol embeds the PR workflow inline — this skill provides the detailed checklist reference
- When reviewing AI-generated code, pay extra attention to: test coverage gaps, over-abstraction, hardcoded paths
- Review cadence: every 3-4 development issues, consider a batch cross-file review for architectural consistency