instrument
Add Opik observability to your code - automatically detects frameworks and adds the correct integration
Control Opik tracing for your Claude Code sessions
> /plugin marketplace add comet-ml/opik-claude-code-plugin > /plugin install opik@opik
How it fires
How this command gets triggered: by you, by Claude, or both.
/trace-claude-codeContext preview
What this command does when you run it.
Control Opik tracing for your Claude Code sessions
description: Control Opik tracing for your Claude Code sessions argument-hint: [start|stop|status] [--global] [--debug] allowed-tools: - Bash - Read - Write model: haiku
This command enables/disables automatic tracing of your Claude Code sessions to Opik.
Based on the user's request: **$ARGUMENTS**
Tracing can be enabled at two levels:
The project-level file takes precedence over the global one, so a single project can override the global setting (including turning tracing **off** while it is enabled globally).
For both the project and global files:
Resolution order (first match wins): project `off` → project enabled → global enabled → disabled.
Determine the target file from the flags:
**If the request contains "start":**
**If the request contains "stop":**
**If the request is "status":** 1. Read the project file `.claude/.opik-tracing-enabled` (if any) and the global file `~/.claude/.opik-tracing-enabled` (if any), interpreting each via the File Semantics above. 2. Report each level: "Project: \[enabled | enabled+debug | opt-out (off) | not set]" and "Global: \[enabled | enabled+debug | not set]". 3. Report the resolved effective state using the resolution order: "Effective: \[enabled | enabled+debug | disabled]".
/opik:trace-claude-code start # Enable session tracing for this project /opik:trace-claude-code start --debug # Enable tracing + debug logging for this project /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 start --global --debug # Enable tracing + debug for ALL projects /opik:trace-claude-code stop --global # Disable global tracing
When enabled, all your Claude Code interactions are automatically logged to Opik:
View your traces where they are logged with `opik configure`.
Log Claude Code sessions to Opik for LLM observability, plus skills and agents for building observable AI applications. Opik is the open-source LLM observability and evaluation platform, built by Comet.
Repo: comet-ml/opik-claude-code-plugin
Add Opik observability to your code - automatically detects frameworks and adds the correct integration