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.
FAQ
opik is a Claude Code plugin with 2 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes agent-ops, opik. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
> /plugin marketplace add comet-ml/opik-claude-code-plugin> /plugin install opik@opik
Repo: comet-ml/opik-claude-code-plugin
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.
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):
off/disabled โ disabled (opt a single project out of a global enable)debug content also enables debug logging)So the project setting always takes precedence over the global one. Running stop in a project while global tracing is on writes the off opt-out for that project rather than removing the global enable.
Note: Changes take effect immediately for new conversation turns (no restart needed).
/opik:instrument - Add Observability to Your CodeAutomatically detect frameworks in your code and add the correct Opik integration.
/opik:instrument my_agent.py # Add tracing to a specific file
/opik:instrument # Analyze current context and add tracing
Supports automatic detection and integration for:
@opik.track decorators or Opik client usageThe command ensures tracing starts at your entry point (critical for replay capability) and uses the correct span types.
/opik:agent-ops - LLM Observability KnowledgeComprehensive guidance on:
agent-reviewerReviews agent code for:
opik-claude-code-plugin/
โโโ .claude-plugin/
โ โโโ plugin.json # Plugin manifest
โ โโโ marketplace.json # Marketplace definition
โโโ hooks/
โ โโโ hooks.json # Hook configuration
โโโ scripts/
โ โโโ opik-logger # Platform selector script
โโโ bin/
โ โโโ opik-logger-* # Compiled binaries (darwin/linux, amd64/arm64)
โโโ src/
โ โโโ *.go # Go source code
โโโ skills/
โ โโโ agent-ops/ # Observability skill + references
โโโ agents/
โ โโโ agent-reviewer.md # Agent review agent
โโโ commands/
โ โโโ trace-claude-code.md # /opik:trace-claude-code command
โ โโโ instrument.md # /opik:instrument command
โโโ mcp-configs/
โโโ mcp-servers.json # MCP server configurations
make build # Build for all platforms
make build-local # Build for current platform only
This repo is part of a set of tools for observing Claude Code and other coding agents with Opik:
.claude-plugin/
marketplace.json
plugin.json
.github/
workflows/
build.yml
release.yml
.gitignore
agents/
agent-reviewer.md
assets/
readme_diagram.svg
bin/
opik-logger-darwin-amd64
opik-logger-darwin-arm64
opik-logger-linux-amd64
opik-logger-windows-amd64.exe
commands/
instrument.md
trace-claude-code.md
CONTRIBUTING.md
go.mod
hooks/
hooks.json
LICENSE
Makefile
mcp-configs/
mcp-servers.json
README.md
scripts/
opik-logger
skills/
agent-ops/
references/
agent-patterns.md
evaluation.md
production.md
SKILL.md
opik/
references/
integrations.md
observability.md
tracing-python.md
tracing-rest-api.md
tracing-typescript.md
SKILL.md
src/
api.go
config.go
main.go
state.go
transcript.go
uuid.go
test/
benchmark_eval.py
benchmark.sh
e2e-test.sh
integration-test.sh
sample-transcript.jsonlยฉ 2026 Flowy ยท Free and open source
Built for Claude Code ยท Not affiliated with Anthropic