/claude-knowledge-sdk:otel-trackerfrom claude-knowledge-sdk
Set up and manage OpenTelemetry monitoring for Claude Code sessions. USE THIS SKILL whenever the user asks about monitoring, telemetry, cost tracking, token usage, OTel configuration, Prometheus setup, or session analytics. Also trigger for "how much did that cost", "track my usage", "set up monitoring", "configure telemetry", or any reference to OTEL, Prometheus, Grafana, or the monitoring guide.
Ships in claude-knowledge-sdk. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate the OTel environment variables:
npx tsx src/cli.ts otel-setup --backend prometheus --endpoint http://localhost:4317
This generates a shell script you can source:
source ./claude-otel-env.sh
Rich telemetry (tokens, costs, tool usage) flows through the logs/events protocol.
Setting only OTEL_METRICS_EXPORTER misses most data.
export OTEL_METRICS_EXPORTER=otlp # counters, histograms
export OTEL_LOGS_EXPORTER=otlp # events with token/cost details
| Variable | Controls | Purpose |
|---|---|---|
CLAUDE_CODE_ENABLE_TELEMETRY=1 | User-managed OTel | YOUR monitoring |
DISABLE_TELEMETRY=1 | Anthropic's Statsig | Internal metrics |
WARNING: Setting DISABLE_TELEMETRY=1 can disable paid features like
Opus 1M context and Channels. Only disable it if you understand the consequences.
claude_code_cost_usage_USD_total — cumulative costclaude_code_token_usage_tokens_total — token counters by typeclaude_code_api_request_duration_ms — API latencyclaude_code_session_count_total — session counterOTEL_LOG_USER_PROMPTS=1 — include prompt content (off by default)OTEL_LOG_TOOL_DETAILS=1 — include MCP/tool server namesOTEL_METRICS_INCLUDE_SESSION_ID=1 — per-session cardinalityUse npx tsx src/cli.ts otel-compose --backend prometheus to generate
a Docker Compose file matching the official monitoring guide.
In GitHub Actions with claude-code-action:
- uses: anthropics/claude-code-action@v1
with:
claude_args: "--output-format json --max-turns 10"
Parse total_cost_usd and session_id from the JSON output.
What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/doc-fetcherFetch and index official Anthropic documentation for answering questions about Claude Code, the Agent SDK, MCP, skills, plugins, hooks, and monitoring. USE THIS SKILL whenever the user asks about Claude Code features, Agent SDK APIs, OTel configuration, cost tracking, secrets management, or any Anthropic platform documentation. Also trigger for "how does Claude Code...", "what's the SDK API for...", "check the docs", "latest changelog", or references to code.claude.com, platform.claude.com, or docs.anthropic.com. This skill acts as a local documentation oracle.
/llms-txt-crawlerParse and crawl llms.txt documentation indexes. Use this when you need to crawl docs, parse llms.txt, index documentation, fetch doc URLs, scrape docs, build a knowledge index, find what pages are in the docs, or work with llms.txt files from any site.
/Other plugins' skills for the same job
Generated from the plugin's indexed repository (jadecli/claude-knowledge-sdk-typescript) — no native marketplace selected
npx claudepluginhub p/jadecli-claude-knowledge-sdk