diagnostician

diagnostician is an agent for Claude Code from datit309/supergraph. It costs 37 tokens per session (727 once invoked), scanned A, original, MIT.

A root-cause debugging assistant for persistent or difficult failures. It reproduces problems, narrows them to a small example, and tests explanations before suggesting a minimal fix.

In plain words
What is it for?
Use it when tests or runtime commands keep failing, especially after earlier fixes have not worked. Provide the failure output, reproduction command, recent changes, and prior attempts.
Why use it?
It avoids repeated blind patches by separating the visible symptom from the underlying cause, including timing, race-condition, test-order, and type-related problems.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents.

Part of the supergraph plugin — 42 skills, 7 agents, 6 hooks shipped together

Good fit Use it when tests or runtime commands keep failing, especially after earlier fixes have not worked. Provide the failure output, reproduction command, recent changes, and prior attempts.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/datit309/supergraph/diagnostician
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.

Clone the repo
git clone --depth 1 https://github.com/datit309/supergraph

Made for: Claude Code.

Or install supergraph, the plugin that ships this one along with the rest of its 42 skills, 7 agents, 6 hooks.

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 diagnostician

README.md
[![agentmods](https://agentmods.dev/badge/agents/datit309/supergraph/diagnostician/github.svg)](https://agentmods.dev/agents/datit309/supergraph/diagnostician)
Your own site
<a href="https://agentmods.dev/agents/datit309/supergraph/diagnostician"><img src="https://agentmods.dev/badge/agents/datit309/supergraph/diagnostician/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for diagnostician

Your own site · 80×15
<a href="https://agentmods.dev/agents/datit309/supergraph/diagnostician"><img src="https://agentmods.dev/badge/agents/datit309/supergraph/diagnostician.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 727 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00037 $0.00727
Opus 5.5 $0.00015 $0.00291
Sonnet 5.5 $0.00007 $0.00145
Haiku 4.5 $0.00004 $0.00073

Measured today against content hash 2340991e3dc7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

diagnostician 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 today.

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.

plugins/supergraph/agents/diagnostician.md · 83 lines

How it starts

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

Diagnostician Agent

Act as an independent Senior Debugging & Diagnostics Specialist. Isolate and identify root causes for complex, elusive, or persistent failures. Do not rush to patch code blindly; apply scientific method to prove theories before proposing minimal fixes.

Inputs Expected

The prompt must provide:

  • Failure description and console/test output
  • Command that reproduces the failure
  • Scope of recent changes or suspect files
  • Prior failed fix attempts (if auto-fix loop exhausted)

Process

Implementers of this role must not spawn subagents. Conduct the diagnosis directly and return a Root Cause Diagnostic Brief to the controller.

1. Build Deterministic Feedback Loop

Run the reproduction command and verify it fails consistently:

  • If intermittent: identify timing dependencies, race conditions, unmocked network calls, or test ordering issues.
  • Isolate the minimal reproduction command (e.g. running one single test instead of full suite).

2. Deep Graph & Symbol Evidence Gathering

Use MCP tools for non-invasive structural inspection:

  • Serena LSP:
    • get_diagnostics_for_file(relative_path=...) → Check underlying type mismatches or hidden compiler warnings.
    • find_referencing_symbols / find_implementations → Trace caller hierarchy and interface drift.
  • Codebase Memory:
    • search_graph → Inspect caller/callee signatures.
    • trace_path → Trace cross-module data flow from input to failure point.
    • detect_changes → Check recently modified files for co-change blast radius.

3. Formulate Ranked Falsifiable Hypotheses

Formulate at least 2 ranked theories:

  • Theory 1 (Most Likely): Cause + condition + specific mechanism.
    • Falsification Test: If I change X, behavior Y must happen.
  • Theory 2 (Alternative): Cause + condition + specific mechanism.
    • Falsification Test: If I inspect Z, value W must be present.

4. Instrument One Variable at a Time

  • Test the top-ranked theory by modifying or asserting exactly one variable.
  • Never change multiple things simultaneously.
  • If falsified, move immediately to Theory 2.

Read the full file on GitHub · 83 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. today First seen · 83 lines · 37 tokens per session scan A 2340991e3dc7

Subscribe to this mod's changes

diagnostician is an agent published in the GitHub repository datit309/supergraph (22 stars, last pushed yesterday), licensed MIT. It adds 37 tokens to every session and 727 once invoked, about $0.0001 per session on Opus 5.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-10-16.

Related

Other agents, from other repositories

bug-investigator

Use when a bug, regression, or unexpected behaviour needs its root cause traced to specific code before any fix is designed. Investigates only — never edits files. Returns a structured report citing file:line evidence.

kardebadas/claude-plugin · 46 tokens

claim-validator

Use this agent to validate specific factual claims extracted from AI context files against the actual codebase — checks paths, versions, symbols, counts, commands, and dependencies.

knitli/toolshed · 36 tokens

developers

VP of Engineering who leads six skills — superpowers (engineering protocols), context7 (live library docs), mcp-builder (MCP servers), skill-creator (new skills), webapp-testing (browser QA), claude-mem (persistent memory). Use PROACTIVELY for any coding, debugging, testing, docs-lookup, MCP-server, skill-authoring or…

alebgl77/claude-inc · 124 tokens

pipeline-auto-brain

Use only when superb:pipeline-auto dispatches its three brains — to answer one blocking question in a quorum, or at stage 02 to propose the open decisions for the one human gate. One of three independently-briefed readers; returns one strict JSON object in the shape its prompt names, nothing else. Never dispatched by…

kardebadas/claude-plugin · 73 tokens

pipeline-auto-intent-reader

Use only at superb:pipeline-auto stage 01, to read what the user actually asked for and return it as a strict JSON hypothesis. One of three independent readers. Reads and reports; never designs, never proposes, never chooses a stack.

kardebadas/claude-plugin · 55 tokens

architecture-discovery

Use when a product idea needs its technical decisions surfaced as questions before any of them are made — invoked by superb:craft once per session, after the idea is stated and before the first question round, for software projects whose stack is not yet decided. Returns candidate questions only; never chooses a stack…

kardebadas/claude-plugin · 68 tokens