From review-branch
Review and evaluate all work done on the current branch: summarize changes, rigorously assess plan compliance, and independently evaluate code quality. Use when the user says "review branch", "review the work done on this branch", "summarize this branch", "where are we on this branch", "what's been done on this branch", "branch summary", "compare branch to plan", "evaluate this branch", or any variant involving reviewing, summarizing, or evaluating the work on the current branch.
How this skill is triggered — by the user, by Claude, or both
Slash command
/review-branch:review-branchThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Review and evaluate all work done on the current branch: summarize changes, assess plan compliance, and evaluate code quality on its own merits.
Review and evaluate all work done on the current branch: summarize changes, assess plan compliance, and evaluate code quality on its own merits.
The user may provide these options inline:
<path>: Path to a plan document to compare progress against<ref>: Use a specific tag, branch, or commit as the base reference instead of the default branchdocs/reviews/ (default: save after outputting)Identify the base to diff against:
--since <ref> was specified, use that ref as the base. Verify it exists:git rev-parse --verify <ref>
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'
If gh is not available or the command fails, fall back to a purely local query of the remote HEAD ref:
git rev-parse --abbrev-ref origin/HEAD | sed 's@^origin/@@'
git merge-base < base-ref > HEAD
Use this merge base as the actual comparison point for all subsequent commands. This ensures the diff only includes changes made on this branch, not changes made on the base branch since diverging.
If HEAD equals the merge base (no commits on this branch), report that there are no changes to review and stop.
Run these commands in parallel:
# Commit history on this branch
git log --oneline < merge-base > ..HEAD
# File-level summary (insertions, deletions, renames)
git diff --stat < merge-base > ..HEAD
# Full diff for detailed analysis
git diff < merge-base > ..HEAD
# Current branch name
git branch --show-current
# Current HEAD commit (for "Reviewed through" metadata)
git rev-parse --short HEAD
Also read the commit messages in detail to understand the intent behind each change:
git log --format='%h %s%n%n%b' --no-merges < merge-base > ..HEAD
Analyze the full diff and commit history to produce a structured summary.
Write a 2-4 sentence overview of what this branch accomplishes. Focus on the purpose and outcome, not individual file changes.
Organize all changes into logical groups based on what they affect. Use groups that fit the actual changes — common groupings include but are not limited to:
For each group, list:
Skip groups that have no changes. Name groups to match the project's domain (e.g., "Authentication" instead of "Business logic" when all changes relate to auth).
Provide counts and lists organized by change type:
Highlight anything that deserves special attention:
If there are no notable changes worth highlighting, skip this section.
If --brief was specified, output only the high-level summary (3a) and the file inventory counts (3c, counts only, not the full file lists). Skip sections 3b and 3d. For plan compliance (step 4), include only the compliance verdict and overall progress fraction. For code quality (step 5), include only the assessment verdict. Skip the detailed breakdowns in both evaluation steps.
This step runs when a plan is available (user-specified or auto-detected). Plan compliance is a rigorous evaluation, not a passive checklist. Scrutinize the implementation against the plan's intent, not just its task list.
If the user specified --plan <path>, use that file. Otherwise, auto-detect:
# Check common plan directory locations
ls docs/plans/todo/ 2> /dev/null
ls docs/plans/in-progress/ 2> /dev/null
ls docs/plans/ 2> /dev/null
Search for plan files whose name matches the current branch name (with type prefixes and hyphens/underscores normalized). For example, branch feature/add-dark-mode would match a plan named add-dark-mode.md.
If exactly one plan matches, use it. If multiple plans match, list them and ask the user which to use. If no plans match, skip the plan evaluation entirely.
Read the plan document and extract every actionable item, preserving hierarchy (phase/section grouping). Plans may use:
- [ ] (incomplete) and - [x] (complete)## Phase 1, ### Step 1, etc.Also identify the plan's stated goals, constraints, design decisions, and any specified approaches or technologies. These contextual elements are as important as the task list items when evaluating compliance.
For each plan item, determine its status based on the branch's changes:
Be strict. Only mark an item as "Done" when the implementation is thorough and complete. If an item asks for error handling and the code adds only the happy path, that is "Partially done," not "Done." If the plan says to add tests and there are no tests, it is "Not started" regardless of how complete the feature code is.
Look for discrepancies between the plan and the actual implementation:
Go beyond "was it done?" to ask "was it done well relative to what the plan intended?"
For each item marked "Done" or "Partially done":
Present a thorough compliance report:
If the plan uses phases or sections, preserve that grouping in the report.
This step always runs, regardless of whether a plan exists. Evaluate the branch's changes on their own merits, independent of any plan. Read the diff critically, as a reviewer would.
Examine the diff for:
Look actively for problems:
Do not invent hypothetical problems. Flag only issues that are visible in the diff or strongly implied by it.
Assess whether the work on this branch feels finished:
Provide a clear, direct overall assessment of the code quality. Do not just list observations: synthesize them into a verdict.
Structure the final output with clear sections:
## Branch Review: <branch-name>
Base: <base-ref> (merge base: <merge-base-short-hash>)
Commits: <count>
Files changed: <count> (<added> added, <modified> modified, <deleted> deleted, <renamed> renamed)
Reviewed through: <head-short-hash>
### Summary
<high-level summary>
### Changes by Area
<grouped changes>
### File Inventory
<new/modified/deleted/renamed files>
### Notable Changes
<highlighted items>
### Plan Compliance
<plan evaluation, if applicable>
### Code Quality Assessment
<independent code evaluation>
Adjust section headers and content to fit what is actually present. Omit empty sections. The Plan Compliance and Code Quality Assessment sections are the most important outputs of this review: make them thorough, specific, and direct.
Save the review output to a file for future reference and use with the address-review skill. Skip this step if --no-save was specified.
Build the filename from today's date and the current branch name:
date +%Y-%m-%d
Use the branch name obtained from git branch --show-current in step 2. If in detached HEAD state, use HEAD as the branch name.
/ and any other characters that are unsafe in filenames (spaces, colons, backslashes) with -branch as the nameThe resulting filename format is YYYY-MM-DD-sanitized-branch-name.md. For example:
feature/store-reviews on 2026-03-08 produces 2026-03-08-feature-store-reviews.mdfix/auth-bug on 2026-03-08 produces 2026-03-08-fix-auth-bug.md2026-03-08-HEAD.md2026-03-08-branch.mdmkdir -p docs/reviews
Use the Write tool to save the full review output (the same markdown content displayed in step 6) to docs/reviews/<filename>.
If a file with the same name already exists, overwrite it. A review of the same branch on the same day is a re-review, and the latest version should replace the earlier one.
After saving, report the file path to the user:
Review saved to docs/reviews/<filename>
Include a hint about the address-review skill:
To address the items in this review, run: /address-review docs/reviews/<filename>
--plan <path> points to a non-existent file, report the error and continue with the review without plan comparison.git remote show origin for base branch detection. The review does not require gh.HEAD as the branch name and note that the review is running in detached HEAD state.Provides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub cboone/agent-harness-plugins --plugin review-branch