claude-code-config: Agent for Claude Code

.claude/agents/phase-b-reviewer.md

phase-b-reviewer is an agent for Claude Code from auerbachb/claude-code-config. It costs 44 tokens per session (7,308 once invoked), scanned B, original, MIT.

A review-loop agent that runs after code changes are pushed. It checks automated reviews from tools such as CodeRabbit, BugBot/Cursor, and Greptile, fixes findings, pushes updates, and reports whether the merge conditions are met.

In plain words
What is it for?
Use it to poll for automated code reviews, address their findings, update the handoff record, push corrections, and decide whether the pull request can pass its merge gate.
Why use it?
It helps catch and process new review feedback after a fix, so a change is not considered finished before the latest code has been checked.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths; mentions subagents.

This is auerbachb/claude-code-config's own configuration. It tells Claude Code how to work on claude-code-config itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-config configures →

Reuse

Borrowing it

Nothing to install: this file belongs to auerbachb/claude-code-config. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/auerbachb/claude-code-config/main/.claude/agents/phase-b-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/auerbachb/claude-code-config

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 phase-b-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/auerbachb/claude-code-config/phase-b-reviewer/github.svg)](https://agentmods.dev/agents/auerbachb/claude-code-config/phase-b-reviewer)
Your own site
<a href="https://agentmods.dev/agents/auerbachb/claude-code-config/phase-b-reviewer"><img src="https://agentmods.dev/badge/agents/auerbachb/claude-code-config/phase-b-reviewer/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 phase-b-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/auerbachb/claude-code-config/phase-b-reviewer"><img src="https://agentmods.dev/badge/agents/auerbachb/claude-code-config/phase-b-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,308 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00044 $0.07308
Opus 5.5 $0.00018 $0.02923
Sonnet 5.5 $0.00009 $0.01462
Haiku 4.5 $0.00004 $0.00731

Measured 21d ago against content hash 3fb2cdf501bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

phase-b-reviewer scanned grade B with 2 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 21d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

**Verify before you exit:** `handoff-state.sh --owner-repo {{OWNER}}/{{REPO}} --get "$PR" | jq -r '.phase_completed, .head_sha'` must show `B` and the SHA you just pushed, **and** `find ~/.claude/handoffs -name 'pr-{{PR_

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Before leaving any work undone — whether you'd frame it as impossible, out of scope, a deployment step, or a runbook for someone else — walk the capability ladder for any provider CLI (`gh`, `git`, `curl`, or a service
.claude/agents/phase-b-reviewer.md · 417 lines

How it starts

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

Phase B: Review Loop

You are a Phase B subagent. Your job: poll for code review results (CodeRabbit, BugBot/Cursor, or Greptile), process any findings, fix code, push, update the handoff file, and determine if the merge gate is met. Then EXIT with an exit report.

Resolving helper scripts (do this first)

You may be spawned against any repo, and most repos carry no .claude/ directory. Never invoke a bare .claude/scripts/<name> path — it silently does not exist outside the config repo. Define these once, then call every helper through run_script:

resolve_script() {
  local name="$1" candidate
  for candidate in \
    "$HOME/.claude/skills-worktree/.claude/scripts/$name" \
    "$HOME/.claude/scripts/$name" \
    ".claude/scripts/$name"; do
    if [[ -x "$candidate" ]]; then echo "$candidate"; return 0; fi
  done
  return 1
}

run_script() {            # run_script <name> [args...]
  local name="$1"; shift
  local script_path       # NOT `path`: zsh ties lowercase `path` to `PATH` (#1556)
  if ! script_path=$(resolve_script "$name"); then
    echo "ERROR: $name not found (checked ~/.claude/skills-worktree/.claude/scripts/, ~/.claude/scripts/, .claude/scripts/)" >&2
    return 127
  fi
  "$script_path" "$@"
}

run_script returns 127 when nothing resolves, after naming the file on stderr. Treat that exit distinctly from the script's own exit codes: a helper that could not be found has not reported anything about the PR, so never fold it into a "no findings" or "gate met" reading. Say which capability is unavailable in one line and block the step that needed it. Full contract: .claude/reference/portable-skill-resolution.md (issue #1189).

Read reference docs the same way, $HOME/.claude/skills-worktree/.claude/reference/<name> first. Rules under .claude/rules/*.md need no fallback — they auto-load at user scope in every project.

Runtime Context

The parent agent provides:

  • PR number and repo ({{OWNER}}/{{REPO}})
  • Handoff file path (e.g., ~/.claude/handoffs/{{OWNER}}/{{REPO}}/pr-{{PR_NUMBER}}-handoff.json; resolve with handoff-state.sh --owner-repo {{OWNER}}/{{REPO}} --path {{PR_NUMBER}})
  • HEAD SHA from the previous phase
  • Reviewer assignment (cr, bugbot, or greptile)
  • Existing findings (if any were already posted before this agent launched)

Read the full file on GitHub · 417 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. 21d ago Changed 3fb2cdf501bc
  2. 29d ago Changed · +7 lines 2c570f877e8e
  3. 1mo ago Changed · +8 lines 9d8ff5eb1828
  4. 2mo ago First seen · 402 lines · 44 tokens per session scan B 5fed5c63f335

Subscribe to this mod's changes

phase-b-reviewer is an agent published in the GitHub repository auerbachb/claude-code-config (5 stars, last pushed 2d ago), licensed MIT. It adds 44 tokens to every session and 7,308 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

adversarial-reviewer

Adversarial reviewer for specs, plans, implementations, or any combination ("spec amendment + implementation in the same PR" is the dominant case), plus two narrower branches — an RFC-only review and an intent review. Loads project conventions and the targeted artifacts; attacks along the relevant checklists; returns…

eugenelim/agent-ready-repo · 142 tokens

quality-engineer

Quality-lens reviewer covering testability, observability, reliability, and maintainability -- the "cost to live with this code" pass. Also drafts contract or construction tests on request. Reads effective repository guidance, the spec and plan if any, the diff, and nearby tests; flags test-shape problems (wrong…

eugenelim/agent-ready-repo · 172 tokens

review-all-shared-rules

Shared severity tiers, verification gate, quotas, and auto-drop rules included by every review-all agent prompt.

ncoevoet/claude-review-all · 28 tokens

bugs-and-security

Scan changed code for logic bugs, security vulnerabilities (OWASP Top 10), completeness gaps, and error handling issues.

ncoevoet/claude-review-all · 28 tokens

security-deep-dive

Conditional threat-model analysis with adversarial reasoning, attack scenarios, and CWE classification. Distinct from agent 02 (which does broad pattern scanning).

ncoevoet/claude-review-all · 35 tokens

performance

Detect performance regressions in changed code — N+1 queries, unnecessary recomputes, missing memoization, big-O regressions, memory leaks, bundle-size red flags.

ncoevoet/claude-review-all · 37 tokens