PluginWorks in Claude CodeCurrent
Dash0
OpenTelemetry observability for Claude Code sessions. Captures tool calls, LLM invocations, token usage, and errors as OTel traces. Send telemetry to Dash0 or any OpenTelemetry-compatible backend.
0
Try it
See what this would do for you. No sign-up needed.
Runs shell commands (hooks)
This plugin runs commands on your computer when Claude Code reaches certain events. Read its hooks before you install it.
Install in Claude Code
Run these in Claude Code, in order. The first adds the marketplace, the second installs the plugin.
Step 1
/plugin marketplace add anthropics/claude-plugins-official
Step 2
/plugin install dash0@claude-plugins-official
Review commands before running them. Promptu never runs code on your machine or pushes changes to your repo.
What's inside
2 commands
- open-session
- audit-usage
24 hooks
Security scan
Flagged
Promptu's text scan flagged something in this plugin. Read its files before you install it.
credential-access in .claude-plugin/plugin.json:32
Details
# Dash0 Agent Plugin
Connect your coding agent to [Dash0](https://dash0.com) for deep insight into how it's used — prompts and responses, tool calls, MCP calls, sub-agent activity, and token consumption — emitted as OpenTelemetry traces.
Trace through a session, see what each turn cost, find where the agent got stuck, and join agent activity with the systems it touches.
## Supported runtimes
- **Claude Code** — installation, configuration, and usage in [`.claude-plugin/README.md`](./.claude-plugin/README.md).
- **Cursor** — installation, configuration, and usage in [`.cursor-plugin/README.md`](./.cursor-plugin/README.md).
- **OpenAI Codex** — installation, configuration, and usage in [`.codex-plugin/README.md`](./.codex-plugin/README.md).
- **GitHub Copilot CLI** — installation, configuration, and usage in [`.github/plugin/README.md`](./.github/plugin/README.md).
All runtimes run on macOS, Linux, and Windows, on `amd64` or `arm64`. On Windows, Claude Code also needs [Git for Windows](https://gitforwindows.org/): it runs hook commands through Git Bash, where the other three use a PowerShell bootstrap.
## Repository layout
This repo ships one shared Go pipeline (`cmd/`, `internal/`) and runtime-specific plugin surfaces. The rule: **`<runtime>/` holds everything shipped to that runtime**, including its `<runtime>-on-event.sh` bootstrap wrapper.
| Path | Runtime | Purpose |
|---|---|---|
| `claude/` (`claude-on-event.sh`, `hooks.json`, `commands/`, `skills/`, `tools/`), `.claude-plugin/` | Claude Code | Bootstrap wrapper, hook registration, slash commands, configure skill, diagnostic scripts, manifest |
| `cursor/` (`cursor-on-event.sh`, `hooks.json`, `skills/`), `.cursor-plugin/`, `install-cursor.sh` | Cursor | Bootstrap wrapper, hook registration, configure skill, manifest, installer |
| `codex/` (`codex-on-event.sh`, `hooks.json`), `.codex-plugin/`, `.agents/plugins/marketplace.json`, `install-codex.sh` | OpenAI Codex | Bootstrap wrapper, hook registration, manifest, self-hosted Codex marketplace, installer. Installed via marketplace (`codex plugin add`) or the installer (hooks written to `~/.codex/config.toml`). `.agents/plugins/` is Codex-only — Claude reads `.claude-plugin/`, Cursor its own dir |
| `copilot/` (`copilot-on-event.sh`, `plugin.json`, `hooks.json`, `skills/`), `.github/plugin/marketplace.json` | GitHub Copilot CLI | Self-contained plugin package (bootstrap wrapper, manifest, camelCase hooks, configure skill) + self-hosted Copilot marketplace listing it. Installed via marketplace (`copilot plugin install dash0-agent-plugin@dash0`) or the `:copilot` subpath. `.github/plugin/` is Copilot-only |
The dotted directories are fixed by each agent's plugin discovery and cannot move. Keeping every other runtime asset under `claude/`, `cursor/`, `codex/`, and `copilot/` stops one marketplace from auto-discovering another runtime's components. `scripts/` is repo tooling only (release, version checks, the Docker test harness) — nothing there is shipped to a user.
## Releasing
**Actions → Release.** Pick `patch`, `minor` or `major`; the workflow bumps every
file that pins a version, builds, verifies, publishes, and moves `main` last. One
button, no PR.
`dry_run` builds and checks without publishing anything.
Full detail in [DEVELOPMENT.md](./DEVELOPMENT.md#releasing).
## License
Apache-2.0 — see [LICENSE](LICENSE).
## claude/commands/open-session.md
---
description: Open the Dash0 session details page for the current session.
---
# Open Session
Prints the Dash0 session URL and opens it in the browser.
## Steps
1. Get the session URL by running:
```bash
echo '{"session_id": "<current_session_id>"}' | CLAUDE_PLUGIN_OPTION_OTLP_URL="${CLAUDE_PLUGIN_OPTION_OTLP_URL}" DASH0_OTLP_URL="${DASH0_OTLP_URL}" "${CLAUDE_PLUGIN_ROOT}/claude/claude-on-event.sh" session-url
```
Replace `<current_session_id>` with the session ID from `$CLAUDE_SESSION_ID`.
2. Print the URL to the user.
3. Open it in the default browser:
- macOS: `open <url>`
- Linux: `xdg-open <url>`
## claude/commands/audit-usage.md
---
description: Audit a session's token usage from the local transcripts, to compare against Dash0.
argument-hint: "[session-id]"
---
# Audit Usage
Reconstructs per-model token counts for a Claude Code session — the main session
plus every sub-agent it spawned — from the transcripts on disk, and reports how
many spans Dash0 should hold for it. Use it when the token or cost numbers in
Dash0 look wrong: it produces the ground truth to compare them against.
## Steps
1. Pick the session: `$1` if the user passed one, otherwise `$CLAUDE_SESSION_ID`.
2. Run:
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/claude/tools/claude-code-usage-audit.py" <session-id>
```
If `python3` is not installed, say so and stop — the script needs it. If the
script reports no transcript for the session, run it with no argument to list
the sessions on disk and ask the user which one they meant.
3. Leave the script's output as it was printed — do not reformat or summarize the
numbers. Repeat it verbatim if it is not already visible to the user, as in a
non-interactive run. It is meant to be read side by side with the other two
numbers, or pasted into a bug report.
4. Then say what to compare it against:
- Claude Code's own numbers: run `/usage` in that session.
- Dash0: the spans whose `gen_ai.conversation.id` is the session id
(`/open-session` opens that page).
Usage or spans that appear in the audit but not in Dash0 never arrived. The
sub-agent rows correspond to the `invoke_agent` spans.
5. If the session audited is the current one, add that the turn in progress has
not finished, so its usage and its spans are still incomplete — for a clean
comparison, audit a session that has ended.

