branch-review

branch-review is a command for Claude Code from hamr0/agentic-toolkit. It costs 0 tokens per session (6,831 once invoked), scanned A, a copy of branch-review, Apache-2.0.

A pre-merge branch review command that checks general code quality, runs a security audit, and performs an adversarial verification pass without changing files.

In plain words
What is it for?
Use it to review a branch before release; critical and high-severity findings can block the merge.
Why use it?
It provides a review checkpoint before merging and separates serious blockers from lower-priority fixes tracked for later.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions subagents.

Good fit Use it to review a branch before release; critical and high-severity findings can block the merge.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/hamr0/agentic-toolkit/branch-review
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/hamr0/agentic-toolkit

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/hamr0/agentic-toolkit/branch-review/github.svg)](https://agentmods.dev/commands/hamr0/agentic-toolkit/branch-review)
Your own site
<a href="https://agentmods.dev/commands/hamr0/agentic-toolkit/branch-review"><img src="https://agentmods.dev/badge/commands/hamr0/agentic-toolkit/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/commands/hamr0/agentic-toolkit/branch-review"><img src="https://agentmods.dev/badge/commands/hamr0/agentic-toolkit/branch-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,831 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 100% copy Near-identical to another mod 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.00000 $0.06831
Opus 5.5 $0.00000 $0.02732
Sonnet 5.5 $0.00000 $0.01366
Haiku 4.5 $0.00000 $0.00683

Measured 20d ago against content hash 5757c104aa88, 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 20d 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.

Origin

This is a copy

100% identical to branch-review — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

ai/subagentic/droid/commands/branch-review.md · 306 lines

How it starts

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


description: Review a branch before merge argument-hint: [commit hashes | from..to | blank = this branch] [low|medium|high|max]

Pre-merge review gate. General review, then a full security audit, then an adversarial verify pass, then a docs sweep. It never edits code: findings are reported and handed back, and fixing is a separate, separately authorized action. The docs sweep is the one stage that writes, and only to docs — it updates the project's docs for what this branch changed and commits exactly that.

Only Critical and High findings block the merge. Everything else is appended to the fix ledger (.factory/remember/fix-ledger.md) — a local, cumulative list, living beside MEMORY.md, usually gitignored, that /refactor (no arguments) works through between features. The report is blockers plus the ledger count. This command never runs /refactor itself — it nudges.

Run this before /release, which refuses to run without a review at the current HEAD SHA.

Guardrails

  • Spawn a worker, mid tier stated explicitly (omitted inherits the parent's, not the balanced one; not cheapest/fastest either — judgment degrades there; never a vendor model name), and hand it this file's path — a worker has no skill text of its own. Fall back to running inline if your tool has no subagent mechanism.
  • Escalate, never assume. Anything you cannot decide, cannot verify, or that this spec does not cover → stop and report it to the orchestrator (the main session). Never improvise, never widen scope, never fix a side issue you noticed along the way.
  • The worker does the work itself — no delegation. The review subagent must not spawn subagents of its own. Everything it reports has to be something it read, ran, or grepped with its own tool calls; a relayed "I executed X" is hearsay. (Same rule /security carries inside stage 2.)
  • No edits — three exceptions. You have no authorization to change code, even for a finding you are certain about. Report it. The only files you may write are .factory/remember/fix-ledger.md (append bullets; never rewrite or delete), .factory/remember/last-review.md (overwrite; the review record described at the end of this file), and the doc files Stage 4 touches — edited and then committed by that stage alone, never for code, skills, config, or tests.
  • Prove it with two checks, because neither sees what the other does. git status --porcelain, at start and again before you report, proves the tree is clean — no code or config changed, and, when Stage 4 ran (review settled), that its doc edits landed as the last act before you report. It cannot police your own two .factory/ writes (.factory/ is normally gitignored), so also hash the files there before you start and again before you report:
    find .factory/remember -maxdepth 1 -type f -exec md5sum {} + | sort -k2
    
    and show the comparison: only fix-ledger.md and last-review.md may differ. And run git diff --name-only <reviewed sha>..HEAD before you report: it must list only the files on the record's docs: line — anything else means an edit escaped Stage 4's scope. Both results are shown on the proof: line of the closing block.

Read the full file on GitHub · 306 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. 20d ago Changed · -128 lines 5757c104aa88
  2. 21d ago Changed · +2 lines e0d6906700c8
  3. 1mo ago Changed · +5 lines 4e1f327584ca
  4. 1mo ago Changed · +56 lines 32c0e747814c
  5. 1mo ago Changed · +17 lines 79506bc2107d
  6. 1mo ago Changed · +11 lines scan B → A 1f03f6986084
  7. 1mo ago First seen · 343 lines · 0 tokens per session scan B 39a67cf7cdba

Subscribe to this mod's changes

branch-review is a command published in the GitHub repository hamr0/agentic-toolkit (22 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 6,831 tokens. A static security scan graded it A with 0 findings. It is 100% identical to branch-review, differing in 0 lines, and is treated as a copy.