review-branch

review-branch is a command for Claude Code from damusix/atomic-claude. It costs 35 tokens per session (850 once invoked), scanned A, original, MIT.

A command that reviews the current Git branch's code changes against its base branch. A base branch is the branch the work is intended to merge into.

In plain words
What is it for?
Use it to review a feature branch before a pull request or merge, using a dedicated code reviewer and a standard verdict.
Why use it?
It provides a pre-flight check for specification compliance and code quality before opening or merging a change. It refuses to run when the project, branch, or comparison is not suitable.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: mentions subagents.

Good fit Use it to review a feature branch before a pull request or merge, using a dedicated code reviewer and a standard verdict.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/damusix/atomic-claude/review-branch
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.

Clone the repo
git clone --depth 1 https://github.com/damusix/atomic-claude

Made for: Claude Code.

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 review-branch

README.md
[![agentmods](https://agentmods.dev/badge/commands/damusix/atomic-claude/review-branch.svg)](https://agentmods.dev/commands/damusix/atomic-claude/review-branch)
Your own site
<a href="https://agentmods.dev/commands/damusix/atomic-claude/review-branch"><img src="https://agentmods.dev/badge/commands/damusix/atomic-claude/review-branch.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 850 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.
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.00035 $0.00850
Opus 5 $0.00017 $0.00425
Sonnet 5 $0.00007 $0.00170
Haiku 4.5 $0.00003 $0.00085

Measured 8d ago against content hash 6e16a1179484, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

review-branch 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 8d 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.

context/commands/review-branch.md · 130 lines

How it starts

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

Thin wrapper. Runs atomic-reviewer once on <base>..HEAD, returns its standard ## Spec compliance + ## Code quality + signals block + VERDICT: output.

Pre-flight

git rev-parse --is-inside-work-tree

If not in a git repo, stop:

not a git repo. /review-branch needs a versioned project.

Determine base:

gh repo view --json defaultBranchRef -q .defaultBranchRef.name 2>/dev/null \
  || git config init.defaultBranch \
  || echo main

Verify current branch is not the base:

git branch --show-current

If on base: refused: already on <base>. /review-branch reviews a feature branch against its base.

Verify there are commits to review:

git rev-list --count <base>..HEAD

If 0: refused: no commits on this branch ahead of <base>. nothing to review.

Dispatch

Capture the SHAs:

BASE_SHA=$(git merge-base <base> HEAD)
HEAD_SHA=$(git rev-parse HEAD)
FEATURE=$(git branch --show-current)

Invoke the Agent tool with:

  • subagent_type: "atomic-reviewer"

  • description: "Review <feature> against <base>"

  • prompt:

    Review the diff <base>..HEAD on the current branch. No spec is provided — this is
    a pre-PR / pre-merge branch review, not a spec-compliance check.
    
    Branch: <feature>
    Base: <base>
    Base SHA: <BASE_SHA>
    HEAD SHA: <HEAD_SHA>
    Repo: <pwd>
    
    Skip the spec-compliance pass — emit `## Spec compliance\n\n(no spec — branch review only)`.
    
    Run the code-quality pass thoroughly. Verify TDD signals as usual:
      - typecheck (project-detected command from docs/wiki/index.md if present)
      - tests
      - build
      - lint
    
    Emit the standard output format ending with VERDICT: PASS or VERDICT: CHANGES_REQUESTED.
    

Report

Pass the reviewer's output through to the user verbatim. Do not summarize, do not add commentary — the reviewer's findings are the deliverable.

Append one line at the end:

suggested next step (on PASS):
  /commit pr    → open PR for review
  /commit merge → merge into <base>

Read the full file on GitHub · 130 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. 8d ago First seen · 130 lines · 35 tokens per session scan A 6e16a1179484

Subscribe to this mod's changes

review-branch is a command published in the GitHub repository damusix/atomic-claude (85 stars, last pushed today), licensed MIT. It adds 35 tokens to every session and 850 once invoked, about $0.0002 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-08-30.