/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
Claude Code
$ npx -y skills add comet-ml/opik-mcp --skill opik-diagnose --agent claude-code
Codex
$ npx skills add comet-ml/opik-mcp --skill opik-diagnose -a codex -y
Cursor
$ npx skills add comet-ml/opik-mcp --skill opik-diagnose -a cursor -y
Gemini CLI
$ npx skills add comet-ml/opik-mcp --skill opik-diagnose -a gemini-cli -y
GitHub Copilot
$ npx skills add comet-ml/opik-mcp --skill opik-diagnose -a github-copilot -y
OpenCode
$ npx skills add comet-ml/opik-mcp --skill opik-diagnose -a opencode -y
Windsurf
$ npx skills add comet-ml/opik-mcp --skill opik-diagnose -a windsurf -y
SKILL.md
opik-diagnose.SKILL.mdname: 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
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
The official Model Context Protocol (MCP) server for Opik, the open-source LLM observability and evaluation platform, built by Comet.
Other skills on opik-mcp.
More skills from other plugins.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
ask-matt
Ask which skill or flow fits your situation. A router over the skills in this repo.
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.

