/sherlock-holmes:error-sweep [--last 2h | --start <t> --end <t>] [--service <name>] [--fixture <dir>]from Sherlock Holmes
Lists errors from a time window as a numbered table using Grafana Tempo and Loki, then lets users explore traces or investigate further. Use when asking about recent errors.
Ships in Sherlock Holmes. 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.
Read when SKILL.md points to them.
Answer "were there errors in this period, where, how many, since when" with facts. A script builds the answer; you only run it, show it, and act on what the user picks from it.
$ARGUMENTS may hold a window (--last 2h, or --start <time> --end <time>, ISO-8601 or epoch), a
service (--service <name>) and --fixture <dir>. No window given: use --last 2h and say so.
A window in words ("yesterday between 14h and 16h") becomes --start/--end in UTC; say which
absolute times you used.
Bundled fixtures. Three recorded scenarios live at ${CLAUDE_PLUGIN_ROOT}/skills/error-sweep/fixtures/<case>/
(cascade, timeouts, silence), each with its own window. When the user asks for the demo,
sample or bundled fixtures, pass that absolute path to --fixture, resolved under
${CLAUDE_PLUGIN_ROOT}, never the working directory.
Python command. The commands below start with python3. If the shell answers "command not
found", or python3 opens the Microsoft Store (Windows, where the python.org installer provides
python and py instead), run the same command with python in place of python3 - or py -3 -
and change nothing else; keep using that one for the rest of the session. If none of the three
exists, stop and tell the user: install Python 3.8+ (on Windows from python.org, ticking "Add
python.exe to PATH"), then fully close and reopen the editor or terminal that runs Claude Code, since
it reads PATH only when it starts.
This installation was configured with:
${user_config.grafana_url}${user_config.grafana_loki_uid}${user_config.grafana_tempo_uid}${user_config.loki_selector}Pass each real value as --grafana-url, --grafana-loki-uid, --grafana-tempo-uid, --selector.
Skip blanks and unreplaced ${...} placeholders. Never put a credential on the command line.
python3 "${CLAUDE_PLUGIN_ROOT}/skills/trace-debug/scripts/sweep-errors.py" --format table [window] [--service <name>] [config flags] [--fixture <dir>]
One command, exactly that shape: no cd, &&, pipes or redirection. At most two runs per request
(a second only if the user changes the window or the service). On "no access configured" or an
HTTP 401/403 for every source, run
python3 "${CLAUDE_PLUGIN_ROOT}/skills/trace-debug/scripts/collect-trace.py" doctor and report the
configuration problem, or point the user at /sherlock-holmes:setup.
Put the script's output in a code block, exactly as printed, in full: every row, the "Not covered" footer and the "Next" line. Then one sentence in the user's language offering the choice below. Nothing else.
Never:
known - the mark comes from the team's priors file, and
the row is shown on purpose;The user answers with a row number and what they want.
"diagram N" - take the first trace id listed under row N and draw it (cheap, no model):
python3 "${CLAUDE_PLUGIN_ROOT}/skills/trace-debug/scripts/collect-trace.py" --trace-id <trace id> --source tempo --format prompt [config flags]
then, with the path printed after FULL JSON:,
python3 "${CLAUDE_PLUGIN_ROOT}/skills/trace-debug/scripts/trace-diagram.py" --input <that path>
and give the user its one diagram: line verbatim. If Tempo does not have that trace, say so and
offer the row's next example. Offline: the cascade fixture's most recent trace,
2aa803b2e40c97a2490d754a465fe9de, is recorded in
${CLAUDE_PLUGIN_ROOT}/evals/fixtures/01-downstream-503 - pass that as --fixture to the collector.
The other fixture traces have no recording; say so instead of guessing.
"map" - draw every call recorded in the window's error traces as one sequence diagram (no model):
python3 "${CLAUDE_PLUGIN_ROOT}/skills/trace-debug/scripts/window-map.py" --start <start> --end <end> [--service <name>] [config flags] [--fixture <dir>]
with <start>/<end> copied from the table's header (the absolute window, so the map describes
exactly the swept window), the same --service and the same --fixture as the sweep. Give the user
the script's output verbatim - the map: line and every line under it (the arrows, what is not in
the map, the reading note) - in a code block, and nothing else. Do not open, read or search the
HTML: everything there is to say about the map is in those lines. Each arrow is one kind of call,
counted once; a sweep row counts one side of a call, so rows outnumber arrows by design. It shows
what happened, not why: never read a cause into it.
"investigate N" - invoke /sherlock-holmes:trace-debug <first trace id of row N> (add the
--fixture above for the cascade demo). That is the only step here that runs an agent, and it runs
because the user asked for it.
Anything else about a row (which services, when it started, how many) - answer only from the table.
fixtures/cascade/loki.json (opens in a new tab)fixtures/cascade/tempo-search.json (opens in a new tab)fixtures/cascade/traces/0e1f2a3b4c5d6e7f8091a2b3c4d5e6f7/tempo.json (opens in a new tab)fixtures/cascade/traces/2aa803b2e40c97a2490d754a465fe9de/tempo.json (opens in a new tab)fixtures/cascade/traces/5b1e0c2a9f7d4e3b8a6c1d2e3f4a5b6c/tempo.json (opens in a new tab)fixtures/cascade/traces/6c2f1d3b0a8e5f4c9b7d2e3f4a5b6c7d/tempo.json (opens in a new tab)fixtures/cascade/traces/7d3a2e4c1b9f6a5d0c8e3f4a5b6c7d8e/tempo.json (opens in a new tab)fixtures/cascade/window.json (opens in a new tab)fixtures/generate.py (opens in a new tab)fixtures/silence/loki.json (opens in a new tab)fixtures/silence/tempo-search.json (opens in a new tab)fixtures/silence/window.json (opens in a new tab)fixtures/timeouts/tempo-search.json (opens in a new tab)fixtures/timeouts/traces/4c6d267f572b39fd37c4461da9948f0c/tempo.json (opens in a new tab)fixtures/timeouts/traces/54c13ffdf5dbc353f82b8493c0576953/tempo.json (opens in a new tab)fixtures/timeouts/traces/6705bd940faa23c5b097e8bf4f980931/tempo.json (opens in a new tab)fixtures/timeouts/window.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub whitebeardit/claude-plugins --plugin sherlock-holmes4 skills in this plugin
/setupGuided first-run setup for Sherlock Holmes, in one conversation - checks Grafana access with the doctor, discovers the Loki and Tempo datasource UIDs, proposes the Loki stream selector from the labels your Loki really has, hands over the exact /config values, optionally installs archify for the trace diagram, and verifies the result. Use right after installing the plugin, whenever the doctor reports a configuration problem, or when the user asks how to configure or set up Sherlock Holmes. Changes nothing in production./trace-debugInvestigate a production incident from a trace ID using Grafana Loki logs and Grafana Tempo traces. Use whenever the user provides a trace id or W3C traceparent and wants to know why a request failed, hung, was slow or misbehaved. Evidence-first - timeline, first anomalous event, causal chain, confidence, gaps. Optionally renders the span tree as an interactive sequence diagram (archify), evidence only. Read-only. The skill returns a finished report; present it to the user exactly as returned, in full, without summarizing or reformatting it./trace-diagramDraw 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.Other plugins' skills for the same job