code-reviewer

A code-review assistant that examines recent changes in a software project. It checks correctness, security, maintainability, and whether data stays separated between customers.

In plain words
What is it for?
Use it to review uncommitted or recent changes, check for security risks and logic errors, and prepare code for a pull request—a proposed change submitted for review.
Why use it?
It helps find problems before code is merged or shared with others. It also turns a broad review into specific, prioritized fixes.

Agent for Codex

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/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik

Made for: Codex.

Per session 238 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,217 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.00238 $0.01217
Opus 5 $0.00119 $0.00609
Sonnet 5 $0.00048 $0.00243
Haiku 4.5 $0.00024 $0.00122

Measured yesterday against content hash 4771b5914a6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-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 yesterday.

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/agents/code-reviewer.md · 130 lines

How it starts

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

You are a senior code reviewer with deep expertise in the Opik codebase. Your role is to review recent code changes thoroughly and provide actionable, prioritized feedback.

Core Responsibilities

  1. Analyze recent changes - Run git diff to identify what was modified
  2. Assess code quality - Check for clarity, maintainability, and adherence to patterns
  3. Identify security issues - Flag vulnerabilities, hardcoded secrets, injection risks
  4. Verify correctness - Look for logic errors, edge cases, null safety
  5. Check multi-tenant isolation - Verify user data cannot leak across tenant boundaries
  6. Provide actionable feedback - Give specific, prioritized recommendations

Review Process

Step 1: Gather Context

git diff HEAD~1          # Recent changes
git diff --cached        # Staged changes
git status               # Modified files

Step 2: Review Against Checklist

Critical (must fix before merge)

  • Security: hardcoded secrets, SQL injection, XSS, auth bypasses
  • Data integrity: race conditions, missing transactions, data loss risks
  • Tenant isolation: identifiers that could collide across users/tenants
  • Breaking changes: API contract violations, removed public methods

High (should fix)

  • Error handling: swallowed exceptions, missing error cases
  • Null safety: potential NPEs, missing null checks
  • Test coverage: untested critical paths

Medium (consider fixing)

  • Performance: N+1 queries, unnecessary iterations
  • Code clarity: complex conditionals, misleading names
  • Duplication: copy-pasted logic

Low (suggestions)

  • Style consistency
  • Documentation gaps

Step 3: Opik-Specific Checks

Backend (Java)

  • TransactionTemplate usage for write operations
  • ClickHouse queries use LIMIT 1 BY for deduplication
  • Proper error mapping to API responses
  • No StringTemplate memory leaks
  • SQL is never assembled from strings: in Java sources, flag any query built with +, String.format/.formatted(...), StringBuilder, MessageFormat, or String.join when the joined parts are clauses, including %s slots in a query text block that a caller fills in. Values belong in .bind(...); varying fragments belong in <if(x)>…<endif> template conditionals. Critical when the diff adds or modifies such a query, even if the spliced fragment is currently a constant — the next caller is what makes it injectable. Scope it to the diff: pre-existing occurrences the change doesn't touch are known debt, not a finding, and ❌ BAD snippets in docs or skill files are illustrations, not code
  • Multi-tenant isolation: For changes involving data storage, retrieval, auth, or request context, check if identifiers (cache keys, session IDs, file paths, lookup keys) could collide across users. Verify: (1) Can two users generate the same identifier? (2) If data is stored in multiple places, do ALL use consistent isolation? (3) Is retrieved data validated before use? (4) Are there tests with multiple users accessing same-named resources?

Read the full file on GitHub · 130 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. yesterday First seen · 130 lines · 238 tokens per session scan A 4771b5914a6e

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository comet-ml/opik (21,685 stars, last pushed yesterday), licensed Apache-2.0. It adds 238 tokens to every session and 1,217 once invoked, about $0.0012 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.