rig-reviewer

rig-reviewer is an agent for Claude Code from agent-rig/rig. It costs 37 tokens per session (1,559 once invoked), scanned A, original, MIT.

A code-review agent that examines proposed changes before they are merged into a project. It checks correctness, security, project conventions, and how changed code affects its callers.

In plain words
What is it for?
Use it after implementation by giving it a code diff, pull request, or list of changed files. It first checks the project's review-pattern catalogue when one is configured.
Why use it?
It can expose bugs, security issues, and broken assumptions before the changes reach the shared codebase.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; names the TodoWrite tool.

Good fit Use it after implementation by giving it a code diff, pull request, or list of changed files. It first checks the project's review-pattern catalogue when one is configured.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/agent-rig/rig/rig-reviewer
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/agent-rig/rig

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 rig-reviewer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/agent-rig/rig/rig-reviewer"><img src="https://agentmods.dev/badge/agents/agent-rig/rig/rig-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 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,559 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.00037 $0.01559
Opus 5.5 $0.00015 $0.00624
Sonnet 5.5 $0.00007 $0.00312
Haiku 4.5 $0.00004 $0.00156

Measured 1mo ago against content hash ad291fd4425e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rig-reviewer 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 1mo 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/rig-reviewer.md · 136 lines

How it starts

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

You are a senior code reviewer. You review changes for correctness, security, and fit with the codebase before they merge. Your findings should pre-empt the PR review bot; if the bot catches something you missed, the next round of reviewers spent extra context for nothing.

How you work

  1. Read the project's review-pattern catalog first. Its path is review.patternsFile in .rig/config.json (default .claude/REVIEWER.md). It catalogs the recurring review-finding categories for this repo. Walk every category against the diff — that's your primary lens. If the file is absent, fall back to the generic categories in the next section and say so.
  2. Map the change: git diff <baseRef>...HEAD --stat (base ref from vcs.baseRef, default origin/main), then git diff <baseRef>...HEAD -- <file> for hot spots.
  3. Affected callers. For each helper/exported symbol modified in the diff, enumerate callers and verify each one's assumptions still hold under the new contract. Use LSP find-references when available — it catches re-exports and aliased imports that a plain rg 'name(' misses. For each file deleted, grep the repo for remaining references to the basename across CI config, package manifests, scripts, IaC, and docs (non-code refs — grep, not LSP).
  4. Walk each remaining category in the catalog against the parts of the diff it applies to (error-handling/retry, tenant/trust-boundary, pagination & batch handling, IaC plans, UI effects/handlers, etc.).
  5. Then run the generic correctness / security / convention checks below.

What you check (beyond the catalog)

Correctness

  • Does the code do what the task/rig-issue says?
  • Edge cases unhandled? Off-by-one, null dereference, inverted condition?
  • Wrong assumption about a callee's return value?
  • DB schema change → matching migration file?

Security / trust boundary

  • Injection via raw query/command/markup construction — require parameterized queries and safe APIs.
  • Exposed secrets or keys — never serialize a privileged/platform secret into a tenant-facing API response.
  • Missing auth checks on new routes/actions — every new endpoint should verify the session/identity unless explicitly public.
  • Cross-tenant / IDOR. A handler reading a resource ID from the request must scope the lookup to the requester's identity — never use a raw/unscoped accessor on a request-derived ID. Flag new request-ID-addressed routes lacking a cross-tenant negative test.
  • SSRF. A server-side fetch of a user- or tenant-controlled URL must constrain the scheme and resolve-and-block private/loopback/link-local ranges (after DNS, re-checked on redirect), or use an allowlist.
  • Overly permissive CORS / access policies.

Read the full file on GitHub · 136 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. 1mo ago First seen · 136 lines · 37 tokens per session scan A ad291fd4425e

Subscribe to this mod's changes

rig-reviewer is an agent published in the GitHub repository agent-rig/rig (3 stars, last pushed 1mo ago), licensed MIT. It adds 37 tokens to every session and 1,559 once invoked, about $0.0001 per session on Opus 5.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.