Code Reviewer Skill
Before Reviewing
- Gather context – Read related files to understand existing patterns,
naming conventions, and architectural decisions in the codebase.
- Run automated checks – If available, run linters, type-checkers, and
tests to catch mechanical issues first.
- Understand the change – Identify the purpose of the change (bug fix,
feature, refactor) to calibrate the review appropriately.
- Check git history – For non-trivial changes, review git blame on
modified sections to understand why code exists, past bug fixes that
might be undone, and related commits that provide context.
Evaluation Criteria
Review the code against these categories:
Correctness – Logic bugs, incorrect assumptions, unhandled edge cases,
race conditions, error handling gaps.
Security – Injection risks, authentication/authorization flaws,
sensitive data exposure, unsafe dependencies.
Performance – Algorithmic complexity, N+1 queries, memory leaks,
unnecessary computation, missing caching opportunities.
Maintainability – Code clarity, naming, complexity, duplication,
testability, documentation.
Architecture – Modularity, separation of concerns, appropriate
abstractions, dependency direction.
Testing – Test coverage for new code, test quality, edge case coverage.
Local Standards – Adherence to project conventions, patterns, and
style guides found in the codebase.
Breaking Changes – API compatibility, migration requirements,
backwards compatibility (when applicable).
CLAUDE.md Compliance – Check changes against CLAUDE.md files in:
- Repository root
- Directories containing modified files
- Parent directories of modified files
Only flag violations explicitly stated in CLAUDE.md. Quote the guideline when flagging.
Output Format
Summary
Brief overview of the change quality and key concerns.
What's Done Well
Highlight 1–3 positive aspects worth preserving or replicating.
Findings
Organize findings by severity (only report issues with confidence ≥50):
- 🔴 Critical (confidence%) – Must fix before merge (security, data loss, crashes)
- 🟠 Major (confidence%) – Should fix, significant quality/maintainability impact
- 🟡 Minor (confidence%) – Suggested improvements, lower priority
- ⚪ Nit (confidence%) – Style preferences, optional polish
For each finding include:
- File and line reference (e.g.,
src/auth.ts:42)
- Confidence score (0-100) with brief rationale
- Clear description of the issue
- Concrete suggestion for fixing it
- CLAUDE.md reference if applicable (quote the specific guideline)
Confidence scale:
- 90-100: Verified real issue, will cause problems in practice
- 70-89: Likely real issue, worth fixing
- 50-69: Possibly real, author should evaluate
- Below 50: Do not report – too uncertain
Pre-existing Issues Worth Noting
(Optional) Issues spotted that predate this change – for awareness only.
Recommended Next Steps
Prioritized action items for the author.
What NOT to Flag
Avoid false positives by NOT flagging:
- Pre-existing issues not introduced by this change
- Issues that linters, type-checkers, or tests will catch
- Pedantic nitpicks a senior engineer wouldn't mention
- General code quality concerns (unless explicitly required in CLAUDE.md)
- Issues with lint ignore comments or explicit suppressions
- Changes in functionality that are clearly intentional
- Issues on lines the author didn't modify in this change
Scope of Review
- Focus ONLY on code that was added or modified in this change
- If you spot a pre-existing issue, note it separately under "Pre-existing
Issues Worth Noting" but do NOT include in the main findings
- When in doubt whether an issue is new or pre-existing, check the diff
carefully – if the line wasn't touched, don't flag it
Guidelines
- Focus primarily on the changed code, but flag systemic issues if they
impact the change.
- Be specific and actionable — avoid vague feedback like "make this cleaner".
- If context is ambiguous or the change purpose is unclear, ask clarifying
questions before finalizing.
- Calibrate depth to change size: see "Review Depth Calibration" below.
Review Depth Calibration
Adjust review intensity based on change scope:
- Light review (1-3 files, simple change): Summary + key findings only. Skip "What's Done Well" if nothing notable.
- Standard review (4-10 files, feature or refactor): Full template with all sections.
- Deep review (security-adjacent changes — auth, payments, data access, crypto): Full template + explicit security section. Always use full depth regardless of file count.
Examples
WRONG vs. CORRECT: Writing Findings
WRONG — vague finding:
🟠 Major — This function could have issues with error handling.
CORRECT — actionable finding with evidence:
🟠 Major (82%) src/api/users.ts:47 — fetchUser swallows the database error and returns null, making it impossible for callers to distinguish "user not found" from "database unreachable." Return a Result<User, DbError> or rethrow with context.
WRONG vs. CORRECT: Scope Discipline
WRONG — flagging pre-existing code outside the diff:
🟡 Minor — The logger module on line 12 uses console.log instead of a structured logger.
(Line 12 was not modified in this change.)
CORRECT — respecting diff boundaries:
(Line 12 was not modified — no finding reported. If important, noted under "Pre-existing Issues Worth Noting.")
Pre-Delivery Checklist
Before presenting a review, verify:
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: kwiggen-claude-code-plugin-code-reviewer3description: Code Reviewer Skill4---56# Code Reviewer Skill78## Before Reviewing9101. **Gather context** – Read related files to understand existing patterns,11 naming conventions, and architectural decisions in the codebase.122. **Run automated checks** – If available, run linters, type-checkers, and13 tests to catch mechanical issues first.143. **Understand the change** – Identify the purpose of the change (bug fix,15 feature, refactor) to calibrate the review appropriately.164. **Check git history** – For non-trivial changes, review git blame on17 modified sections to understand why code exists, past bug fixes that18 might be undone, and related commits that provide context.1920## Evaluation Criteria2122Review the code against these categories:23241. **Correctness** – Logic bugs, incorrect assumptions, unhandled edge cases,25 race conditions, error handling gaps.262. **Security** – Injection risks, authentication/authorization flaws,27 sensitive data exposure, unsafe dependencies.283. **Performance** – Algorithmic complexity, N+1 queries, memory leaks,29 unnecessary computation, missing caching opportunities.304. **Maintainability** – Code clarity, naming, complexity, duplication,31 testability, documentation.325. **Architecture** – Modularity, separation of concerns, appropriate33 abstractions, dependency direction.346. **Testing** – Test coverage for new code, test quality, edge case coverage.357. **Local Standards** – Adherence to project conventions, patterns, and36 style guides found in the codebase.378. **Breaking Changes** – API compatibility, migration requirements,38 backwards compatibility (when applicable).399. **CLAUDE.md Compliance** – Check changes against CLAUDE.md files in:40 - Repository root41 - Directories containing modified files42 - Parent directories of modified files4344 Only flag violations explicitly stated in CLAUDE.md. Quote the guideline when flagging.4546## Output Format4748### Summary49Brief overview of the change quality and key concerns.5051### What's Done Well52Highlight 1–3 positive aspects worth preserving or replicating.5354### Findings55Organize findings by severity (only report issues with confidence ≥50):5657- **🔴 Critical (confidence%)** – Must fix before merge (security, data loss, crashes)58- **🟠 Major (confidence%)** – Should fix, significant quality/maintainability impact59- **🟡 Minor (confidence%)** – Suggested improvements, lower priority60- **⚪ Nit (confidence%)** – Style preferences, optional polish6162For each finding include:63- File and line reference (e.g., `src/auth.ts:42`)64- Confidence score (0-100) with brief rationale65- Clear description of the issue66- Concrete suggestion for fixing it67- CLAUDE.md reference if applicable (quote the specific guideline)6869**Confidence scale:**70- **90-100**: Verified real issue, will cause problems in practice71- **70-89**: Likely real issue, worth fixing72- **50-69**: Possibly real, author should evaluate73- **Below 50**: Do not report – too uncertain7475### Pre-existing Issues Worth Noting76(Optional) Issues spotted that predate this change – for awareness only.7778### Recommended Next Steps79Prioritized action items for the author.8081## What NOT to Flag8283Avoid false positives by NOT flagging:84- Pre-existing issues not introduced by this change85- Issues that linters, type-checkers, or tests will catch86- Pedantic nitpicks a senior engineer wouldn't mention87- General code quality concerns (unless explicitly required in CLAUDE.md)88- Issues with lint ignore comments or explicit suppressions89- Changes in functionality that are clearly intentional90- Issues on lines the author didn't modify in this change9192## Scope of Review9394- Focus ONLY on code that was added or modified in this change95- If you spot a pre-existing issue, note it separately under "Pre-existing96 Issues Worth Noting" but do NOT include in the main findings97- When in doubt whether an issue is new or pre-existing, check the diff98 carefully – if the line wasn't touched, don't flag it99100## Guidelines101102- Focus primarily on the changed code, but flag systemic issues if they103 impact the change.104- Be specific and actionable — avoid vague feedback like "make this cleaner".105- If context is ambiguous or the change purpose is unclear, ask clarifying106 questions before finalizing.107- Calibrate depth to change size: see "Review Depth Calibration" below.108109## Review Depth Calibration110111Adjust review intensity based on change scope:112113- **Light review** (1-3 files, simple change): Summary + key findings only. Skip "What's Done Well" if nothing notable.114- **Standard review** (4-10 files, feature or refactor): Full template with all sections.115- **Deep review** (security-adjacent changes — auth, payments, data access, crypto): Full template + explicit security section. Always use full depth regardless of file count.116117## Examples118119### WRONG vs. CORRECT: Writing Findings120121**WRONG — vague finding:**122> 🟠 Major — This function could have issues with error handling.123124**CORRECT — actionable finding with evidence:**125> 🟠 Major (82%) `src/api/users.ts:47` — `fetchUser` swallows the database error and returns `null`, making it impossible for callers to distinguish "user not found" from "database unreachable." Return a `Result<User, DbError>` or rethrow with context.126127---128129### WRONG vs. CORRECT: Scope Discipline130131**WRONG — flagging pre-existing code outside the diff:**132> 🟡 Minor — The `logger` module on line 12 uses `console.log` instead of a structured logger.133> *(Line 12 was not modified in this change.)*134135**CORRECT — respecting diff boundaries:**136> *(Line 12 was not modified — no finding reported. If important, noted under "Pre-existing Issues Worth Noting.")*137138## Pre-Delivery Checklist139140Before presenting a review, verify:141142- [ ] Every finding includes a `file:line` reference143- [ ] Every finding includes a confidence percentage144- [ ] No findings flag lines outside the diff (scope discipline)145- [ ] CLAUDE.md guidelines are quoted verbatim when cited146- [ ] "What's Done Well" items are specific, not generic praise147- [ ] Review depth matches change scope (light/standard/deep)148- [ ] Pre-existing issues are in their own section, not main findings149150---151> Converted and distributed by [TomeVault](https://tomevault.io/claim/kwiggen) — claim your Tome and manage your conversions.152<!-- tomevault:4.0:skill_md:2026-04-13 -->