diagnose

diagnose is a skill for Claude Code, Codex from DeevsDeevs/agent-system. It costs 35 tokens per session (941 once invoked), scanned A, original, Apache-2.0.

A structured debugging method for broken behavior, failed builds, flaky commands, stuck processes, and regressions. It makes the symptom observable, proves the cause, applies the smallest fix, and checks the original failure again.

In plain words
What is it for?
Use it to define expected versus actual behavior, locate the relevant code and logs, reproduce the issue with focused commands, and verify the repair.
Why use it?
It prevents guessing and unrelated changes when the problem is unclear. A fast, repeatable test or reproduction loop provides evidence for both the diagnosis and the fix.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to define expected versus actual behavior, locate the relevant code and logs, reproduce the issue with focused commands, and verify the repair.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/deevsdeevs/agent-system/diagnose
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.

Any agent
npx skills add DeevsDeevs/agent-system --skill diagnose
Clone the repo
git clone --depth 1 https://github.com/DeevsDeevs/agent-system

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 diagnose

README.md
[![agentmods](https://agentmods.dev/badge/skills/deevsdeevs/agent-system/diagnose/github.svg)](https://agentmods.dev/skills/deevsdeevs/agent-system/diagnose)
Your own site
<a href="https://agentmods.dev/skills/deevsdeevs/agent-system/diagnose"><img src="https://agentmods.dev/badge/skills/deevsdeevs/agent-system/diagnose/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 diagnose

Your own site · 80×15
<a href="https://agentmods.dev/skills/deevsdeevs/agent-system/diagnose"><img src="https://agentmods.dev/badge/skills/deevsdeevs/agent-system/diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 941 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.00035 $0.00941
Opus 5.5 $0.00014 $0.00376
Sonnet 5.5 $0.00007 $0.00188
Haiku 4.5 $0.00003 $0.00094

Measured 27d ago against content hash c0960d281a48, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 27d 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.

skills/diagnose/SKILL.md · 70 lines

How it starts

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

Diagnose

Use when correctness is uncertain. Do not patch from vibes: make the bug observable, prove the cause, fix the smallest thing, verify against the original symptom. Use the target repo's native build/test/runtime commands as the evidence loop.

1. Define the symptom

Expected: ...
Actual: ...
Observed in: command/log/file/process id/agent id/artifact id

If the report is vague, ask for the missing observable (exact command, stack trace, id, log path, repro steps). Do not chase unrelated warnings until they connect to this symptom.

2. Orient just enough

Identify only the smallest relevant area: repo root/cwd, package/crate/service, entrypoint triggering the symptom, closest test/fixture/log source, and expensive commands to avoid. Never map the whole codebase.

3. Build the feedback loop

Find the fastest deterministic loop that reaches the bug, e.g. cargo test -p <crate> <filter> -- --nocapture, a focused unit test, a CLI run on fixture input, a request script against a dev server, a replay of a captured event, or a small throwaway harness when no seam exists.

  • Slow repro loops and servers: run them in hc (hc run --bg, then hc wait or hc wait --output <ready line>; see the hc skill) — never &, nohup, disown, setsid.
  • Subagents only for independent investigation, tightly scoped with cwd and exact files; continue other runnable probes while it runs; its report arrives by itself.
  • For long diagnoses, save a chain link (chains skill) with the symptom, repro command, hypotheses tested, files touched, ids, and next step.

Do not proceed until the loop reproduces the bug or proves more evidence is needed.

4. Reproduce and minimize

Confirm the loop matches the user's symptom, not a nearby failure. Then reduce to the smallest file set, command, input, and package, and the shortest log excerpt that proves the problem. For flaky bugs, raise the reproduction rate: repeat, isolate shared state, pin cwd, tune concurrency/stress, record pass/fail counts.

Read the full file on GitHub · 70 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. 27d ago First seen · 70 lines · 35 tokens per session scan A c0960d281a48

Subscribe to this mod's changes

diagnose is a skill published in the GitHub repository DeevsDeevs/agent-system (42 stars, last pushed 2d ago), licensed Apache-2.0. It adds 35 tokens to every session and 941 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-11-05.

Related

diagnose compared with skills from other repositories

diagnose next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
diagnoseDeevsDeevs/agent-systemSkill422d agoApache-2.0A35Claude Code, Codex
doca-flowNVIDIA/skillsSkill4.3ktodayApache-2.0A224Claude Code
compute-sanitizer-diagnose-cuda-bugsNVIDIA/skillsSkill4.3ktodayApache-2.0A213Claude Code, Codex
tao-analyze-gaps-visual-changenetNVIDIA/skillsSkill4.3ktodayApache-2.0A103Claude Code
doca-debugNVIDIA/skillsSkill4.3ktodayApache-2.0A234Claude Code
compileiq-author-objectiveNVIDIA/skillsSkill4.3ktodayApache-2.0A150Claude Code
compileiq-debugNVIDIA/skillsSkill4.3ktodayApache-2.0A125Claude Code