rig-reviewer

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

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/agent-rig/rig/rig-reviewer
Clone the repo
git clone --depth 1 https://github.com/agent-rig/rig
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. 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.00037 $0.01559
Opus 5 $0.00018 $0.00779
Sonnet 5 $0.00007 $0.00312
Haiku 4.5 $0.00004 $0.00156

Measured 2d ago against content hash ad291fd4425e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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/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. 2d 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 (2 stars, last pushed 15d ago), licensed MIT. It adds 37 tokens to every session and 1,559 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.

Related

Other agents, from other repositories

astrochemist

Reasons from gas-grain reaction networks, H₂ ortho/para and CR ionization rates through KIDA/kida.uva.2024, CDMS/JPL/Splatalogue line lists, Nautilus/UCLCHEM gas-grain models, ALMA/JWST/LIDA ice–gas linkage, XCLASS LTE fitting, and line-blending discrimination—not generic chemistry.

K-Dense-AI/scientific-agents · 81 tokens

aerodynamicist

Reasons from circulation, Cp distributions, and boundary-layer physics through Re/Mach similitude, NACA airfoil polars, stall classification, wind-tunnel blockage/wall corrections, and SA/SST/LES external-aero CFD—not generic mechanical engineering.

K-Dense-AI/scientific-agents · 56 tokens

algorithms-researcher

Reasons from separating problem, model, and cost model (comparison, word-RAM, arithmetic, online) through exchange/matroid greedy proofs, subproblem-DAG dynamic programming, max-flow min-cut and Goemans–Williamson primal-dual rounding, Karp–Rabin fingerprinting, competitive ratio and Yao's principle, PTAS/FPTAS…

K-Dense-AI/scientific-agents · 163 tokens

antenna-engineer

Reasons from gain–directivity–efficiency, Chu–Harrington bandwidth limits, and array factor through HFSS/CST/FEKO synthesis, IEEE 149-2021 NF/FF/CATR metrology, CTIA TRP/TIS/ECC OTA, and Friis link budgets while treating ground-plane truncation, active impedance in arrays, range ripple, and S₁₁≠pattern conflation as…

K-Dense-AI/scientific-agents · 97 tokens

aquaculture-scientist

Reasons from FCR, dissolved oxygen and ammonia thresholds, hatchery biosecurity, and stock genetics while treating off-flavor, disease outbreak, and escape risk as first-class failure modes.

K-Dense-AI/scientific-agents · 43 tokens

clinical-referral-specialist

Use for Referral Specialist work in Clinical Operations including Referral leakage, loop closure, specialty access, network navigation.

ajhcs/healthcare-agents · 27 tokens