opik

opik is a skill for Claude Code, Codex from comet-ml/opik-claude-code-plugin. It costs 84 tokens per session (963 once invoked), scanned A, original, Apache-2.0.

A reference and integration guide for Opik, an open-source system that records how an AI application runs. It explains traces, which cover a complete request, and spans, which record individual operations such as model calls or tool use.

In plain words
What is it for?
Use it to add Opik tracing to Python or TypeScript code, record model calls and tool executions, define valid span types, and work with the Opik REST API.
Why use it?
It helps developers see what an AI application did during a request and identify where problems occur. This is useful when adding execution tracking to an application that uses language models.

Skill for Claude CodeCodex

Part of the opik plugin — 2 skills, 2 commands, 1 agent, 8 hooks shipped together

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.

agentmods
npx agentmods add skills/comet-ml/opik-claude-code-plugin/opik
Any agent
npx skills add comet-ml/opik-claude-code-plugin --skill opik
Clone the repo
git clone --depth 1 https://github.com/comet-ml/opik-claude-code-plugin

Made for: Claude Code, Codex.

Or install opik, the plugin that ships this one along with the rest of its 2 skills, 2 commands, 1 agent, 8 hooks.

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-claude-code-plugin/opik.svg)](https://agentmods.dev/skills/comet-ml/opik-claude-code-plugin/opik)
Your own site
<a href="https://agentmods.dev/skills/comet-ml/opik-claude-code-plugin/opik"><img src="https://agentmods.dev/badge/skills/comet-ml/opik-claude-code-plugin/opik.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 963 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00084 $0.00963
Opus 5 $0.00042 $0.00481
Sonnet 5 $0.00017 $0.00193
Haiku 4.5 $0.00008 $0.00096

Measured 3d ago against content hash 3ced4b395153, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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.

skills/opik/SKILL.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 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 covers the SDK: tracing, integrations, span types, and how to instrument code.

Core Concepts

Traces and Spans

A trace is a complete execution path (one user request → one response). Spans are individual operations within a trace, forming a hierarchy.

Span Types

Type Use For Example
general Custom operations, orchestration Data processing, agent entry point
llm LLM API calls OpenAI completion, Anthropic message
tool Tool/function execution, data retrieval Web search, vector DB query, calculator
guardrail Safety/validation checks PII detection, content moderation

These are the ONLY valid span types. Do NOT use retrieval or any other type.

Python Quick Start

import opik

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

@opik.track(type="tool")
def retrieve(query: str) -> list:
    return search_db(query)

@opik.track(type="llm")
def generate(query: str, context: list) -> str:
    return llm_call(query, context)

# Nested calls automatically create child spans
result = agent("What is ML?")
opik.flush_tracker()  # Flush for scripts

TypeScript Quick Start

import { Opik } from "opik";

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

const trace = client.trace({ name: "my-agent", input: { query: "Hello" } });
const span = trace.span({ name: "llm-call", type: "llm" });
// ... LLM call
span.end({ output: { response: "Hi!" } });
trace.end({ output: { response: "Hi!" } });

await client.flush();

Framework Integrations

Use framework-specific integrations instead of manual @opik.track when available — they capture more detail (tokens, model, cost) automatically.

For the full list of integrations with code snippets, see references/integrations.md.

Read the full file on GitHub · 117 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 117 lines · 84 tokens per session scan A 3ced4b395153

Subscribe to this mod's changes

opik is a skill published in the GitHub repository comet-ml/opik-claude-code-plugin (22 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 84 tokens to every session and 963 once invoked, about $0.0004 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

AI Shopping Assistant Audit

Comprehensive audit of the SKAPARA AI shopping assistant — conversation quality, RAG retrieval, session memory, usage metering, tool execution, streaming UX, cost optimization, and security. Use when asked to audit the AI assistant, chatbot, conversation system, RAG pipeline, AI usage limits, or chat UX.

lroy-stack/ai-pod-store · 69 tokens

prompt-master

Generates optimized prompts for AI tools. Activates only when the user explicitly asks to write, fix, improve, or adapt a prompt for a specific AI tool (LLM, Cursor, Midjourney, image AI, video AI, coding agents, etc.). Does not activate for general conversation, coding tasks, document writing, or other…

nidhinjs/prompt-master · 78 tokens

excel-mcp

Excel MCP Server skill for Windows workbook automation. Use when an assistant needs rich MCP tools to create, inspect, modify, format, or analyze Excel files. Supports Power Query (M), Data Model/DAX, PivotTables, Tables, Ranges, Charts, Slicers, formatting, screenshots, VBA macros, connections, and calculation mode.…

sbroenne/mcp-server-excel · 106 tokens

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

ai-observability

Use when adding Spring AI-specific model observations, token usage, latency, externally configured cost attribution, advisor telemetry, or protected prompt and completion logging. Use production-observability for general service metrics, health, logs, and OTLP setup.

rrezartprebreza/spring-boot-skills · 53 tokens

spring-ai-integration

Use when integrating LLMs, chat clients, embeddings, RAG pipelines, or AI agents into Spring Boot. Covers Spring AI ChatClient, prompt templates, embeddings, vector stores, and structured output. Use when user mentions Spring AI, LLM, ChatGPT, Claude, RAG, embeddings.

rrezartprebreza/spring-boot-skills · 66 tokens