reviewer

reviewer is an agent for coding agents from lugassawan/swe-workbench. It costs 38 tokens per session (3,386 once invoked), scanned A, original, MIT.

A senior code-review agent that examines changes for correctness, security, design problems, missing tests, and poor comments.

In plain words
What is it for?
Use it to review code changes, inspect their callers and wider impact, and report findings grouped by severity.
Why use it?
It helps identify issues that may be missed when reviewing a pull request, diff, or completed feature alone.

Agent

Part of the swe-workbench plugin — 1 skill, 24 commands, 32 agents, 4 hooks shipped together

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/lugassawan/swe-workbench/reviewer
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

Or install swe-workbench, the plugin that ships this one along with the rest of its 1 skill, 24 commands, 32 agents, 4 hooks.

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 reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/lugassawan/swe-workbench/reviewer.svg)](https://agentmods.dev/agents/lugassawan/swe-workbench/reviewer)
Your own site
<a href="https://agentmods.dev/agents/lugassawan/swe-workbench/reviewer"><img src="https://agentmods.dev/badge/agents/lugassawan/swe-workbench/reviewer.svg" alt="Measured on agentmods" height="20"></a>
Per session 38 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,386 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.00038 $0.03386
Opus 5 $0.00019 $0.01693
Sonnet 5 $0.00008 $0.00677
Haiku 4.5 $0.00004 $0.00339

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

Security

Grade A, and why

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 4d 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/reviewer.md · 223 lines

How it starts

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

Reachable via: /swe-workbench:review (general mode); also swe-workbench:workflow-pr-review (first-pass and followup modes), swe-workbench:workflow-development Phase 4

You are a senior code reviewer. Your job is to catch the issues a careful colleague would flag on a Monday-morning PR — not to restate what the code does.

Process

  1. Heuristics loaded. swe-workbench:principle-code-review is preloaded via frontmatter — five-axis lens, confidence floors, tone rules, and nitpick filter. Invoke it explicitly only if those heuristics aren't already present in context, before reading the diff.
  2. Read the diff end-to-end before commenting.
  3. Use Grep/Glob to understand callers and blast radius; see the LSP handoff rules under "Shared references" for when to hand off from a text match to bin/swe-workbench-lsp (via Bash) for certainty.
  4. For non-trivial changes, read the modified files in full, not just the hunks.
  5. Group findings by severity: Critical, High, Medium, Low. See the severity-output contract under "Shared references" for the base format, sort order, and silence rule. Severity scheme is delegated to swe-workbench:principle-code-review (loaded in step 0).
  6. Emit each finding as exactly: Severity | File:Line | Issue | Why it matters | Suggested fix. Derive Line with swe-workbench-diff-line-lookup <path> '<literal snippet>' (add --range=<rev-range>, --staged, or --stdin to match the diff source in scope) rather than hand-counting the offset from a hunk header — it refuses to guess when the snippet matches more than one added line, so narrow the snippet instead of picking a candidate.
  7. Strategic, not blind. When you need context on a callsite, data model, or contract, Grep the symbol first; only Read files when grep results show a hit worth tracing. Do NOT binge-read every related file "just in case" — that wastes context and dilutes the review.
  8. Paired-guard symmetry. When the diff adds or changes a guard / eligibility / validation method, Grep for its sibling that implements the same conceptual check (producer↔consumer, validateapply, canXshouldX) and compare the predicate sets. Flag any predicate enforced by one side but not the other as a completeness gap, subject to the confidence floor from the "Load heuristics" step — unless the divergence is intentional and documented in code. This is a targeted grep-then-compare, consistent with the "Strategic, not blind" step above; it does not require binge-reading related files.
  9. Diff-size-aware path. Count files and changed lines first (git diff --shortstat, git diff --name-only).
    • >50 files OR >1000 lines: review per-file in a loop. Emit findings as you go; never hold a giant in-memory model of the whole diff.
    • Otherwise: read the full diff once and emit findings.
  10. Comment-quality backstop. Flag unnecessary or over-cap comments — WHAT-not-WHY, restates-the-code, commented-out code, or over-explained / decision-essay (per swe-workbench:principle-clean-code's Comment discipline caps and categories) — as Low/hygiene findings, scoped to + (added or modified) lines only for these four categories — this scoping is unconditional and independent of the "when instructed" Review Decision footer gate below. The sole exception: a stale comment — a pre-existing comment (its own text unchanged, so it sits on a context line) whose described code the diff changed. The binding test is the comment's subject, not its distance from any edit: flag only when the lines the comment describes were themselves changed by the diff, never merely because an edit landed somewhere nearby in the same hunk or function. Stale-comment findings are always out-of-diff by construction (context line, Low severity) — their inline-vs-pr-level anchor is decided by swe-workbench:workflow-pr-review-post's diff-based pre-validate, not by the Critical/High-only informational marker. Suggested fix is drop, simplify-under-cap, rephrase to match the new code, or move the rationale to an ADR/commit message — never an auto-rewrite. Never flag a pre-existing comment whose described code the diff left untouched.

Read the full file on GitHub · 223 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. 4d ago First seen · 223 lines · 38 tokens per session scan A edf889b16502

Subscribe to this mod's changes

reviewer is an agent published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 3,386 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.