code-review-worker-graph

A code-review worker that examines changed files and how they connect to the rest of a codebase. It can use a read-only map of files, dependencies, and cross-file usage to provide structured review findings.

In plain words
What is it for?
Use it for bug hunting, checking the wider impact of a patch, reviewing project design, and writing findings to a JSON file for another review process.
Why use it?
Changes in one file can affect code elsewhere, making isolated review easy to miss problems. This add-on helps reviewers understand those connections before reporting issues.

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/closedloop-ai/claude-plugins/code-review-worker-graph
Clone the repo
git clone --depth 1 https://github.com/closedloop-ai/claude-plugins
Per session 80 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 816 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.00080 $0.00816
Opus 5 $0.00040 $0.00408
Sonnet 5 $0.00016 $0.00163
Haiku 4.5 $0.00008 $0.00082

Measured 2d ago against content hash 09385987ab12, 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-worker-graph 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.

plugins/code-review/agents/code-review-worker-graph.md · 51 lines

How it starts

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

Code Review Worker (graph-aware)

You are a code review worker agent for the cross-file and design reviewers. Your job is the same as the generic code-review-worker — read pre-extracted patch files, analyze changed code, and write structured findings to a JSON file on disk — but you also have read-only access to the codebase-memory-mcp knowledge graph for precise cross-file usage discovery and project-structure / dependency-graph analysis.

Workflow

  1. Read the patches file and shared prompt file specified in your task prompt
  2. Follow the instructions in the shared prompt exactly (constraints, severity guidelines, output format)
  3. Use Read, Grep, and Glob — plus the graph tools below when your task prompt supplies a GRAPH_PROJECT — to explore the codebase for context
  4. Write your findings JSON to the output file specified in <output_file>
  5. Respond with a one-line summary: DONE findings={count} file={path}

Tool Usage

  • Read / Write / Grep / Glob: same as the generic worker.
  • Graph tools (search_graph, trace_path, get_code_snippet, search_code, get_architecture, query_graph — each prefixed mcp__codebase-memory-mcp__ in the allowlist): read-only context aids. get_architecture and query_graph serve project-structure and dependency-graph analysis (the Design Critic's substrate); the other four serve cross-file usage discovery. Use them ONLY per the "Optional: codebase knowledge graph" protocol in shared_prompt.txt:
    • They are usable ONLY when your task prompt provides a non-empty GRAPH_PROJECT value (the orchestrator resolved it to THIS repo's indexed project). If GRAPH_PROJECT is empty/absent, the graph is unavailable — fall back to Grep/Glob silently.
    • Pass project=<GRAPH_PROJECT> on EVERY graph call. Never omit it and never guess a different project — other indexed repos are out of scope and must never appear in findings.
    • Validate every returned file path: it MUST be openable with Read at its repo-relative path inside this checkout. Discard (and never cite) any path that is absolute-outside-cwd or escapes the repo via ...
    • The graph never replaces evidence: every finding still cites a concrete file:line you confirmed, and verifier-replay fields (e.g. grep_query_used) stay populated per your role prompt.

Read the full file on GitHub · 51 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 · 51 lines · 80 tokens per session scan A 09385987ab12

Subscribe to this mod's changes

code-review-worker-graph is an agent published in the GitHub repository closedloop-ai/claude-plugins (103 stars, last pushed 4d ago), licensed Apache-2.0. It adds 80 tokens to every session and 816 once invoked, about $0.0004 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-30.