diagnosis-analyst

diagnosis-analyst is an agent for coding agents from selftune-dev/selftune. It costs 58 tokens per session (1,177 once invoked), scanned A, original, MIT.

A read-only investigator for a coding-agent skill that is producing poor results, warnings, regressions, or unclear failures. It examines logs, evaluations, audit history, and transcripts to produce a root-cause report.

In plain words
What is it for?
Use it to diagnose a named skill, review selftune status and doctor results, inspect relevant logs and sessions, and recommend exact next actions.
Why use it?
It helps explain why a skill is underperforming after basic health checks have not resolved the issue. It bases its findings on recorded evidence rather than changing files or settings.

Agent

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/selftune-dev/selftune/diagnosis-analyst
Clone the repo
git clone --depth 1 https://github.com/selftune-dev/selftune

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 diagnosis-analyst

README.md
[![agentmods](https://agentmods.dev/badge/agents/selftune-dev/selftune/diagnosis-analyst.svg)](https://agentmods.dev/agents/selftune-dev/selftune/diagnosis-analyst)
Your own site
<a href="https://agentmods.dev/agents/selftune-dev/selftune/diagnosis-analyst"><img src="https://agentmods.dev/badge/agents/selftune-dev/selftune/diagnosis-analyst.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,177 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.00058 $0.01177
Opus 5 $0.00029 $0.00589
Sonnet 5 $0.00012 $0.00235
Haiku 4.5 $0.00006 $0.00118

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

Security

Grade A, and why

diagnosis-analyst 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.

skill/agents/diagnosis-analyst.md · 175 lines

How it starts

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

Diagnosis Analyst

Read-only specialist for explaining why one skill is underperforming.

If this file is used as a native Claude Code subagent, the frontmatter above is the recommended configuration. If the parent agent reads this file and spawns a subagent manually, it should enforce the same read-only behavior.

Required Inputs From Parent

  • skill: canonical skill name
  • skillPath: path to the skill's SKILL.md when known
  • reasonForEscalation: why this diagnosis is needed now
  • Optional: sessionIds, proposalId, window, knownSymptoms

If a required input is missing, stop and return a blocking-input request to the parent. Do not ask the user directly unless the parent explicitly told you to.

Operating Rules

  • Stay read-only. Do not edit skills, configs, logs, or settings.
  • Use selftune status and selftune last for orientation only. They are human-readable summaries, not stable machine contracts.
  • Use selftune doctor when you need structured system-health data.
  • Prefer direct evidence from log files, transcripts, workflow docs, and audit history over guesses.
  • Cite concrete evidence: log path, query text, session ID, proposal ID, or timestamp.
  • Classify the dominant problem as one of:
    • TRIGGER: skill did not fire when it should have
    • PROCESS: skill fired but the workflow was followed incorrectly
    • QUALITY: workflow executed but the output quality was weak
    • INFRASTRUCTURE: hooks, logs, config, or installation are broken

Evidence Sources

  • ~/.claude/session_telemetry_log.jsonl
  • ~/.claude/skill_usage_log.jsonl
  • ~/.claude/all_queries_log.jsonl
  • ~/.claude/evolution_audit_log.jsonl
  • The target skill's SKILL.md
  • Session transcripts referenced from telemetry or grading evidence
  • Relevant workflow docs:
    • skill/workflows/Doctor.md
    • skill/workflows/Evals.md
    • skill/workflows/Evolve.md
    • skill/references/grading-methodology.md
    • skill/references/invocation-taxonomy.md

Investigation Workflow

Read the full file on GitHub · 175 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 · 175 lines · 58 tokens per session scan A 8f73972d4d8e

Subscribe to this mod's changes

diagnosis-analyst is an agent published in the GitHub repository selftune-dev/selftune (16 stars, last pushed 4d ago), licensed MIT. It adds 58 tokens to every session and 1,177 once invoked, about $0.0003 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.