review-branch

review-branch is a command for Claude Code from LucasDuys/forge. It costs 19 tokens per session (2,550 once invoked), scanned A, original, MIT.

A command that reviews all changes on a Git branch before the branch is merged. A branch is a separate line of work in Git.

In plain words
What is it for?
It is for reviewing a branch against another branch, optionally checking a specification, choosing a review depth, fixing critical findings, or posting results to a GitHub pull request.
Why use it?
It checks the complete set of changes for wider effects, project conventions, security problems, and compliance with a specification instead of looking at commits in isolation.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Part of the forge plugin — 10 skills, 13 commands, 9 agents, 3 hooks shipped together

Good fit It is for reviewing a branch against another branch, optionally checking a specification, choosing a review depth, fixing critical findings, or posting results to a GitHub pull request.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/lucasduys/forge/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/LucasDuys/forge

Made for: Claude Code.

Or install forge, the plugin that ships this one along with the rest of its 10 skills, 13 commands, 9 agents, 3 hooks.

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/lucasduys/forge/review-branch.svg)](https://agentmods.dev/commands/lucasduys/forge/review-branch)
Your own site
<a href="https://agentmods.dev/commands/lucasduys/forge/review-branch"><img src="https://agentmods.dev/badge/commands/lucasduys/forge/review-branch.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,550 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.00019 $0.02550
Opus 5 $0.00010 $0.01275
Sonnet 5 $0.00004 $0.00510
Haiku 4.5 $0.00002 $0.00255

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

commands/review-branch.md · 249 lines

How it starts

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

Forge Review Branch

Review an unmerged branch holistically. Dispatches parallel review agents that examine the total diff (not commit-by-commit), check blast radius, verify conventions, and validate security — following Anthropic's multi-agent review architecture.

Usage

/forge review-branch [FLAGS]

Parse Arguments

Flag Default Description
--base BRANCH main Base branch to diff against
--head BRANCH current HEAD Branch to review (defaults to current branch)
--spec SPEC (none) Path to spec file for acceptance criteria verification
--depth quick|standard|thorough standard Review depth
--fix (off) Automatically fix CRITICAL issues found
--comment (off) Post results as GitHub PR comment via gh

Pre-flight Check

  1. Verify this is a git repository. If not: Not a git repository.
  2. Verify the base branch exists: git rev-parse --verify {base}. If not: Base branch '{base}' not found.
  3. Verify there are changes to review: git diff --name-only {base}...{head}. If empty: No changes between {base} and {head}. Nothing to review.
  4. Read .forge/capabilities.json if it exists (for tool-aware review).

Step 1: Gather Branch Context

Run these commands to understand the full scope of changes:

# Total diff stats
git diff --stat {base}...{head}

# All changed files
git diff --name-only {base}...{head}

# Commit log for the branch
git log --oneline {base}...{head}

# Number of commits
git rev-list --count {base}...{head}

Present a brief summary:

Forge Review Branch
===================================
Base:    {base}
Head:    {head}
Commits: {N}
Files:   {M} changed ({additions}+, {deletions}-)

Step 2: Convention Inference

Before reviewing, understand the codebase's conventions (same as forge-executor Step 4):

  1. Check for CLAUDE.md, .editorconfig, linting config
  2. If absent, auto-detect from existing code:
    • Import style (ESM vs CJS)
    • Naming conventions
    • Error handling patterns
    • Test framework and location
    • File organization
  3. Store inferred conventions for use by review agents

Read the full file on GitHub · 249 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. 7d ago First seen · 249 lines · 19 tokens per session scan A bd2102d00187

Subscribe to this mod's changes

review-branch is a command published in the GitHub repository LucasDuys/forge (55 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 2,550 once invoked, about $0.0001 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.