trace-analyzer

trace-analyzer is an agent for coding agents from Not-Diamond/self-care. It costs 9 tokens per session (3,969 once invoked), scanned A, original, MIT.

An agent that analyzes trace files to detect cases, where a case is a repeatable situation or issue found in the recorded activity. It coordinates specialized agents and keeps memory of cases across runs.

In plain words
What is it for?
Use it to inspect agent traces, detect tool failures and repeated steps, compute trace or case identifiers, and produce reports or persistent case records.
Why use it?
It turns raw trace data into organized case findings and helps compare new traces with issues found previously.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the self-care plugin — 12 commands, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/not-diamond/self-care/trace-analyzer
Clone the repo
git clone --depth 1 https://github.com/Not-Diamond/self-care

Or install self-care, the plugin that ships this one along with the rest of its 12 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trace-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/agents/not-diamond/self-care/trace-analyzer.svg)](https://agentmods.dev/agents/not-diamond/self-care/trace-analyzer)
Your own site
<a href="https://agentmods.dev/agents/not-diamond/self-care/trace-analyzer"><img src="https://agentmods.dev/badge/agents/not-diamond/self-care/trace-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,969 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00009 $0.03969
Opus 5 $0.00005 $0.01985
Sonnet 5 $0.00002 $0.00794
Haiku 4.5 $0.00001 $0.00397

Measured 3d ago against content hash 1639edd236c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

trace-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/trace-analyzer.md · 385 lines

How it starts

The opening of the file, as written. The whole thing — 385 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trace Analyzer

You orchestrate case detection by spawning skill agents via the Task tool, with persistent memory for tracking cases across runs.

Permitted Bash Commands

You may ONLY use Bash for commands that require shell piping or system utilities. All other operations MUST use their dedicated tools (Read for file reading, Grep for pattern matching, Write for file writing).

Allowed Bash patterns:

  • shasum -a 256 <file> | cut -c1-16 — trace/case hash computation
  • echo -n '<json>' | shasum -a 256 | cut -c1-16 — case hash computation
  • grep -o '<pattern>' <file> | sort | uniq -c | sort -rn | head -N — frequency counting
  • mkdir -p <path> — directory creation (only for .self-care/memory/, .self-care/reports/, or .self-care/traces/)
  • date -u +"%Y-%m-%dT%H:%M:%SZ" — UTC timestamp
  • node "${CLAUDE_PLUGIN_ROOT}/agents/tools/check-tool-failure.mjs" <file> — deterministic tool-failure detection
  • node "${CLAUDE_PLUGIN_ROOT}/agents/tools/check-step-repetition.mjs" <file> — deterministic step-repetition detection
  • node "${CLAUDE_PLUGIN_ROOT}/agents/tools/precheck-missed-action.mjs" <file> — pre-check signals for missed-action
  • node "${CLAUDE_PLUGIN_ROOT}/agents/tools/precheck-premature-termination.mjs" <file> — pre-check signals for premature-termination
  • node "${CLAUDE_PLUGIN_ROOT}/agents/tools/precheck-goal-drift.mjs" <file> — pre-check signals for goal-drift

Everything else MUST use dedicated tools. In particular:

  • Pattern matching without pipes → use the Grep tool
  • Reading files → use the Read tool
  • Writing files → use the Write tool

Input

You will receive:

  1. A file path to a validated trace file (OTEL JSON or Claude Code JSONL)
  2. The detected format (OTEL or Claude Code)
  3. (Optional) A pre-computed trace hash (16-character hex string)
  4. (Optional) User-provided context describing the agent being analyzed (e.g. its purpose, domain, expected behavior)
  5. (Optional) Analysis configuration from run.md:
    • disabledSkills: Array of skill IDs to skip during analysis
    • severityOverrides: Map of skill ID to severity (e.g., {"tool-failure": "low"})
    • agentContext: User-provided description of expected agent behavior (from .self-care/context.md)

Read the full file on GitHub · 385 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 385 lines · 9 tokens per session scan A 1639edd236c0

Subscribe to this mod's changes

trace-analyzer is an agent published in the GitHub repository Not-Diamond/self-care (28 stars, last pushed 4mo ago), licensed MIT. It adds 9 tokens to every session and 3,969 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

playwright-test-generator

Use this agent to convert a SigNoz E2E test plan into Playwright spec files under tests/e2e/tests/ /. Examples — Context: A test plan exists and needs to be turned into runnable specs. user: 'Generate the dashboards list specs from the plan in tests/e2e/specs/dashboards-list-test-plan.md' assistant: 'Using the…

SigNoz/signoz · 0 tokens

playwright-test-healer

Use this agent to debug and fix failing SigNoz E2E Playwright tests. Examples — Context: A spec is red. user: 'tests/e2e/tests/dashboards/list.spec.ts is failing, fix it' assistant: 'Using the healer agent to debug each failing scenario and adjust the spec.' Context: After a frontend change a previously-green spec…

SigNoz/signoz · 0 tokens

playwright-test-planner

Use this agent to create a comprehensive E2E test plan for a SigNoz frontend feature. Examples — Context: A new feature has shipped and we need test coverage. user: 'Plan E2E tests for the alerts list page' assistant: 'I'll use the planner agent to read the relevant frontend source, navigate the page in a real…

SigNoz/signoz · 0 tokens

codex

Production OpenAI-Codex-capable rootfs/initramfs.

the-void-ia/void-box · 0 tokens

claude

Production Claude-capable rootfs/initramfs.

the-void-ia/void-box · 0 tokens

doc-style

Markdown documentation prose — RFCs, ADRs, files under docs/, and READMEs — follows the same one-paragraph-per-line rule as commit messages. Write each paragraph on a single line; do not hard-wrap prose to a fixed column. The renderer reflows it to the reader's display width, whereas manual mid-paragraph line breaks…

the-void-ia/void-box · 0 tokens