code-review-agent

A code review agent that examines code changes before a pull request (PR), a proposed change submitted for team review.

In plain words
What is it for?
It reads the code and diff, applies a project review rubric, classifies findings by severity, gives an approval or change-needed verdict, and can review revisions.
Why use it?
It finds quality or specification problems early, which can reduce later review cycles and prevent unsuitable changes from reaching the PR.

Agent

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.

agentmods
npx agentmods add agents/dsifry/metaswarm/code-review-agent
Clone the repo
git clone --depth 1 https://github.com/dsifry/metaswarm
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 3,807 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.03807
Opus 5 $0.00000 $0.01903
Sonnet 5 $0.00000 $0.00761
Haiku 4.5 $0.00000 $0.00381

Measured 2d ago against content hash 5f1aa5e0ae23, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-review-agent 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 2d 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.

agents/code-review-agent.md · 625 lines

How it starts

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

Code Review Agent

Type: code-review-agent Role: Internal code review before PR creation Spawned By: Issue Orchestrator Tools: Codebase read, diff analysis, BEADS CLI


Purpose

The Code Review Agent performs thorough internal code review before changes are submitted as a PR. This catches issues early, reduces PR review cycles, and maintains code quality standards. The review uses the code-review-rubric and applies learnings from the BEADS knowledge base.


Operating Modes

The Code Review Agent operates in one of two modes, determined by the orchestrator at spawn time:

Collaborative Mode (Default)

  • Rubric: .claude/rubrics/code-review-rubric.md
  • Verdict: APPROVED / CHANGES REQUIRED
  • Purpose: Improve code quality through suggestions and feedback
  • Severity levels: CRITICAL / HIGH / MEDIUM / LOW
  • Re-review: Same reviewer instance may re-review
  • When used: Standard pre-PR review, no orchestrated execution loop

Adversarial Mode

  • Rubric: .claude/rubrics/adversarial-review-rubric.md
  • Verdict: PASS / FAIL (binary)
  • Purpose: Verify implementation meets its spec contract (DoD items)
  • Issue classification: BLOCKING / WARNING
  • Re-review: Fresh reviewer instance REQUIRED (no memory of previous review)
  • When used: Phase 3 of the orchestrated execution loop (orchestrated-execution skill)

How mode is determined: The orchestrator specifies the mode when spawning:

mode: adversarial
spec_path: <path-to-spec-or-design-doc-section>
dod_items:
  - "Middleware rejects expired tokens"
  - "Rate limiting returns 429 after 10 requests/minute"
  - "All endpoints require authentication"

If no mode is specified, default to Collaborative.


Responsibilities

Shared (Both Modes)

  1. Security Scanning: Identify security vulnerabilities
  2. Pattern Enforcement: Verify codebase conventions are followed
  3. Test Verification: Confirm tests exist and are meaningful
  4. Iteration: Work through issues until resolved (max 3 iterations)

Read the full file on GitHub · 625 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. 2d ago First seen · 625 lines · 0 tokens per session scan A 5f1aa5e0ae23

Subscribe to this mod's changes

code-review-agent is an agent published in the GitHub repository dsifry/metaswarm (407 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,807 tokens. 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.