hiddink-ai/hiddink-harness/monitoring-setup
Claude Code and agent skill by hiddink-ai/hiddink-harness
- community
Checking that the SKILL.md file is still in the repository.
Enable/disable OpenTelemetry console monitoring for Claude Code usage tracking
Install
npx vskill@latest install hiddink-ai/hiddink-harness/monitoring-setupSKILL.md
The same SKILL.md was published earlier as hiddink-ai/hiddink-harness/monitoring-setup.
Monitoring Setup Skill
Enable or disable OpenTelemetry console monitoring. When enabled, Claude Code outputs usage metrics (cost, tokens, sessions, LOC, commits, PRs, active time) and events (tool results, API requests) to the terminal.
Natural Language Triggers
This skill activates when the user mentions any of:
- Korean: "모니터링", "텔레메트리", "사용량 추적", "메트릭", "모니터링 켜줘", "텔레메트리 활성화"
- English: "monitoring", "telemetry", "usage tracking", "metrics", "enable monitoring"
- Combined with actions: "켜", "끄", "활성화", "비활성화", "설정", "enable", "disable", "setup"
Commands
enable (default)
- Read
.claude/settings.local.json(create if not exists) - Add or update
envfield with:
``json { "env": { "CLAUDE_CODE_ENABLE_TELEMETRY": "1", "OTEL_METRICS_EXPORTER": "console", "OTEL_LOGS_EXPORTER": "console" } } ``
- Preserve all existing settings
- Report to user:
``` [Done] OpenTelemetry Console Monitoring enabled
Configured in: .claude/settings.local.json Metrics: sessions, cost, tokens, LOC, commits, PRs, active time Events: tool results, API requests, tool decisions
Note: Takes effect on next claude session restart. To disable: /monitoring-setup disable ```
disable
- Read
.claude/settings.local.json - Remove OTel-related keys from
env:
CLAUDE_CODE_ENABLE_TELEMETRYOTEL_METRICS_EXPORTEROTEL_LOGS_EXPORTER
- If
envobject becomes empty, removeenvfield entirely - Report:
``` [Done] OpenTelemetry Monitoring disabled
Removed from: .claude/settings.local.json Takes effect on next session restart. ```
status
- Read
.claude/settings.local.json - Check for OTel env vars
- Report current state:
`` [Monitoring Status] ├── Enabled: Yes/No ├── Metrics exporter: console / otlp / none ├── Logs exporter: console / otlp / none └── Config: .claude/settings.local.json ``
Implementation Notes
settings.local.jsonis NOT git-tracked (local to user)- Each user enables monitoring independently
- No infrastructure required for console mode
- Metrics appear in stderr during Claude Code execution
- Default export interval: 60s for metrics, 5s for events
Available Metrics
| Metric | Description | Unit | |
|---|---|---|---|
claude_code.session.count | CLI sessions started | count | |
claude_code.cost.usage | Session cost | USD | |
claude_code.token.usage | Tokens used (input/output/cache) | tokens | |
claude_code.lines_of_code.count | Code lines modified (added/removed) | count | |
claude_code.commit.count | Git commits created | count | |
claude_code.pull_request.count | Pull requests created | count | |
claude_code.active_time.total | Active usage time | seconds |
Available Events
| Event | Description | |
|---|---|---|
claude_code.tool_result | Tool execution results with duration | |
claude_code.api_request | API request details with cost/tokens | |
claude_code.api_error | API error details | |
claude_code.tool_decision | Tool accept/reject decisions | |
claude_code.user_prompt | User prompt metadata (content redacted by default) |
Upgrade Path
For production monitoring, upgrade from console to OTLP:
Advanced OTel Configuration
Additional Metrics
| Metric | Description | Unit | |
|---|---|---|---|
code_edit_tool.decision | Edit tool accept/reject decisions | count |
Exporter Configuration
Cardinality Controls
| Variable | Description | Default | |
|---|---|---|---|
OTEL_LOG_TOOL_DETAILS | Include tool input/output in logs | false | |
OTEL_METRICS_INCLUDE_TOOL_NAME | Include tool name dimension | true | |
OTEL_METRICS_INCLUDE_MODEL | Include model dimension | true |
Multi-Exporter Syntax
Prometheus Exporter
Data Privacy
Environment variables to control data collection and telemetry:
| Variable | Description | |
|---|---|---|
DISABLE_TELEMETRY | Disable all telemetry collection | |
DISABLE_ERROR_REPORTING | Disable error reporting to Anthropic | |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | Disable non-essential network traffic | |
CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY | Disable feedback survey prompts | |
DO_NOT_TRACK | Standard DNT signal |
Enterprise Configuration
HTTP-Level Inspection (Optional)
For deeper payload-level debugging beyond aggregated metrics, Claude Inspector provides MITM proxy inspection of Claude Code HTTP traffic.
| Aspect | OTel Monitoring (this skill) | Claude Inspector | |
|---|---|---|---|
| Layer | Application (hooks, stdout) | HTTP (MITM proxy) | |
| Metrics | Aggregated (cost, tokens, duration) | Per-request payload breakdown | |
| Cache visibility | Not available | Prompt Cache hit/miss rates | |
| Sub-agent view | Summary via hooks | Full parent vs sub-agent context comparison | |
| Setup | Built-in (hooks + statusline) | External tool (Homebrew on macOS) |
When to Use
- OTel monitoring: Daily operations, cost tracking, performance trends
- Claude Inspector: Debugging specific payload issues, measuring CLAUDE.md token impact, verifying ecomode (R013) effectiveness, profiling sub-agent context inheritance
Setup
Claude Inspector is external to hiddink-harness and does not require any project configuration changes.
Agent Trajectory Export Mode
Toggle: /monitoring-setup trajectory-otel on|off
When enabled, agent-eval-framework 4-metric data is emitted as OpenTelemetry spans for external analysis.
trajectory-otel on
- Read
.claude/settings.local.json(create if not exists) - Add or update
envfield with trajectory export configuration:
``json { "env": { "CLAUDE_CODE_ENABLE_TELEMETRY": "1", "OTEL_METRICS_EXPORTER": "console", "OTEL_LOGS_EXPORTER": "console", "CLAUDE_TRAJECTORY_OTEL": "1" } } ``
- If
OTEL_EXPORTER_OTLP_ENDPOINTis set in the environment, also add:
``json { "env": { "OTEL_TRACES_EXPORTER": "otlp" } } ` Otherwise default to "OTEL_TRACES_EXPORTER": "console"`.
- Preserve all existing settings
- Report:
``` [Done] Agent Trajectory Export enabled
Configured in: .claude/settings.local.json Span exporter: console (default) | otlp (if OTEL_EXPORTER_OTLP_ENDPOINT set) Metrics: correctness, step_ratio, tool_call_ratio, latency_ratio Events: tool_call (tool_name, duration_ms, exit_code)
Note: Takes effect on next claude session restart. To disable: /monitoring-setup trajectory-otel off ```
trajectory-otel off
- Read
.claude/settings.local.json - Remove trajectory-related keys from
env:
CLAUDE_TRAJECTORY_OTELOTEL_TRACES_EXPORTER
- Report:
``` [Done] Agent Trajectory Export disabled
Removed from: .claude/settings.local.json Takes effect on next session restart. ```
Span Schema
Activation Notes
- Independent from the existing console monitoring mode (
enable/disable). Both can be active simultaneously. trajectory-otel ondoes NOT implicitly callenable— console metrics monitoring remains a separate toggle.- Console exporter (default): prints span JSON to stdout for local dev / debugging.
- OTLP exporter (optional): activated when
OTEL_EXPORTER_OTLP_ENDPOINTenv var is set. Compatible with Grafana, Datadog, Honeycomb, and any OTLP-compliant collector. No LangSmith dependency. - Actual OTEL SDK emission is handled by the Claude Code telemetry layer. This skill configures the env vars that activate the trajectory span pipeline.
status (extended)
When trajectory-otel is active, status command output includes:
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplates/skills/monitoring-setup/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hiddink-ai/hiddink-harness/monitoring-setup)