/skills:review-local-branchfrom skills
Review code changes on the current local git branch and print findings directly in the terminal — never opens, reads, or comments on a pull request. Use when the user says "review-local-branch" or asks to review the current branch, a specific commit, the last commit, the current working diff, or one file's changes on the local branch. Supports --diff (working diff only), --commit <hash> (repeatable, one or more specific commits), --file <path> (one file), and --last-commit (most recent commit); with no flags it reviews the whole feature branch against its detected base branch.
Ships in skills. 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.
Review code changes on the current local branch before a pull request exists. This skill is local-only and review-only: it never opens, fetches, or comments on a pull request, and it never edits, commits, merges, rebases, or pushes anything. All findings are printed directly in the terminal.
Default scope is the entire feature branch (every commit the branch has that its base does not, plus any uncommitted changes) diffed against the detected base branch. Flags narrow the scope to a working diff, one or more specific commits, the last commit, or a single file.
The review answers:
This skill never gives praise or positive commentary. Output is constructive criticism only — problems and actionable suggestions, nothing else.
review-local-branch is local-diff review only. It is not the same as
review-feedback, which triages existing reviewer comments on an open pull
request.
review-local-branch
Scope flags (see below for how they combine):
review-local-branch
review-local-branch --diff
review-local-branch --commit a1b2c3d
review-local-branch --commit a1b2c3d --commit e4f5g6h
review-local-branch --last-commit
review-local-branch --file src/auth/session.ts
review-local-branch --file src/auth/session.ts --commit a1b2c3d
--diff: review ONLY the current working diff — staged and unstaged
uncommitted changes. Ignore committed branch history entirely in this mode.--commit <hash>: review exactly that commit's changes, diffed against its
own parent. Repeat the flag to review multiple commits in one pass
(--commit <a> --commit <b>); group findings by commit in the output. Every
hash must be reachable from the current branch.--last-commit: shorthand for reviewing only the most recent commit on the
branch (HEAD against HEAD~1).--file <file-path>: restrict the review to one file. On its own, this
means that file's cumulative diff between the merge-base and the branch
tip, including any uncommitted changes to it. Combined with --commit or
--diff, it further narrows those scopes to just that file.--diff, --commit, and --last-commit are different diff sources and
cannot be combined with each other (repeating --commit for multiple hashes
is fine — that is still one diff source). If the user passes more than one of
these at once, stop and ask which single scope to use instead of guessing.
Verify the current directory is a git repository. If not, exit:
I did not run the review because this directory is not a git repository.
Detect the current branch with git branch --show-current.
If the current branch is main or master, stop before reviewing,
regardless of any flags:
You are on `main`, so I will not run a local branch review. Switch to a feature branch first.
If a --commit hash does not exist or is not reachable from the current
branch, exit with a short reason naming the bad hash.
If a --file path has no changes in the resolved scope, exit with a
short reason. Check this against the diff, not just the working tree — a
path deleted within the reviewed scope (present in the diff, absent from
disk) still counts as having changes.
Applies to default (whole-branch) mode, and to --file when used alone.
If no base branch is specified, detect the most likely one in this order:
origin/mainmainorigin/mastermasterIf none can be detected, ask the user to specify it.
git merge-base HEAD <base>
git diff <merge-base>...HEAD
git diff HEAD
git diff HEAD covers staged and unstaged changes that the merge-base
comparison alone misses. If uncommitted changes exist in the resolved scope,
include them and mention that they're included.
Exit if there is nothing to review in the resolved scope:
Default mode, no branch delta and no uncommitted changes:
I did not run the review because there are no local changes on this branch compared with `<base>`.
--diff with no staged or unstaged changes:
I did not run the review because there is no current working diff to review.
--file <path> with no changes to that file in the resolved scope:
I did not run the review because `<path>` has no changes to review in this branch.
--commit or --last-commit
— each commit's hash, author, date, and message.Applies to default (whole-branch) mode. If the branch diff is clearly too large for a reliable single-pass review — dozens of unrelated files, several unrelated domains, generated code mixed in, or thousands of changed lines — do not review it shallowly.
--file, --commit, or --diff to slice the
review into focused passes.Do not produce low-confidence findings just to fill out the review.
Severities, their merge-blocking behavior, and the per-finding format are defined in ../../references/review-severity.md. Read it before assigning severities, and use those definitions exactly.
Use Critical, Major, Minor, and Nit. Praise is not used here — this
review prints findings to the terminal, not to a PR.
Assess every changed hunk in scope for:
When frontend files are in scope, also review:
When backend files are in scope, also review:
When test files are in scope, review:
This skill reviews test code as code — it does not run the test suite. See Final Rule.
Every finding must include concrete evidence from the diff or nearby code. Evidence may be a file path, function name, route name, component name, changed behavior, code pattern, test gap, data flow, or failing scenario.
Do not invent issues without evidence. Avoid vague feedback such as "this might be bad." Prefer specific feedback:
`createPost` validates that the profile exists, but it does not verify that the authenticated user owns that profile before attaching the post. This could allow one user to create posts under another profile ID.
Prefer fewer, higher-quality findings over noisy comments.
Never include praise, compliments, positive framing, or reassurance — no "nice work," "this looks good," "clean implementation," or similar. If a reviewed hunk has no issues, say nothing about it; do not comment favorably on it. Omit a severity section entirely when it has no findings rather than filling it with positive filler. The output contains only problems, risks, and actionable suggestions — never commentary that praises the code.
## Local Branch Review
- Current branch:
- Scope: `whole branch` / `working diff` / `commit(s)` / `file`
- Base branch: (when relevant)
- Commits reviewed: (when scope is `commit(s)`; hash + short message each)
- File reviewed: (when scope is `file`)
- Uncommitted changes included:
## Findings
### Critical
#### 1. <short finding title>
- File:
- Commit: (only when scope is `commit(s)`)
- Severity: `Critical`
- Issue:
- Evidence:
- Risk:
- Impact:
- Suggested remediation:
### Major
(same fields, `Major`)
### Minor
(same fields, `Minor`)
### Nit
(same fields, `Nit`)
## Residual Risks and Testing Gaps
- ...
## Review Summary
- Blocking issues:
- Should-fix issues:
- Optional improvements:
- Overall recommendation:
Omit severity sections with no findings. If there are no material findings, use:
## Findings
No material issues found in the reviewed scope.
## Residual Risks and Testing Gaps
- ...
End with exactly one overall recommendation:
Block merge: any Critical issue exists.Fix major issues before merge: one or more Major issues exist, no
Critical issues.Safe to proceed after minor follow-ups: only Minor or Nit findings
exist.No material issues found: no material issues found.Exit without reviewing when:
main or master--diff, --commit, --last-commit is passed together--commit hash does not exist or is not reachable from the current
branch--file path has no changes in the resolved scope (checked against the
diff, so a deleted-in-scope path still counts)--file-only mode and the
user did not specify oneWhen exiting, state the reason clearly and suggest the next best action (e.g. switch branches, narrow scope with a flag, specify a base branch).
Review only. Do not run the test suite or any other verification command,
apply fixes, edit code, commit, merge, rebase, or push during
review-local-branch, regardless of what the findings are. If the user asks
to fix findings afterward, treat that as a separate implementation task and
follow the repository's normal workflow.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
24 skills in this plugin
/askRead-only discussion and consultation mode — answer questions, explain code, weigh trade-offs, and recommend improvements without implementing anything. Use when the user invokes /ask, asks "what does this do?", presents an idea for discussion, requests a recommendation or suggestion, critiques a feature ("I don't like X, can we improve it?"), or wants to think something through without entering plan mode or having the agent change code./auditReviews a specific area of the codebase for security, performance & scalability, code quality, or test coverage. Invoke with a path, e.g. /audit apps/backend/auth./brainstormShapes a raw, in-your-head idea into a scoped, non-technical concept brief (IDEA.md) through a collaborative one-question-at-a-time interview — the pre-planning step that comes before there is any plan to refine. Use when the user has an unformed idea to flesh out or scope, says "brainstorm", "help me scope/shape this idea", or "I have an idea", or wants a feature/product concept captured before planning. For stress-testing a plan or document that already exists, use grill-me instead./breakdownBreaks an existing plan, PRD, or tech spec into small, paste-ready task tickets — one self-contained prompt per task that drops cleanly into the current context window or a fresh one. Use when the user says "breakdown", "break this down", wants a plan/PRD/spec split into actionable tasks, steps, or tickets, or wants implementation work they can copy-paste one task at a time. Does not write the plan/PRD/spec — those must already exist./cavemanUltra-compressed communication mode. Cuts token usage ~75% by dropping filler, articles, and pleasantries while keeping full technical accuracy. Use when user invokes /caveman, says "caveman mode", "talk like caveman", "use caveman", "less tokens", or "be brief".
/commit-thisCreate a git commit for the current work by default, or write/review a commit message when requested with --print. Supports short and detailed modes. Use when the user invokes /commit-this, asks to commit current changes, asks for a commit message, commit title, commit body, conventional commit, or help splitting broad changes into reviewable commits.npx claudepluginhub shiggydoodah/skills --plugin skills