branch-review

branch-review is a command for Claude Code from helmedeiros/clean-code-skills. It costs 33 tokens per session (1,721 once invoked), scanned A, original, MIT.

A command for reviewing a feature branch by comparing it with its base branch, such as main or master. It produces a scored report covering 11 areas of code quality.

In plain words
What is it for?
Use it to inspect changed files, type-safety issues, styling, tests, accessibility, and error handling before merging a feature branch.
Why use it?
It turns a broad code review into a repeatable checklist backed by findings from the branch changes.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the clean-code-skills plugin — 21 skills, 2 commands shipped together

Good fit Use it to inspect changed files, type-safety issues, styling, tests, accessibility, and error handling before merging a feature branch.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/helmedeiros/clean-code-skills/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/helmedeiros/clean-code-skills

Made for: Claude Code.

Or install clean-code-skills, the plugin that ships this one along with the rest of its 21 skills, 2 commands.

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/helmedeiros/clean-code-skills/branch-review/github.svg)](https://agentmods.dev/commands/helmedeiros/clean-code-skills/branch-review)
Your own site
<a href="https://agentmods.dev/commands/helmedeiros/clean-code-skills/branch-review"><img src="https://agentmods.dev/badge/commands/helmedeiros/clean-code-skills/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/helmedeiros/clean-code-skills/branch-review"><img src="https://agentmods.dev/badge/commands/helmedeiros/clean-code-skills/branch-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,721 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.00033 $0.01721
Opus 5 $0.00016 $0.00860
Sonnet 5 $0.00007 $0.00344
Haiku 4.5 $0.00003 $0.00172

Measured 9d ago against content hash 5925227d4bc6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 9d 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/branch-review.md · 106 lines

How it starts

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

Branch Code Quality Review

Compare the old code on the base branch against the new code on the feature branch and produce a detailed, evidence-backed scorecard.

Review Process

Step 1: Identify the Branch

Use the provided branch argument if available, otherwise use the current branch. Determine the base branch (main or master).

Step 2: Gather Data

Run the following analyses against the diff between the base branch and the feature branch:

  • git diff <base>...HEAD --stat to list all changed files.
  • git diff <base>...HEAD to read the actual changes.
  • Count lines per component or file. Flag files over 200 lines.
  • Check type safety: strict mode in tsconfig.json, count @ts-ignore, @ts-expect-error, as any, as unknown, Record<string, any>.
  • Check styling approach: count CSS modules vs inline styles (style={{, style={).
  • Check test coverage: count test files, describe/it/test blocks, distinguish integration vs unit vs shallow tests.
  • Check accessibility: count aria- attributes, role=, semantic HTML elements, color-only status indicators.
  • Check error handling: try/catch patterns, error boundaries, API error handling.
  • Check code duplication: repeated constants, copy-pasted components, duplicated helpers.
  • Check API integration: cancellation, retries, typed responses, caching.
  • Check routing: lazy loading, nested layouts, 404 handling, breadcrumbs.
  • Check state management: prop drilling depth, global state, custom hooks.
  • Check DX tooling: linting, formatting, pre-commit hooks, import sorting.

Step 3: Check for Previous Reviews

Look for a file called BRANCH_REVIEW.md in the repo root or .claude/ directory. If found, include a "Previous New" column in the scorecard to show progression.

Step 4: Score Each Dimension

Rate each dimension on a 1-10 scale for both old and new code. Back every score with file names, line counts, or pattern counts.

Scoring Rubrics

  • Type Safety: 1-3 = no types or any everywhere; 4-6 = partial types with casts; 7-8 = strict mode, few casts; 9-10 = complete types, generic utilities, no unsafe casts.
  • State Management: 1-3 = global mutations, no patterns; 4-6 = basic hooks/state; 7-8 = proper state libs, minimal prop drilling; 9-10 = optimized selectors, derived state, signal-based.
  • Component Architecture: 1-3 = monolithic files 1000+ lines; 4-6 = some splitting but large files remain; 7-8 = most files under 200 lines, clear separation; 9-10 = composable, single-responsibility, under 150 lines.
  • Routing: 1-3 = no client routing or full reloads; 4-6 = basic routing; 7-8 = lazy loading, nested layouts; 9-10 = code splitting, prefetching, 404/error routes, breadcrumbs.
  • Styling: 1-3 = all inline or massive CSS files; 4-6 = mixed inline and modules; 7-8 = CSS modules or tokens, few inline; 9-10 = design token system, zero inline, themeable.
  • Testing: 1-3 = no tests; 4-6 = shallow smoke tests only; 7-8 = behavior tests, good coverage, some integration; 9-10 = integration + e2e, sub-component tests, a11y tests.
  • Error Handling: 1-3 = unhandled errors crash app; 4-6 = basic try/catch; 7-8 = error boundaries, typed errors, user feedback; 9-10 = retry logic, graceful degradation, monitoring.
  • API Integration: 1-3 = raw fetch, no error handling; 4-6 = wrapper with basic error handling; 7-8 = typed responses, caching, cancellation; 9-10 = retry, pagination, optimistic updates.
  • Accessibility: 1-3 = no ARIA, no semantic HTML; 4-6 = some ARIA labels; 7-8 = keyboard nav, screen reader support, semantic HTML; 9-10 = WCAG AA compliant, a11y tests.
  • Code Duplication: 1-3 = extensive copy-paste; 4-6 = some shared utils; 7-8 = centralized constants, shared components; 9-10 = DRY, shared hooks, component library.
  • DX & Maintainability: 1-3 = no tooling; 4-6 = basic linting; 7-8 = lint + format + pre-commit + aliases; 9-10 = CI checks, auto-fix, consistent conventions, documentation.

Read the full file on GitHub · 106 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. 9d ago First seen · 106 lines · 33 tokens per session scan A 5925227d4bc6

Subscribe to this mod's changes

branch-review is a command published in the GitHub repository helmedeiros/clean-code-skills (2 stars, last pushed 6mo ago), licensed MIT. It adds 33 tokens to every session and 1,721 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-31.