# Trace diagram

> Trace diagram is an open-source agent skill for developer tools. Draws a Grafana Tempo trace as an interactive sequence diagram, without diagnosing it. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/whitebeardit/claude-plugins/tree/main/sherlock-holmes/skills/trace-diagram
- **Repository:** https://github.com/whitebeardit/claude-plugins
- **GitHub stars:** 13
- **License:** MIT
- **Skill name:** trace-diagram
- **Collection:** https://github.com/whitebeardit/claude-plugins
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

This skill turns the spans of a single trace id into a self-contained, interactive sequence diagram rendered with archify. It collects the trace through a bundled Python collector that reads Grafana Tempo, optionally joining warn and error log lines from Loki as notes on the diagram, then runs a second script to produce the HTML output.

The workflow is deliberately limited to showing evidence. The agent reports the services in call order, the root span, span counts, error-status spans, trace duration and the first recorded failure, using only recorded timestamps, and it is told not to speculate about causes. Investigating why a request failed is handled by a separate debugging skill.

It expects a 16- or 32-character hex trace id or a W3C traceparent, a configured Grafana instance with Tempo and optionally Loki datasources, and Python 3.8+ plus Node for archify. The skill is read-only and only runs the two bundled scripts.

## When your agent uses it

> Draw a trace as an interactive, self-contained sequence diagram (archify) from its Grafana Tempo spans, without investigating it. Use when the user wants to see, share or export the call sequence of a trace id - who called whom, where the time went, which span failed first - and does not ask why it failed. Evidence only. Read-only.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/whitebeardit/claude-plugins/tree/HEAD/sherlock-holmes/skills/trace-diagram)
- [Asks for: Bash(python3 *collect-trace.py*), Bash(python3 *trace-diagram.py*), Read, Bash(python *collect-trace.py*), Bash(py -3 *collect-trace.py*), Bash(python *trace-diagram.py*), Bash(py -3 *trace-diagram.py*)](https://github.com/whitebeardit/claude-plugins/blob/HEAD/sherlock-holmes/skills/trace-diagram/SKILL.md)
- [License: MIT](https://github.com/whitebeardit/claude-plugins/tree/HEAD/sherlock-holmes/skills/trace-diagram)

## Features

- **Sequence diagram from spans:** Renders the call sequence of a trace id as a sequence diagram showing which service called which.
- **Evidence-only summary:** Reports service order, root span, error spans, duration and first failing span without diagnosing causes.
- **Log notes on spans:** Attaches warn and error log lines from Loki to matching spans when that data is available.
- **Self-contained HTML output:** Produces an HTML file that can be opened in a browser and shared or exported as PNG or SVG.
- **Interactive navigation:** Lets readers search for a participant, trace a route between two participants and play guided chapters.
- **Offline fixtures:** Supports bundled fixture cases so the diagram can be drawn without a live Grafana connection.

## Good for

- Show the call sequence of a trace id I received from a colleague
- Export a sequence diagram of a slow request for a postmortem document
- See which downstream service a failing request reached first
- Draw a fixture trace to check how the diagram renders

## Install

### Claude Code

This skill ships in the `sherlock-holmes` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add whitebeardit/claude-plugins
/plugin install sherlock-holmes@whitebeard-plugins
```

Or copy only this skill to `~/.claude/skills/trace-diagram`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/whitebeardit/claude-plugins.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/trace-diagram &&
cp -R "$tmp/sherlock-holmes/skills/trace-diagram" ~/.claude/skills/trace-diagram &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/trace-diagram` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/trace-diagram` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/whitebeardit/claude-plugins.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/trace-diagram &&
cp -R "$tmp/sherlock-holmes/skills/trace-diagram" ~/.agents/skills/trace-diagram &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/trace-diagram` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/trace-diagram` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/whitebeardit/claude-plugins.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/trace-diagram &&
cp -R "$tmp/sherlock-holmes/skills/trace-diagram" ~/.cursor/skills/trace-diagram &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/trace-diagram` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/whitebeardit/claude-plugins.git --path sherlock-holmes/skills/trace-diagram
```

Or copy the folder to `~/.gemini/skills/trace-diagram` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/trace-diagram`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/whitebeardit/claude-plugins.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/trace-diagram &&
cp -R "$tmp/sherlock-holmes/skills/trace-diagram" ~/.copilot/skills/trace-diagram &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/trace-diagram` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/whitebeardit/claude-plugins.git
```

Then copy `claude-plugins/sherlock-holmes/skills/trace-diagram` into your agent's skills folder as `trace-diagram`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Trace diagram need to run?

It needs Python 3.8+, a configured Grafana instance with a Tempo datasource, and archify with Node to render the diagram.

### Does Trace diagram explain why a request failed?

No. It only draws the trace and reports recorded facts. For a root-cause investigation it points to a separate trace-debug skill.

### Does Trace diagram change anything in my system?

No, the skill is described as read-only and runs only the bundled collector and diagram scripts.

### What input does Trace diagram accept?

A 16- or 32-character hex trace id or a W3C traceparent, plus optional flags such as --around, --lookback or --fixture.

### How do I install Trace diagram in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/trace-diagram to use it in all your projects, or to .claude/skills/trace-diagram in one project. Or install the sherlock-holmes plugin, which includes it: /plugin marketplace add whitebeardit/claude-plugins, then /plugin install sherlock-holmes@whitebeard-plugins.

### Does Trace diagram run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Trace diagram?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

### What are the best alternatives to Trace diagram?

The closest alternatives to Trace diagram are Trace debug, Error sweep, Setup, Otel tracing and Trace debugging.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Trace debug](https://ai-powered.com/skills/trace-debug): Trace debug is an open-source agent skill for developer tools.
- [Error sweep](https://ai-powered.com/skills/error-sweep): Error sweep is an open-source agent skill for developer tools.
- [Setup](https://ai-powered.com/skills/setup-whitebeardit): Setup is an open-source agent skill for developer tools.
- [Otel tracing](https://ai-powered.com/skills/otel-tracing-ajyadav013-2): Otel tracing is an open-source agent skill for developer tools.
- [Trace debugging](https://ai-powered.com/skills/trace-debugging): Trace debugging is an open-source agent skill for developer tools.
- [Trace architecture](https://ai-powered.com/skills/trace-architecture): Trace architecture is an open-source agent skill for developer tools.
- [Trace the flow](https://ai-powered.com/skills/trace-the-flow): Trace the flow is an open-source agent skill for developer tools.
- [Arize trace](https://ai-powered.com/skills/arize-trace): Arize trace is an open-source agent skill for ai models and llm tooling.

---
Source: https://ai-powered.com/skills/trace-diagram
