self-diagnose

self-diagnose is a skill for Claude Code, Codex from sonichi/sutando. It costs 47 tokens per session (928 once invoked), scanned A, original, MIT.

A self-review tool that reads the coding agent's logs, code history, stored notes, build records, and health checks for a chosen period. It produces a short account of recent work, failures, and suggested priorities.

In plain words
What is it for?
Use it to review recent agent activity, find errors or unresolved issues, and decide what to work on next based on recorded evidence.
Why use it?
It gathers scattered evidence into one report, making it easier to understand what happened and which problems need attention.

Skill for Claude CodeCodex

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 skills/sonichi/sutando/self-diagnose
Any agent
npx skills add sonichi/sutando --skill self-diagnose
Clone the repo
git clone --depth 1 https://github.com/sonichi/sutando

Made for: Claude Code, Codex.

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 self-diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/sonichi/sutando/self-diagnose.svg)](https://agentmods.dev/skills/sonichi/sutando/self-diagnose)
Your own site
<a href="https://agentmods.dev/skills/sonichi/sutando/self-diagnose"><img src="https://agentmods.dev/badge/skills/sonichi/sutando/self-diagnose.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 928 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.00047 $0.00928
Opus 5 $0.00023 $0.00464
Sonnet 5 $0.00009 $0.00186
Haiku 4.5 $0.00005 $0.00093

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

Security

Grade A, and why

self-diagnose 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 5d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/capped-capture.sh, scripts/gather-remote.sh, scripts/gather.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/self-diagnose/SKILL.md · 73 lines

How it starts

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

Self-Diagnose

Read Sutando's own observable state (logs, git, memory, build log, pending questions, health check, cold-review log) over a chosen window and produce a structured narrative:

  • What's been happening — significant events, PRs shipped, tasks processed, user interactions
  • What's broken — errors in logs, pending questions, health-check failures, 1006/1011/1007 transport events, unresolved bugs surfaced in logs
  • What I'd do next — concrete prioritized actions grounded in what was observed

Usage: /self-diagnose [--since 24h]

ARGUMENTS: $ARGUMENTS

Flow

  1. Gather. Run bash skills/self-diagnose/scripts/gather.sh [window] — collects log tails, git log, build_log.md tail, pending-questions, health-check output, cold-review-log, and recent Discord activity into /tmp/sutando-diagnose-<ts>/.
  2. Synthesize. Read each gathered file. Group findings under the three headings above. Be concrete: cite log lines, PR numbers, timestamps. Skip speculation.
  3. Save. Write the report to notes/diagnose-YYYY-MM-DD-HHMM.md with frontmatter (title, date, tags: [diagnose, self]).
  4. Summarize. Reply to the caller with a 5–10 line executive summary + path to the full report.

Cross-node mode (resolves #421)

When Sutando works on one machine but is broken on another, the helper script runs gather.sh on both sides over SSH and produces a structured comparison:

bash skills/self-diagnose/scripts/gather-remote.sh <ssh-target> [window]
# e.g.
bash skills/self-diagnose/scripts/gather-remote.sh mac-mini
bash skills/self-diagnose/scripts/gather-remote.sh [email protected] 6h

Output: /tmp/sutando-diagnose-cross-<ts>/{local,remote,diff.md} plus a persisted copy at notes/diagnose-cross-node-<YYYY-MM-DD>.md. The comparison report surfaces commit drift, health-check differences, voice-agent error counts, quota state, and PR-view divergence per side.

Override the remote sutando path via SUTANDO_REMOTE_REPO=/path/on/peer if the failing node's checkout isn't at the default ~/Desktop/sutando.

Read the full file on GitHub · 73 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 5d ago First seen · 73 lines · 47 tokens per session scan A 0a20271548ac

Subscribe to this mod's changes

self-diagnose is a skill published in the GitHub repository sonichi/sutando (391 stars, last pushed today), licensed MIT. It adds 47 tokens to every session and 928 once invoked, about $0.0002 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.