branch-review

branch-review is a skill for Claude Code from lexfrei/ccc. It costs 193 tokens per session (6,026 once invoked), scanned A, original, BSD-3-Clause.

A branch review tool that examines the changes on a Git branch and gives an LGTM verdict only when the branch is ready to merge. LGTM means “looks good to me.”

In plain words
What is it for?
It is for reviewing branch diffs, checking their history and merge base, and reporting introduced defects separately from pre-existing findings.
Why use it?
It separates defects caused or affected by the current changes from problems that already existed, so unrelated issues do not distort the merge decision.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: agent in frontmatter; mentions CLAUDE.md.

Part of the review-toolkit plugin — 3 skills shipped together

Good fit It is for reviewing branch diffs, checking their history and merge base, and reporting introduced defects separately from pre-existing findings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lexfrei/ccc/branch-review
View source ↗ lexfrei/ccc
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add lexfrei/ccc --skill branch-review
Clone the repo
git clone --depth 1 https://github.com/lexfrei/ccc

Made for: Claude Code.

Or install review-toolkit, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for branch-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/lexfrei/ccc/branch-review/github.svg)](https://agentmods.dev/skills/lexfrei/ccc/branch-review)
Your own site
<a href="https://agentmods.dev/skills/lexfrei/ccc/branch-review"><img src="https://agentmods.dev/badge/skills/lexfrei/ccc/branch-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for branch-review

Your own site · 80×15
<a href="https://agentmods.dev/skills/lexfrei/ccc/branch-review"><img src="https://agentmods.dev/badge/skills/lexfrei/ccc/branch-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,026 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 140
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • low Excessive Agency · line 125
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00193 $0.06026
Opus 5.5 $0.00077 $0.02410
Sonnet 5.5 $0.00039 $0.01205
Haiku 4.5 $0.00019 $0.00603

Measured today against content hash 6b56ed85a296, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

branch-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/review-toolkit/skills/branch-review/SKILL.md · 287 lines

How it starts

The opening of the file, as written. The whole thing — 287 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Important: If the current directory is not a git repository, ask the user where the target repository is located before proceeding.

CRITICAL: Do not switch branches in the user's repo. If the active branch is the one to review, analyze it in place using git diff, git log, git show. If the active branch is NOT the target (for example when the active branch is master/main while the target is a feature branch), create a temporary git worktree pinned to the target branch and run all analysis there:

WORKTREE_DIR=$(mktemp -d -t branch-review-XXXX)
trap 'git worktree remove --force "$WORKTREE_DIR" 2>/dev/null' EXIT INT TERM
git worktree add "$WORKTREE_DIR" <target-branch>
# All git operations use: git -C "$WORKTREE_DIR" diff/log/show ...
# All file reads are relative to "$WORKTREE_DIR"
# The trap above removes the worktree on every exit path (success, error, interrupt)

Rationale: switching branches in the user's main repo would clobber their working state. A worktree gives an isolated checkout of the target branch without disturbing the active one. The "stay on the active branch" intent is preserved — the active branch is never touched.

Arguments

Parse $ARGUMENTS for:

  • Path to repository directory (positional, an existing directory path — e.g. ~/git/github.com/org/repo or ../my-worktree). If provided, ALL git and file operations must run inside this directory
  • --target the branch this PR is merging INTO (e.g. next, develop, main). This is the most important parameter for determining the correct diff scope
  • --nitpick flag for pedantic mode
  • --type project type (e.g. go, node, python, rust, kernel) — skips auto-detection. kernel means a patch series bound for a kernel mailing list: the unit of review is each commit over the base, and the "Kernel patch series" criteria below apply
  • --exclude additional exclude patterns, comma-separated (e.g. docs/,*.gen.go)
  • --ticket ticket reference — URL (GitHub issue, Jira, Linear, Notion, etc.) or ID (e.g. #123, PROJ-456). When provided, the review includes a Ticket Compliance section that validates whether the changes fulfil the ticket requirements
  • --round1-head the head SHA the FIRST review round of this gate ran on — copy it from that round's output header (the Reviewed <branch> at <sha> line). Used only to compute finding-origin labels (feature vs churn, see "Finding origin and the churn mark"); it never affects severity or the verdict, so it is an auditable record of a past run, not a scope declaration. Omit on the first round; every later round passes this same SHA. The previous round's SHA instead measures origin against that round, not round 1: lines the gate added in earlier rounds count as feature, and the convergence rule sees only the last round's churn

Examples:

  • /review-branch → auto-detect everything in current directory
  • /review-branch ~/git/github.com/org/repo → review in that directory
  • /review-branch --target next → review changes going into next
  • /review-branch --nitpick → pedantic mode
  • /review-branch --type go --exclude "api/generated/" → Go project, extra excludes
  • /review-branch --ticket https://github.com/org/repo/issues/42 → validate against GitHub issue
  • /review-branch --ticket PROJ-456 → validate against ticket ID (fetched via appropriate tool)
  • /review-branch ~/worktrees/feature --target develop --nitpick --type node → all combined
  • /review-branch --target main --ticket #123 --nitpick → target main, validate against ticket, pedantic mode
  • /review-branch --target main --round1-head 1a2b3c4 → re-review round with churn diagnostics

Read the full file on GitHub · 287 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +1 lines 6b56ed85a296
  2. 2d ago Changed · +6 lines · +14 tokens per session 18f6702b0e47
  3. 7d ago Changed 3991221dca58
  4. 9d ago Changed 0234da66fa4e
  5. 20d ago Changed · +2 lines 14ab907b04ab
  6. 3mo ago First seen · 278 lines · 179 tokens per session scan A faf24447061d

Subscribe to this mod's changes

branch-review is a skill published in the GitHub repository lexfrei/ccc (12 stars, last pushed today), licensed BSD-3-Clause. It adds 193 tokens to every session and 6,026 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

branch-review compared with skills from other repositories

branch-review next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
branch-reviewlexfrei/cccSkill12todayBSD-3-ClauseA193Claude Code
prYeachan-Heo/oh-my-claudecodeSkill41ktodayMITA47Claude Code
merge-batchdiegosouzapw/OmniRouteSkill91k4d agoMITA46Claude Code
otto-pr-review-loopomnigent-ai/omnigentSkill12ktodayApache-2.0A17Claude Code, Codex
engram-branch-prGentleman-Programming/engramSkill8.4k9d agoMITA37Claude Code, Codex
github-contributordaymade/claude-code-skillsSkill1.6ktodayMITA105Claude Code, Codex
revdiffumputun/revdiffSkill977yesterdayMITA254Claude Code