By comet-ml
Add Opik observability to LLM applications: auto-detect frameworks, trace execution flows, evaluate agent reliability, and monitor production performance with session telemetry controls for Claude Code.
This skill should be used when the user asks about agent architecture, evaluation, metrics, production monitoring, debugging agents, or best practices for building reliable AI agents. Use for questions like "evaluate my agent", "set up production monitoring", "add guardrails", "detect hallucinations", "agent anti-patterns", "compare experiments", "create evaluation dataset".
This skill should be used when the user needs to add Opik tracing or integrations to their code, instrument an LLM application, or needs reference for Opik SDK usage (Python, TypeScript, REST API). Use for tasks like "add tracing", "instrument my code", "use track_openai", "add OpikTracer", "what span types are available", "how to flush traces".
Matches all tools
Hooks run on every tool call, not just specific ones
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Log Claude Code sessions to Opik for LLM observability, plus skills and agents for building observable AI applications.
We trigger tracing for everything done in Claude Code, but don't slow you down.
Each conversation turn becomes an Opik trace. Tool calls, thoughts, and responses become spans. Subagent invocations are nested under their parent Task span.
From within Claude Code:
/plugin marketplace add comet-ml/opik-claude-code-plugin
Then install the plugin:
/plugin install opik
If you've cloned the repo locally, add it as a marketplace and install from there:
/plugin marketplace add /path/to/opik-claude-code-plugin
/plugin install opik
Important: Restart any running Claude Code sessions after installation. Hooks only load when a session starts.
Run the Opik CLI to configure your connection:
pip install opik
opik configure
This creates ~/.opik.config with your API URL, key, and workspace.
export OPIK_CC_PROJECT="my-project" # Project name (default: claude-code)
export OPIK_CC_WORKSPACE="my-workspace" # Workspace override (default: OPIK_WORKSPACE / ~/.opik.config)
export OPIK_CC_TRUNCATE_FIELDS="false" # Don't truncate large fields
All plugin env vars use the OPIK_CC_ prefix to avoid conflicts with standard Opik SDK variables.
OPIK_CC_WORKSPACE and OPIK_CC_PROJECT let you send Claude Code traces to a different
workspace/project than the rest of your Opik setup, without touching the global
OPIK_WORKSPACE / project_name in ~/.opik.config used by the Opik SDK. Both can also be
set in ~/.opik.config via the plugin-scoped cc_workspace and cc_project keys:
[opik]
workspace = my-sdk-workspace # used by the Opik SDK
project_name = my-sdk-project # used by the Opik SDK
cc_workspace = my-cc-workspace # used only by the Claude Code plugin
cc_project_name = my-cc-project # used only by the Claude Code plugin
Note: for backward compatibility, if
cc_project_nameis not set the plugin still falls back to the sharedproject_namekey.
Link Claude Code sessions to existing Opik traces (useful for embedding Claude Code in larger workflows):
export OPIK_CC_PARENT_TRACE_ID="your-trace-id" # Attach to existing trace
export OPIK_CC_ROOT_SPAN_ID="your-span-id" # Set parent span for all Claude Code spans
The Opik MCP server provides Claude with tools to interact with your Opik data - query traces, analyze experiments, and access evaluation results directly in conversation.
Add to your ~/.claude.json:
{
"mcpServers": {
"opik": {
"command": "npx",
"args": ["-y", "opik-mcp", "--apiKey", "YOUR_OPIK_API_KEY"]
}
}
}
Replace YOUR_OPIK_API_KEY with your API key from comet.com.
{
"mcpServers": {
"opik": {
"command": "npx",
"args": ["-y", "opik-mcp", "--apiBaseUrl", "http://localhost:5173/api"]
}
}
}
Adjust the apiBaseUrl to match your Opik instance.
Copy-ready configurations are available in mcp-configs/mcp-servers.json.
/opik:trace-claude-code - Claude Code Session TracingEnable/disable automatic tracing of your Claude Code sessions to Opik.
/opik:trace-claude-code start # Enable tracing for this project
/opik:trace-claude-code start --debug # Enable tracing + debug logging
/opik:trace-claude-code stop # Disable tracing for this project
/opik:trace-claude-code status # Check project + global + effective state
/opik:trace-claude-code start --global # Enable tracing for all projects
/opik:trace-claude-code stop --global # Disable tracing globally
Tracing state is stored in .claude/.opik-tracing-enabled (project) or ~/.claude/.opik-tracing-enabled (global). Resolution order (first match wins):
npx claudepluginhub comet-ml/opik-claude-code-pluginObservability platform for Claude Code and Agent SDK — monitor, debug, and control AI coding agents
OpenLit telemetry for Claude Code: sessions, tool calls, edit decisions, and cost rollups.
Enables AI agents to use Braintrust for LLM evaluation, logging, and observability. Provides correct API usage, working examples, and helper scripts for common operations.
Traces Claude Code conversations to LangSmith, including subagent and tool executions
Langfuse observability - query traces, debug exceptions, analyze sessions, manage prompts via MCP tools
Claude Code skill pack for Langfuse LLM observability (24 skills)