| name | code-reviewer |
| description | Language-agnostic code review. Checks correctness, security, and consistency with project conventions. Triggers on "review this", "review [file]", "check this code", "code review". |
| allowed-tools | Read, Glob, Grep, Bash |
Skill: code-reviewer
Trigger: "review this" · "review [file]" · "check this code" · "code review"
Steps
Step 0 — Load project context (before looking at any code)
Check for each of these files and read them if they exist:
memory/lessons.md
- Extract any lines flagged as mistakes, anti-patterns, or corrections
- Add each one as a custom checklist item under a
### Project Lessons section
- Example: "never use addRow on IDENTITY tables" → becomes a checklist item
memory/decisions.md
- Extract locked architectural decisions the code must follow
- Add violations of these as automatic failures regardless of the standard checklist
memory/complexity_profile.md (written by map-codebase)
- Read the detected stack — use it to enable the right checklist sections:
- SQL / ORM detected → enable Data Layer section
- Auth middleware detected → enable API / Endpoints section
- Frontend JS detected → enable JS Patterns section
- Python detected → enable Python Patterns section
- Java detected → enable Java Patterns section
If none of these files exist yet: skip Step 0, run the standard checklist only, and note at the top: No project context loaded — running generic checklist. Run map-codebase and a session to sharpen this.
Step 1 — Read the file(s)
Read the file(s) being reviewed in full. If a file is too large, grep for the patterns most likely to fail first.
Step 2 — Run checklist
Run every applicable section. Report every issue with file + line number. Report clean sections explicitly — never skip them silently.
Standard Checklist
Security
Correctness
Data Layer (enabled if SQL/ORM detected)
API / Endpoints (enabled if auth/routing detected)
JS Patterns (enabled if frontend JS detected)
Java Patterns (enabled if Java detected)
Python Patterns (enabled if Python detected)
Production Survival (always on — AI-generated code fails here most)
Code Quality
Project Lessons (populated from lessons.md at runtime)
This section is built dynamically from your project's memory. Empty on first session.
Report Format
Context loaded: lessons.md (N patterns), decisions.md (N decisions), stack: [detected]
❌ [file]:[line] — [issue]
Fix: [specific fix]
✅ [section] — clean
End with: N issues found or Clean — no issues.
Notes
- Security and correctness first — style is secondary
- If no project context exists yet, say so at the top — don't silently skip it
- After finding a new pattern, suggest adding it to lessons.md via
/learn