branch-review

branch-review is a skill for Claude Code from lexfrei/ccc. It costs 179 tokens per session (5,458 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 — 2 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 2 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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 179 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,458 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.00179 $0.05458
Opus 5 $0.00089 $0.02729
Sonnet 5 $0.00036 $0.01092
Haiku 4.5 $0.00018 $0.00546

Measured 3d ago against content hash faf24447061d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 3d ago.

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 · 278 lines

How it starts

The opening of the file, as written. The whole thing — 278 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 this skill is cascaded from /pr-review and 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

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 · 278 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. 3d 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 (10 stars, last pushed 5d ago), licensed BSD-3-Clause. It adds 179 tokens to every session and 5,458 once invoked, about $0.0009 per session on Opus 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

Other skills, from other repositories

review-implement-phase

Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.

prisma/orm · 38 tokens

engram-branch-pr

PR creation workflow for Engram following the issue-first enforcement system. Trigger: When creating a pull request, opening a PR, or preparing changes for review.

Gentleman-Programming/engram · 37 tokens

verify-behavior

Verify or reproduce visible product behavior by driving the real UI with pi-computer-use's checked tools, requiring verified expect postconditions and durable state evidence for meaningful UI flows. Use when triage needs visual reproduction, implementation needs behavioral proof, review needs interactive confirmation…

nicknisi/dotfiles · 68 tokens

github-contributor

End-to-end playbook for shipping high-quality pull requests to open-source projects you don't maintain — discovery, CONTRIBUTING compliance, PR-size check, minimal-diff implementation, PR description with AI-assisted disclosure, conflict resolution, and post-submission maintainer interaction. Use whenever creating…

daymade/claude-code-skills · 133 tokens

revdiff

Review diffs, files, and documents with inline annotations in a TUI overlay, or answer questions about revdiff usage, configuration, themes, and keybindings. Opens revdiff in agterm/tmux/zellij/herdr/kitty/wezterm/cmux/ghostty/iterm2/emacs-vterm, captures annotations, and addresses them. Works in git, hg, and jj repos…

umputun/revdiff · 248 tokens

write-pr

Reference standards for writing pull request titles and descriptions in the tldraw repository, plus the pre-flight comment sweep over the diff. Use as supporting guidance when another skill or workflow needs PR content standards, not as the user-facing create/update PR workflow.

tldraw/tldraw · 53 tokens