/session-code-review:code-reviewfrom session-code-review
Reviews current branch changes against REVIEW.md and CLAUDE.md guidelines. Detects bugs, security issues, and convention violations in the diff.
Ships in session-code-review. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
session-code-review:code-review - Review session changes against REVIEW.md and CLAUDE.md guidelines
/code-review [--branch <base>]
Performs a thorough code review of all changes on the current branch compared to the base branch (defaults to main or master). Reviews against REVIEW.md and CLAUDE.md guidelines in the repository.
This is a local-only review — no PR or GitHub integration required. It examines your uncommitted changes, staged changes, and all commits on the current branch.
Follow these steps exactly:
If --branch was provided, use that. Otherwise, detect the default branch:
git remote show origin | grep 'HEAD branch' | sed 's/.*: //'
Read the following files if they exist:
REVIEW.md at the repo rootCLAUDE.md at the repo rootCLAUDE.md files in directories containing changed filesThese define the review criteria. If no REVIEW.md or CLAUDE.md exists, use general best practices (security, correctness, logic errors).
# Uncommitted changes
git diff
# Staged changes
git diff --cached
# All commits on this branch vs base
git diff <base-branch>...HEAD
For each changed file, check against the guidelines from step 2. Focus on:
Do NOT flag:
For each issue found, report:
file_path:line_number)If no issues are found, report: "No issues found. Changes comply with REVIEW.md and CLAUDE.md guidelines."
If issues were found, ask the user if they'd like you to fix them.
User: /code-review
Claude: Reviewing changes on branch `feature/auth-flow` against `main`...
Found REVIEW.md with 3 rules:
1. All API routes must validate auth tokens
2. Database queries must use parameterized statements
3. Error responses must not leak internal details
Reviewing 4 changed files...
## Code Review Results
### 1. Missing auth validation (critical)
`src/routes/users.ts:45` — New GET `/users/:id` endpoint does not validate the auth token. REVIEW.md rule: "All API routes must validate auth tokens."
**Fix**: Add `validateToken(req)` middleware before the handler.
### 2. SQL injection risk (critical)
`src/db/queries.ts:23` — String interpolation in SQL query: `` `SELECT * FROM users WHERE id = ${id}` ``. REVIEW.md rule: "Database queries must use parameterized statements."
**Fix**: Use `db.query('SELECT * FROM users WHERE id = ?', [id])`.
---
Found 2 issues (2 critical). Would you like me to fix them?
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub thebushidocollective/han --plugin session-code-reviewOther plugins' skills for the same job