Skip to content
Development
Skill

/opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — Diagnostics issues first, then errors, failed tool calls, latency, regressions, and low online-eval scores. With the Opik MCP connected it lists the project's agent_insights_issue entities, offers to turn

From plugin
opik-mcp
22511 skills3 agents4 commands1 MCP

Claude Code

$ npx -y skills add comet-ml/opik-mcp --skill opik-diagnose --agent claude-code

SKILL.md

opik-diagnose.SKILL.md
name: opik-diagnose
description: Surface the Opik traces worth a developer's attention, ranked by signal — Diagnostics issues first, then errors, failed tool calls, latency, regressions, and low online-eval scores. With the Opik MCP connected it lists the project's agent_insights_issue entities, offers to turn Diagnostics on when the project has it switched off, then fills the gaps with list (filters, sort, a time window); without the MCP it reads the same via the SDK (agent_insights and search_traces), so it works with no MCP. Returns a ranked shortlist, each item ready to hand to the explain skill. Use for "what is broken in production", "which traces need attention", "find failing or slow traces", "which tool calls are failing", "triage my agent". Not for offline experiment results (use evaluate or compare) and not for root-causing one trace (use explain).
compatibility: Tested with Claude Code; works with any Agent Skills-compatible host (Cursor, VS Code Copilot, Codex). Requires a Python or TypeScript project with Opik configured and a project that has traces. Install the `opik` skill alongside this one — it holds the shared SDK and observability references; without it, this skill falls back to the public docs.
allowed-tools:
  - Read
  - Grep
  - Glob
  - Bash
metadata:
  last_updated: "2026-09-09"
  source_commit: "2.0.0"
  argument-hint: "[optional: project name, or what to look for]"

Diagnose — Surface the Traces Worth Attention

**Definition of done:** a **ranked shortlist** of the online/production traces (and Diagnostics issues) worth attention, each carrying the **signal that flagged it** and its **trace id**, scoped to a project and a recent window, and ready to hand to `/opik-explain`. "Worth attention" means errored, slow, regressed, or low online-eval score — not a dump of every trace, and never offline experiment results. If the project can't be read, stop at the first genuine blocker and return one next step.

Operate: **rank by real signal over live data, surface the few things worth a look, hand the top one to `/opik-explain` — and change no code.** This skill is read-only by design.

Inputs

The entry point is `/opik-diagnose` (the current project), `/opik-diagnose <project>`, or `/opik-diagnose <what to look for>` (e.g. "slow traces", "errors today"). Infer the rest; treat these as **optional overrides**:

  • project (default: inferred from config/repo) · window (default: recent) · signal focus (default: all — errors, latency, regressions, low scores) · shortlist size (default: a handful).

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

Activation — the only in-scope work

1. Resolve scope

Project (from config/repo) + a recent window. Confirm Opik is reachable: if `~/.opik.config` exists or `OPIK_API_KEY` is set, use it. Otherwise → **Blocker** ("run `opik configure`, then rerun").

2. Read the project once, for the shape of the week

**With the Opik MCP connected**, `read('project', <name or id>)` costs one call and answers three things the rest of this skill would otherwise guess: whether anything is wrong at all (error rate and latency against the previous 7 days — a flat week is worth saying so and stopping), which score names the project actually records (the ones worth filtering on later; guessing a name returns an empty result that reads like good news), and what the project contains.

A rate reported as `null` means no traces in the window, not a healthy zero. If the window is quiet, widen it with `since="30d"` before concluding anything.

3. Start from Diagnostics issues

Opik's Diagnostics already groups a project's recurring failures into ranked issues, each with a severity, occurrence counts, a cause, a suggested fix and example traces. Read that list first — it is the answer to "what is broken" the UI already computed, so do not rebuild it from raw traces.

**With the Opik MCP connected**, the `agent_insights_issue` entity is the primary path:

list('agent_insights_issue', project_name='<project>')        # open issues, ranked as the Diagnostics page ranks them
read('agent_insights_issue', '<issue id>', project_name='<project>')
#  → {issue: {name, cause, suggested_fix, severity, status, …}, example_trace_ids: [...], details: [...],
#     url: '<the issue's Diagnostics page>', trace_url_template: '<…/logs?trace={trace_id}>'}

Turn each open issue into one shortlist item as `references/diagnostics-list.md` (**Issue to shortlist item**) describes.

**An empty list is not an all-clear, and a non-empty list is not the whole answer either.** Act on the sentence the list gives you: `references/diagnostics-list.md` (**Empty list**, **Coverage line**) says what each one means and what to do; ask the user once before enabling Diagnostics.

Never wait or poll for a scan. Hand back the page link, finish the triage from traces, and say the grouped report will be there in a few minutes. A shortlist built while a scan you started is still running reports `source=diagnostics_pending`.

Say the as-of date in the report when it matters: a user who asked for a week and got issues through yesterday should learn that from you, not discover it.

Triage never changes an issue's status. `agent_insights_issue.resolve`, `.close` and `.reopen` exist, and they are for when the user asks for them: whether a failure is dealt with is their call, and an issue marked resolved leaves the list everyone else reads. Surfacing an issue is this skill's job; retiring one is not.

**Without the MCP**, the SDK REST client reads the same issues: `references/diagnostics-list.md` (**Without the MCP**).

4. Pull candidate traces to fill the gaps — MCP first, SDK fallback

Diagnostics reports what its last run grouped. Anything newer, or below its grouping threshold — a single latency outlier, one low online-eval score, a regression versus the prior window — still needs a scan. Skip traces already covered by an issue's `example_trace_ids

Read more
@comet-ml
Ships withopik-mcp

The official Model Context Protocol (MCP) server for Opik, the open-source LLM observability and evaluation platform, built by Comet.

22511 skills3 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
225
Star history of comet-ml/opik-mcp on GitHub, a chart by star-history.com

Other skills on opik-mcp.

opik-annotate

opik-annotate

Set up human review in Opik — create an annotation queue for a project's traces or threads and give it a custom annotator view,…

@comet-ml@comet-mlInstall Skill
opik-compare

opik-compare

Run a candidate against the baseline over an Opik test suite and read the numbers back — which cases broke, which got fixed, the…

@comet-ml@comet-mlInstall Skill
opik-evaluate

opik-evaluate

Build an LLM evaluation and run it against the app, returning an Opik experiment with scores and its link. Picks a test suite…

@comet-ml@comet-mlInstall Skill
opik-explain

opik-explain

Root-cause a specific Opik trace, or a pattern across traces, and return a grounded explanation. Uses the hosted Opik MCP when it…

@comet-ml@comet-mlInstall Skill
opik-instrument

opik-instrument

Add Opik tracing to an existing app and verify a real trace lands. Installs the Opik package, detects the language and LLM…

@comet-ml@comet-mlInstall Skill
opik-online-eval

opik-online-eval

Take a judge live on production traffic — create an Opik online evaluation rule (LLM-as-judge or Python metric) on a project with…

@comet-ml@comet-mlInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about opik-diagnose.

Which coding agents can use opik-diagnose?
opik-diagnose installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.