From kw-plugin
Reviews code for logic flaws, edge cases, performance bottlenecks, security vulnerabilities, maintainability concerns, architecture best practices, and adherence to local patterns and CLAUDE.md guidelines. Use when users ask for code review or analysis, including reviewing uncommitted changes, the last local commit, unpushed code, or a specific GitHub pull request.
How this skill is triggered — by the user, by Claude, or both
Slash command
/kw-plugin:code-reviewerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
1. **Gather context** – Read related files to understand existing patterns,
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:
Only flag violations explicitly stated in CLAUDE.md. Quote the guideline when flagging.
Brief overview of the change quality and key concerns.
Highlight 1–3 positive aspects worth preserving or replicating.
Organize findings by severity (only report issues with confidence ≥50):
For each finding include:
src/auth.ts:42)Confidence scale:
(Optional) Issues spotted that predate this change – for awareness only.
Prioritized action items for the author.
Avoid false positives by NOT flagging:
Adjust review intensity based on change scope:
WRONG — vague finding:
🟠 Major — This function could have issues with error handling.
CORRECT — actionable finding with evidence:
🟠 Major (82%)
src/api/users.ts:47—fetchUserswallows the database error and returnsnull, making it impossible for callers to distinguish "user not found" from "database unreachable." Return aResult<User, DbError>or rethrow with context.
WRONG — flagging pre-existing code outside the diff:
🟡 Minor — The
loggermodule on line 12 usesconsole.loginstead 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.")
Before presenting a review, verify:
file:line referenceCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub kwiggen/claude-code-plugin --plugin kw-plugin