Claude Code 세션을 Opik 트레이스로 기록하고, AI 애플리케이션의 계측 및 평가를 위한 SKILL을 추가합니다.
다른 이름 comet-ml/opik-claude-code-plugin
- 스타
- 25
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 10월 22일
- 라이선스
- Apache-2.0
Opik MCP란?
Claude Code 세션을 Opik 트레이스로 기록하고, AI 애플리케이션의 계측 및 평가를 위한 SKILL을 추가합니다.
프로젝트 README에서 생성된 요약
Opik MCP server 정보
Claude Code를 사용하는 개발자는 AI 세션을 Opik 관측 플랫폼에 트레이스로 기록하여 모니터링할 수 있습니다. 이 플러그인은 대화 턴, 도구 호출, 사고 과정을 스팬으로 자동 캡처하며, 부모-자식 관계를 통해 중첩된 서브에이전트 호출도 추적합니다. 사용자 경험을 저하시키지 않으면서 복잡한 작업 중에 코딩 에이전트가 어떻게 동작하는지 가시성을 제공하도록 설계되었습니다.
세션 기록 외에도, 이 플러그인은 관측 가능한 AI 애플리케이션을 구축하고 유지 관리하는 데 도움이 되는 특화된 SKILL과 에이전트를 제공합니다. 사용자는 LangChain, OpenAI 또는 LlamaIndex와 같은 프레임워크를 자동으로 감지하고 필요한 트레이싱 데코레이터를 추가하여 자신의 Python 또는 TypeScript 코드에 계측 기능을 넣을 수 있습니다. 설정을 위해서는 Claude Code marketplace를 통해 플러그인을 설치하고, Opik CLI를 사용하여 API 키 및 워크스페이스 설정으로 Opik 연결을 구성해야 합니다.
이 도구는 에이전트 아키텍처의 보안 및 멱등성을 확인하는 전용 에이전트 리뷰어를 제공한다는 점에서 차별화됩니다. 또한 실패한 트레이스 디버깅, 실험 결과 비교, AI 인터페이스 내에서 직접 프롬프트 최적화와 같은 작업을 수행할 수 있는 포괄적인 스킬 팩을 포함하고 있습니다.
활용 사례
- 1Claude Code 세션 트레이싱Claude Code 세션 내의 모든 상호작용과 도구 호출을 Opik 플랫폼에 자동으로 기록하여 나중에 검토할 수 있습니다.
- 2애플리케이션 코드 계측지원되는 AI 프레임워크를 자동으로 감지하고 통합하여 기존 Python 또는 TypeScript 프로젝트에 관측성을 추가합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
구성
OPIK_CC_PARENT_TRACE_IDOPIK_CC_PROJECTOPIK_CC_ROOT_SPAN_IDOPIK_CC_TRUNCATE_FIELDSOPIK_CC_WORKSPACE
| 이름 | 설명 | 유형 |
|---|---|---|
| OPIK_CC_PARENT_TRACE_ID | — | |
| OPIK_CC_PROJECT | — | |
| OPIK_CC_ROOT_SPAN_ID | — | |
| OPIK_CC_TRUNCATE_FIELDS | — | |
| OPIK_CC_WORKSPACE | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능comet-ml/opik-claude-code-plugin is public and reachablegithub.com/comet-ml/opik-claude-code-plugin ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)Apache-2.0spdx.org/licenses/Apache-2.0.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-22github.com/comet-ml/opik-claude-code-plugin ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기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.
Features
- Session Tracing: Automatically log Claude Code sessions as Opik traces
- Span Tracking: Each tool call becomes a span within the trace
- Subagent Support: Nested agent calls are tracked with parent-child relationships
- Skills: Built-in knowledge for LLM observability, tracing, and evaluation
- Agents: Code review agent for agent architecture best practices
How Tracing Works
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.
Installation
From within Claude Code:
/plugin marketplace add comet-ml/opik-claude-code-plugin
Then install the plugin:
/plugin install opik
Local Install (for contributors)
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.
Configuration
Run the Opik CLI to configure your connection:
pip install opik
opik configure
This creates ~/.opik.config with your API URL, key, and workspace.
Optional Environment Variables
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.
External Trace Linking
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
MCP Server Setup
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.
For Opik Cloud
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.
For Self-Hosted Opik
{
"mcpServers": {
"opik": {
"command": "npx",
"args": ["-y", "opik-mcp", "--apiBaseUrl", "http://localhost:5173/api"]
}
}
}
Adjust the apiBaseUrl to match your Opik instance.
Pre-configured Templates
Copy-ready configurations are available in mcp-configs/mcp-servers.json.
Commands
/opik:trace-claude-code - Claude Code Session Tracing
Enable/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):
- Project file containing
off/disabled→ disabled (opt a single project out of a global enable) - Project file present → enabled (
debugcontent also enables debug logging) - Global file present → enabled (same content rules)
- Neither → disabled
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 Code
Automatically 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:
- Python: OpenAI, Anthropic, LangChain, LlamaIndex, CrewAI, Bedrock, Groq, LiteLLM
- TypeScript: OpenAI, LangChain, Vercel AI SDK
- Custom code: Adds
@opik.trackdecorators orOpikclient usage
The command ensures tracing starts at your entry point (critical for replay capability) and uses the correct span types.
Skills
Opik skills (vendored from comet-ml/opik-mcp)
The plugin ships the Opik skill pack — the same skills published as opik-skills. Claude loads them by task:
| Skill | Use for |
|---|---|
opik |
SDK reference — span types, integrations, threads, the prompt library |
opik-instrument |
"add opik tracing", "instrument my code" — and verify a real trace lands |
opik-diagnose |
"what is broken in production", "which traces need attention" |
opik-explain |
"why did this trace fail", "debug this trace" |
opik-test |
"turn this trace into a test", "make sure this doesn't happen again" |
opik-compare |
"did my fix work", "which cases regressed" |
opik-evaluate |
"evaluate my agent", "build an eval", "write an LLM judge" |
opik-online-eval |
"score production traces", "take this judge live" |
opik-optimize |
"optimize this prompt", "run the prompt optimizer" |
opik-verify |
"is this safe to ship", "go/no-go on this change" |
They are vendored at a pinned opik-mcp commit (see skills/SHARED.md); edit them upstream, not here.
Agents
agent-reviewer
Reviews agent code for:
- Idempotence and retry safety
- Security vulnerabilities
- Architecture patterns
- State management
- Observability hooks
Directory Structure
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/ # Opik skill pack, vendored from comet-ml/opik-mcp (see skills/SHARED.md)
│ ├── opik/
│ ├── opik-instrument/ … opik-optimize/
├── 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
Building from Source
make build # Build for all platforms
make build-local # Build for current platform only
Opik for Claude Code
This repo is part of a set of tools for observing Claude Code and other coding agents with Opik:
- opik-claude-code-plugin: log Claude Code sessions as Opik traces, with skills and agents included (this repo)
- ccsync: export Claude Code conversation history to Opik
- cost-intelligence-proxy: meter Claude Code token spend and cost per call
- opik-skills: agent skills for instrumenting your code with Opik
Opik MCP 질문
Claude Code용 Opik 플러그인을 어떻게 설치하나요?
Claude Code 내에서 marketplace를 추가하고 플러그인을 설치한 다음, 실행 중인 세션을 재시작하십시오.
Opik는 Claude Code 세션을 어떻게 트레이싱하나요?
각 대화 턴이 Opik 트레이스가 되며, 도구 호출, 사고 과정, 응답이 스팬(span)이 됩니다. 서브에이전트는 상위 Task 스팬 아래에 중첩됩니다.
Opik 연결은 어떻게 구성하나요?
Opik CLI를 설치하고 opik configure를 실행하십시오. 그러면 API URL, 키, 워크스페이스가 ~/.opik.config에 저장됩니다.
Claude Code 트레이스를 다른 프로젝트나 워크스페이스로 보낼 수 있나요?
네, OPIK_CC_PROJECT 및 OPIK_CC_WORKSPACE를 설정하거나 ~/.opik.config 파일에 cc_project_name 및 cc_workspace 키를 설정하십시오.
자신의 에이전트 코드에 Opik 트레이싱을 어떻게 추가하나요?
/opik:instrument를 실행하십시오. OpenAI, LangChain, CrewAI와 같은 프레임워크를 감지하여 적절한 Opik 통합 기능을 추가합니다.