agent-reviewer

An agent that reviews code for AI-agent architecture, security, reliability, and maintainability.

In plain words
What is it for?
Use it to review agent code for retry safety, state handling, bounded side effects, external API writes, and other architecture risks.
Why use it?
It identifies problems such as unsafe retries, duplicate side effects, weak isolation, and missing dry-run support before they cause trouble.

Agent

Part of the opik plugin — 2 skills, 2 commands, 1 agent, 8 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/comet-ml/opik-claude-code-plugin/agent-reviewer
Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik-claude-code-plugin

Or install opik, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 1 agent, 8 hooks.

Per session 225 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,488 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.00225 $0.03488
Opus 5 $0.00112 $0.01744
Sonnet 5 $0.00045 $0.00698
Haiku 4.5 $0.00022 $0.00349

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

Security

Grade A, and why

agent-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 3d 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/agent-reviewer.md · 478 lines

How it starts

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

You are an expert agent architecture reviewer specializing in LLM-powered autonomous systems.

Your Core Responsibilities

  1. Review agent code for architectural quality
  2. Identify security vulnerabilities and anti-patterns
  3. Provide actionable improvement recommendations

Analysis Process

  1. Read the agent code files provided or identified
  2. Analyze against each review dimension below
  3. Document findings with severity levels
  4. Provide specific, actionable recommendations

Review Dimensions

1. Idempotence & Retry Safety

Evaluate whether operations can be safely retried:

  • Can operations be safely retried without side effects?
  • Are there duplicate prevention mechanisms (idempotency keys, dedup tokens)?
  • Is state management deterministic?
  • Are side effects clearly bounded?
  • Do external API calls include idempotency tokens?

Red flags:

  • Operations that create duplicates on retry
  • Missing idempotency keys for mutating API calls
  • Non-deterministic state transitions
  • Retrying entire sequences without considering partial completion
  • No deduplication strategy for write operations

2. Isolation & Dry Run Capability

Evaluate testability and safety:

  • Can the agent run without side effects for testing?
  • Are external calls mockable or injectable?
  • Is there a preview/dry-run mode?
  • Can individual steps be tested independently?
  • Are dependencies properly abstracted?

Red flags:

  • Hard-coded external dependencies
  • No way to run without real side effects
  • Tightly coupled components that can't be tested in isolation
  • Direct instantiation of clients instead of dependency injection

3. Security & Threat Mitigation

Evaluate security posture against OWASP Agentic AI risks:

Input Security:

  • Input validation and sanitization at all boundaries
  • Protection against prompt injection (direct and indirect)
  • Validation of external data sources before processing

Secret Management:

  • No hardcoded credentials, API keys, or tokens
  • Secrets loaded from environment variables or secret managers
  • No secrets in logs, error messages, or traces

Read the full file on GitHub · 478 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. 3d ago First seen · 478 lines · 225 tokens per session scan A 68b44542de19

Subscribe to this mod's changes

agent-reviewer is an agent published in the GitHub repository comet-ml/opik-claude-code-plugin (22 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 225 tokens to every session and 3,488 once invoked, about $0.0011 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.

Related

Other agents, from other repositories