By aspatari
Claude Code telemetry setup skill: OTLP env, verification, auto-heal across macOS / Ubuntu / Windows.
A one-command setup skill that wires Claude Code's OpenTelemetry telemetry into any OTLP collector. Works on macOS (zsh), Ubuntu / Linux (bash), and Windows (PowerShell 5.1 / 7+).
claude plugin add https://github.com/aspatari/claude-code-telemetry-plugin
claude plugin list # should list ebs-claude-code
/ebs-claude-code:setup-telemetry
That prompts for the OTLP endpoint and writes a tagged block to your shell
rc file. Reload your shell (source ~/.zshrc, open a new terminal, or
relaunch Windows Terminal on Windows) and the next Claude Code invocation
will emit telemetry to the chosen collector.
| Flag | Effect |
|---|---|
| (none) | Full interactive flow: detect → pick endpoint → show diff → write → verify → heal → report |
--endpoint <URL> | Skip the endpoint dialog; use this URL |
--team <name> | Tag metrics with team=<name> via OTEL_RESOURCE_ATTRIBUTES |
--role <name> | Tag metrics with role=<name> |
--dry-run | Show the proposed rc block; do NOT write |
--verify-only | Just re-check an existing install |
--uninstall | Remove the tagged block; round-trips to byte-identical state |
A fenced block in your shell rc (~/.zshrc, ~/.bashrc, ~/.bash_profile,
or the PowerShell $PROFILE.CurrentUserAllHosts):
# BEGIN ebs-cc-telemetry (managed by /ebs-claude-code:setup-telemetry — do not edit)
export CLAUDE_CODE_ENABLE_TELEMETRY=1
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_EXPORTER_OTLP_ENDPOINT=<your collector URL>
export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=cumulative
export OTEL_METRICS_INCLUDE_VERSION=true
# optional, when --team/--role are provided:
export OTEL_RESOURCE_ATTRIBUTES=team=<t>,role=<r>,installer=ebs-claude-code
# END ebs-cc-telemetry
The block is idempotent: running the skill again replaces it in place.
--uninstall removes it cleanly.
Full behavior contract + platform-specific notes (why the writer targets
~/.zshrc on macOS but ~/.bashrc on Linux, Windows User-scope env vars,
etc.) is in skills/setup-telemetry/SKILL.md
and the adjacent references/ directory.
The skill is opt-in — it does nothing until you run it. It writes only to your own shell rc / PowerShell profile, preserves permissions, and logs a sha256 of the rc file before and after each run so you can audit.
No prompt content is ever captured. The skill does NOT enable
OTEL_LOG_USER_PROMPTS, OTEL_LOG_TOOL_DETAILS, OTEL_LOG_TOOL_CONTENT,
or OTEL_LOG_RAW_API_BODIES. Only Claude Code's structural telemetry
(counters + event metadata like durations, status codes, token counts)
leaves your machine.
See Anthropic's monitoring reference for the full list of emitted metrics and events.
/ebs-claude-code:setup-telemetry --uninstall
This strips the tagged block from your rc and, on Windows, clears the User-scope env vars. Round-trip from install → uninstall leaves the rc byte-identical to its pre-install state (the skill logs the sha256 before and after so you can verify).
PRs welcome. Please keep changes platform-symmetric — if you touch the
POSIX writer in scripts/write-shell-block.sh, mirror the change in
scripts/write-shell-block.ps1, and vice versa.
MIT — see LICENSE.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub aspatari/claude-code-telemetry-plugin --plugin ebs-claude-codeMemory compression system for Claude Code - persist context across sessions
Editorial "Web Designer" bundle for Claude Code from Antigravity Awesome Skills.
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Frontend design skill for UI/UX implementation
Comprehensive UI/UX design plugin for mobile (iOS, Android, React Native) and web applications with design systems, accessibility, and modern patterns
Marketing skills for AI agents — conversion optimization, copywriting, SEO, paid ads, ad creative, and growth