opik

opik is a skill for Claude Code, Codex from comet-ml/opik-skills. It costs 80 tokens per session (1,317 once invoked), scanned A, a copy of opik, Apache-2.0.

A reference guide for the Opik software development kit, an open-source system for recording and inspecting how AI applications run. It covers traces, spans, integrations, threads, and reusable prompts in Python, TypeScript, and REST.

In plain words
What is it for?
Use it to add tracing to AI requests, record model and tool calls, flush recorded data from scripts, connect supported frameworks, and manage prompt versions.
Why use it?
It gives the exact concepts and allowed span types needed to record model calls, tools, validation, and overall request flows correctly. This makes it easier to inspect an AI application’s behaviour.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add tracing to AI requests, record model and tool calls, flush recorded data from scripts, connect supported frameworks, and manage prompt versions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/comet-ml/opik-skills/opik
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-skills --skill opik
Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik-skills

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/comet-ml/opik-skills/opik/github.svg)](https://agentmods.dev/skills/comet-ml/opik-skills/opik)
Your own site
<a href="https://agentmods.dev/skills/comet-ml/opik-skills/opik"><img src="https://agentmods.dev/badge/skills/comet-ml/opik-skills/opik/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 opik

Your own site · 80×15
<a href="https://agentmods.dev/skills/comet-ml/opik-skills/opik"><img src="https://agentmods.dev/badge/skills/comet-ml/opik-skills/opik.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,317 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
  • Socket pass 16 Apr 2026
  • Snyk fail 16 Apr 2026
How audits are shown
Origin 100% copy Near-identical to another mod 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.00080 $0.01317
Opus 5 $0.00040 $0.00659
Sonnet 5 $0.00016 $0.00263
Haiku 4.5 $0.00008 $0.00132

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

Security

Grade A, and why

opik 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 9d 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.

Origin

This is a copy

100% identical to opik — 42 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/opik/SKILL.md · 146 lines

How it starts

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

Opik SDK Reference

Opik is an open-source LLM observability platform. This skill is a reference for the SDK. To instrument a codebase step by step (detect frameworks, add config, emit and verify a trace), use the task-shaped opik-instrument skill.

Core concepts

A trace is one execution path (one request → one response). Spans are the operations inside it and form a hierarchy.

Span types — the ONLY valid values

Type Use for
general orchestration, agent entry points
llm model calls
tool tools, retrieval, API / DB calls
guardrail safety / validation checks

Do NOT use retrieval or any other value.

Python — tracing

import opik

@opik.track(name="agent", type="general")
def agent(query: str) -> str:
    return generate(retrieve(query))

@opik.track(type="tool")
def retrieve(query): ...

@opik.track(type="llm")
def generate(ctx): ...

opik.flush_tracker()   # required in scripts

TypeScript — tracing

import { Opik } from "opik";
const client = new Opik({ projectName: "my-project" });

const trace = client.trace({ name: "agent", input: { query } });
const span = trace.span({ name: "llm-call", type: "llm" });
span.end({ output });
trace.end({ output });
await client.flush();

Framework integrations

Prefer an integration over manual @opik.track — integrations capture tokens, model, and cost automatically. Patterns (full list in references/integrations.md):

  • wrap-the-clienttrack_openai(OpenAI()), track_anthropic(...)
  • global-enabletrack_crewai(crew=crew)
  • callbackdspy.configure(callbacks=[OpikCallback()])
  • tracerOpikTracer() for LangChain / LangGraph / LlamaIndex
  • agent-specifictrack_adk_agent_recursive(agent, OpikTracer())

LiteLLM inside @opik.track (common trap)

If code uses litellm and you add @opik.track, pass current_span_data via metadata on every completion call — otherwise OpikLogger emits orphaned top-level traces instead of nesting under your span.

Read the full file on GitHub · 146 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. 9d ago First seen · 146 lines · 80 tokens per session scan A de52cd0d657e

Subscribe to this mod's changes

opik is a skill published in the GitHub repository comet-ml/opik-skills (7 stars, last pushed 6d ago), licensed Apache-2.0. It adds 80 tokens to every session and 1,317 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to opik, differing in 42 lines, and is treated as a copy.

Related

Other skills, from other repositories

opik-instrument

Add Opik tracing to an existing app and verify a real trace lands. Installs the Opik package, detects the language and LLM framework, adds the minimum tracing, runs a safe representative path, confirms a trace in Opik, and returns the trace link. Use for "instrument my code", "add opik tracing", "add observability"…

comet-ml/opik-mcp · 101 tokens

opik-evaluate

Build an LLM evaluation and run it against your app, returning an experiment with scores. Covers datasets, LLM judges, RAG evaluation, synthetic data, error analysis, and validating evaluators against human labels. Use when the user wants to measure or improve AI product quality, or asks about evals, judges, or…

comet-ml/opik-mcp · 73 tokens

tracely

Instrument AI agents with Tracely and turn their production traces into CI gates. Use when the user mentions Tracely, tracely-ai, tracelysdk, the tracely CLI, or asks to trace/observe an AI agent, add LLM evaluators or LLM-as-a-judge columns, debug why a trace or conversation isn't showing up, wire agent regression…

Jwuthri/Tracely-ai · 120 tokens

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 agentinsightsissue entities, then fills the gaps with list (filters, sort, a time…

comet-ml/opik-mcp · 174 tokens

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 is connected, and falls back to SDK scripting otherwise. Returns the root cause, the evidence spans as clickable Opik UI links, and one suggested next step. Use for "why did this trace…

comet-ml/opik-mcp · 113 tokens

opik

Reference for the Opik SDK — tracing, span types, framework integrations, threads, and the prompt library (Python, TypeScript, REST). Use for "what span types exist", "how do I flush", "trackopenai", "add OpikTracer", "version a prompt". To instrument a repo end to end, use the opik-instrument skill.

comet-ml/opik-mcp · 80 tokens