opik-explain

opik-explain is a skill for Claude Code from comet-ml/opik-mcp. It costs 113 tokens per session (2,028 once invoked), scanned A, original, Apache-2.0.

A read-only skill for finding the likely cause of a specific Opik trace or a repeated problem across traces. Opik is a system for recording and inspecting what an application or agent did during a run.

In plain words
What is it for?
Use it to investigate one trace or a pattern of traces, identify the failing part, link the supporting evidence in Opik, and suggest one next step.
Why use it?
It connects an observed failure to the code or data that produced it, instead of merely repeating the trace output.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code; mentions Codex.

Good fit Use it to investigate one trace or a pattern of traces, identify the failing part, link the supporting evidence in Opik, and suggest one next step.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comet-ml/opik-mcp/opik-explain
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.

Any agent
npx skills add comet-ml/opik-mcp --skill opik-explain
Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik-mcp

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 opik-explain

README.md
[![agentmods](https://agentmods.dev/badge/skills/comet-ml/opik-mcp/opik-explain.svg)](https://agentmods.dev/skills/comet-ml/opik-mcp/opik-explain)
Your own site
<a href="https://agentmods.dev/skills/comet-ml/opik-mcp/opik-explain"><img src="https://agentmods.dev/badge/skills/comet-ml/opik-mcp/opik-explain.svg" alt="Measured on agentmods" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,028 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00113 $0.02028
Opus 5 $0.00056 $0.01014
Sonnet 5 $0.00023 $0.00406
Haiku 4.5 $0.00011 $0.00203

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

Security

Grade A, and why

opik-explain 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 8d ago.

The scan reads SKILL.md. This mod also ships 5 executable files (evals/fixtures/latency/agent.py, evals/fixtures/toolbug/agent.py, evals/grader.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

src/opik_mcp/skills/opik-explain/SKILL.md · 107 lines

How it starts

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

Explain — Root-Cause an Opik Trace and Ground It in the Code

Definition of done: a grounded root cause for the requested trace (or pattern), tied to specific evidence spans and paired with exactly one suggested next step. "Grounded" means the explanation names the failing/anomalous span and connects it to the code or data that produced it — not a restatement of the trace. If the target can't be fetched or read, stop at the first genuine blocker and return one concrete next step. A trace dump is not an explanation.

Operate: investigate over the real trace data, reason against the repo, commit to a single most-likely root cause with its evidence — and change no code. This skill is read-only by design.

Inputs

The entry point is /opik-explain <trace-id> (one trace) or /opik-explain <describe the behavior> (a pattern to find and explain). Infer the rest; treat these as optional overrides:

  • project name (default: inferred from config/repo) · time window for a pattern (default: recent) · a known-good trace to compare against.

Ask only at a genuine, non-inferable blocker (see Blockers).

Activation — the only in-scope work

1. Resolve the target

  • A trace id (uuid-shaped): explain that one trace.
  • A behavior/pattern ("hallucinations since the prompt change", "slow responses"): search for the matching set (below), then explain the shared cause.
  • Confirm Opik is reachable: if ~/.opik.config exists or OPIK_API_KEY is set, use it. Otherwise → Blocker ("run opik configure, then rerun").

2. Fetch the trace and spans — MCP first, SDK fallback

Check whether the hosted Opik MCP is connected and prefer it; fall back to SDK scripting when it isn't.

  • MCP connected: use the MCP to read the trace and list/read its spans.
  • No MCP: fall back to the SDK.

Either way, read every span's input/output/error/duration.

import opik
client = opik.Opik()

tid = "<trace_id>"
trace = client.get_trace_content(tid)       # TracePublic: exposes project_id, input, output, error info — NOT project_name (accessing .project_name raises)
spans = client.search_spans(trace_id=tid)   # spans come from a SEPARATE call, not from the trace object
# Reconstruct the tree via each span's parent_span_id (the root span has none).
# Your anchor is the first span that errored, returned wrong output, or dominates the duration.

Read the full file on GitHub · 107 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. 8d ago First seen · 107 lines · 113 tokens per session scan A d830954b0169

Subscribe to this mod's changes

opik-explain is a skill published in the GitHub repository comet-ml/opik-mcp (217 stars, last pushed 3d ago), licensed Apache-2.0. It adds 113 tokens to every session and 2,028 once invoked, about $0.0006 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 skills, from other repositories

xcodebuildmcp-cli

Official skill for the XcodeBuildMCP CLI. Use when doing iOS/macOS/watchOS/tvOS/visionOS work (build, test, run, debug, log, UI automation).

getsentry/XcodeBuildMCP · 48 tokens

triage

Diagnose and fix broken MCP servers in mcptoon — doctor, health, per-server probes, and the common failure playbook.

activeing123/mcptoon · 30 tokens

maintenance

Investigate, adopt, and verify dependency updates. Captures what changed, understands why, cross-references against the codebase, and runs final checks. Supports two entry modes: run the full flow end-to-end, or review updates you already applied.

cyanheads/git-mcp-server · 53 tokens

cortex-debug-memory

Debug and fix memory system issues — validate memories, rate quality, manage protection, forget bad memories, and restore from checkpoints. Use when the user says 'fix memory', 'bad memory', 'wrong memory', 'delete this', 'protect this', 'this memory is wrong', 'memory quality', 'rate this memory', 'restore…

cdeust/Cortex · 87 tokens

debug-issue

Systematic Godot debugging decision trees for physics, signals, rendering, navigation, and input issues.

n24q02m/better-godot-mcp · 23 tokens

blazemeter-troubleshooting

Comprehensive troubleshooting guide for BlazeMeter, covering API Monitoring, Performance Testing, general issues, integrations, and security. Use when troubleshooting for (1) API Monitoring issues (Radar Agent auth, SSL certificates, debug tests), (2) Performance Testing issues (high response time, 500 errors, partial…

Blazemeter/bzm-mcp · 131 tokens