opik-instrument

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

A setup tool that adds Opik tracing to an existing application. Opik is a service for recording and inspecting what happens during application runs, especially when they use language models.

In plain words
What is it for?
Use it to add and verify Opik observability in an application, including applications built with different programming languages or language-model frameworks.
Why use it?
It removes the manual work of choosing the right package and adding tracing code. It also checks that a real run produced a trace and provides the trace link.

Skill for Claude Code

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

Part of the opik plugin — 10 skills, 1 MCP server shipped together

Good fit Use it to add and verify Opik observability in an application, including applications built with different programming languages or language-model frameworks.

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

Made for: Claude Code.

Or install opik, the plugin that ships this one along with the rest of its 10 skills, 1 MCP server.

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-instrument

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/comet-ml/opik-mcp/opik-instrument"><img src="https://agentmods.dev/badge/skills/comet-ml/opik-mcp/opik-instrument.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,630 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 warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 8
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium MCP Rug Pull · line 36
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00101 $0.02630
Opus 5.5 $0.00040 $0.01052
Sonnet 5.5 $0.00020 $0.00526
Haiku 4.5 $0.00010 $0.00263

Measured 4d ago against content hash 8d5e39e7710c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

opik-instrument 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 4d 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

Copies of this mod

2 near-identical copies found in the catalogue:

plugins/opik/skills/opik-instrument/SKILL.md · 126 lines

How it starts

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

Instrument — Add Opik Tracing and Verify a Real Trace

Definition of done: a representative, safely-executed path produces a trace that is confirmed in Opik and a direct trace link is returned. If verification can't be completed safely or autonomously, stop at the first genuine blocker and return exactly one concrete next step. Code edits alone are not success.

Operate: opinionated in execution, conservative in code changes, automatic in routine decisions, uncompromising about verifying value — but never by running something unsafe.

Inputs

The entry point is just /opik-instrument (optionally /opik-instrument <path>). Infer everything else; treat these only as optional overrides the user may pass, never as required setup:

  • target path (default: project root) · project name (default: inferred from the repo) · run command (default: an inferred safe path) · migrate_prompts (default: false).

Never turn inference into a questionnaire. Ask only when you hit a genuine, non-inferable blocker (see Blockers).

Activation — the only in-scope work

1. Configure Opik (one source of truth)

  • If ~/.opik.config exists or OPIK_API_KEY is set, use it as-is.
  • Otherwise run the official flow: opik configure (Python) / npx opik-ts configure (TypeScript).
  • Verify the config before instrumenting: run opik healthcheck — it validates the config, the install, and backend/workspace reachability. If it fails, stop at that Blocker and fix config or connectivity before adding any tracing.
  • Only add project-local .env vars if the project already uses that pattern. Never introduce a second config mechanism; never copy secret values between mechanisms.

2. Detect language & framework

Python (*.py, pyproject.toml) or TypeScript (*.ts, package.json). Identify the LLM framework from imports and pick its integration:

Import Integration
openai / anthropic track_openai / track_anthropic
langchain / langgraph OpikTracer callback
crewai / dspy / google-genai / bedrock / llama_index / litellm track_crewai / OpikCallback / track_genai / track_bedrock / LlamaIndexCallbackHandler / OpikLogger
TS: opik-openai / opik-vercel / opik-langchain trackOpenAI / OpikExporter / OpikCallbackHandler

Read the full file on GitHub · 126 lines

Files

What ships with it

3 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. 4d ago Changed · +2 lines 8d5e39e7710c
  2. 28d ago Changed · -28 lines f9ed1944734f
  3. 1mo ago Changed · +5 lines 1050ff525e8e
  4. 1mo ago Changed · +11 lines 0994133122af
  5. 1mo ago Changed · +1 lines 37448b1870dd
  6. 1mo ago First seen · 135 lines · 101 tokens per session scan A ac951dfe54c3

Subscribe to this mod's changes

opik-instrument is a skill published in the GitHub repository comet-ml/opik-mcp (225 stars, last pushed today), licensed Apache-2.0. It adds 101 tokens to every session and 2,630 once invoked, about $0.0004 per session on Opus 5.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

cqlib-kernel

A controlled workflow for running a cqlib quantum-style angle kernel and quantum support vector machine (QSVM), a classifier that separates labelled data. It compares the result with independent mathematical and RBF baselines and states the method's scientific limits.

xi-zhao/OpenQuantum · 42 tokens

qiskit-machine-learning

A Qiskit Machine Learning coding skill for quantum kernels, quantum support-vector models, quantum neural networks, gradients, training, and prediction. It uses quantum circuits as part of machine-learning models.

xi-zhao/OpenQuantum · 51 tokens

squlearn-learning

A Python toolkit that connects quantum circuits and measurements with scikit-learn, a common machine-learning library. It supports quantum kernels, which compare data using quantum circuits, and scikit-learn estimators.

xi-zhao/OpenQuantum · 41 tokens

local-rag-search

Efficiently perform web searches using the mcp-local-rag server with semantic similarity ranking. Use this skill when you need to search the web for current information, research topics across multiple sources, or gather context from the internet without using external APIs. This skill teaches effective use of…

nkapila6/mcp-local-rag · 80 tokens

luma-vision

A skill for analyzing images with several external vision models. It is activated only when a user starts a request with /skill luma-vision and includes an image.

JochenYang/luma-mcp · 37 tokens

research-topic

Multi-step research orchestration. Use when user asks "research X", "summarize current state of Y", "what's the latest on Z", or compares approaches. Calls extract(action="agent") which searches the web, extracts top results, then synthesises a citation-preserving Markdown answer with one configured LLM.

n24q02m/wet-mcp · 68 tokens