opik: Agent for Claude Code

.agents/agents/code-reviewer.md

code-reviewer is an agent for Claude Code from comet-ml/opik. It costs 238 tokens per session (1,217 once invoked), scanned A, original, Apache-2.0.

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 Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; installed under .agents/ (shared by several agents).

This is comet-ml/opik's own configuration. It tells Claude Code how to work on opik itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything opik configures →

About the project

Opik is an open-source platform for tracing, evaluating, and monitoring applications that use large language models, retrieval systems, or AI agents. Teams use it to inspect agent activity, manage prompts, run evaluations, and monitor these applications in production.

comet-ml/opik · 22,998 stars · on GitHub · comet.com

Reuse

Borrowing it

Nothing to install: this file belongs to comet-ml/opik. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/comet-ml/opik/main/.agents/agents/code-reviewer.md
Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik

Made for: Claude Code.

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 code-reviewer

README.md
[![agentmods](https://agentmods.dev/badge/agents/comet-ml/opik/code-reviewer/github.svg)](https://agentmods.dev/agents/comet-ml/opik/code-reviewer)
Your own site
<a href="https://agentmods.dev/agents/comet-ml/opik/code-reviewer"><img src="https://agentmods.dev/badge/agents/comet-ml/opik/code-reviewer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-reviewer

Your own site · 80×15
<a href="https://agentmods.dev/agents/comet-ml/opik/code-reviewer"><img src="https://agentmods.dev/badge/agents/comet-ml/opik/code-reviewer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00238 $0.01217
Opus 5.5 $0.00095 $0.00487
Sonnet 5.5 $0.00048 $0.00243
Haiku 4.5 $0.00024 $0.00122

Measured 2mo ago against content hash 4771b5914a6e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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/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. 2mo ago 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 (22,998 stars, last pushed today), licensed Apache-2.0. It adds 238 tokens to every session and 1,217 once invoked, about $0.0010 per session on Opus 5.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.