Agent skill

Dr Diagnose

by AHepi in AHepi/DeepReason

Locate the cause of a DeepReason defect from the typed record, not from code reading.

MITAuto-check passed

Install Dr Diagnose

skills CLI
$ npx skills add AHepi/DeepReason --skill dr-diagnose -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install AHepi/DeepReason dr-diagnose --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/AHepi/DeepReason.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/dr-diagnose .claude/skills/dr-diagnose && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dr-diagnose
GitHub stars
141
Token cost
~1.6k tokens
SKILL.md length
894 words
Files
1
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

Locate the cause of a DeepReason defect from the typed record, not from code reading.

  • Works in 6 steps: /run-status.json — state, stop_reason,… → Cycle heartbeats — which problem each… → Work attribution — join… → …
  • SKILL.md covers Step 1 — run the stop report,…, Read the map's Traps SECOND —…, Where the truth lives — the… and Discipline, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Dr Diagnose is an agent skill from AHepi/DeepReason. Locate the cause of a DeepReason defect from the typed record, not from code reading. Produces DIAGNOSIS.md naming one primary cause with evidence pointers. Use only after GOAL.md exists.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The licence is MIT.

Example prompts

  • “/dr-diagnose”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. /run-status.json — state, stop_reason, message. The message
  2. Cycle heartbeats — which problem each cycle actually worked
  3. Work attribution — join objects/workflow-work-preparation-v1/*
  4. REPLAY_VALIDATION.json / verify_root() — violations with
  5. Raw model output — resolve a provider attempt's raw_ref in
  6. Capability chain — harness.capability_state: proposals,

What it can do on your machine

Read from SKILL.md and the folder at commit 9607fba. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dr Diagnose loads about 1.6k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 894 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from AHepi/DeepReason at commit 9607fba, republished under its MIT licence (© AHepi). 894 words, ~1,622 tokens.

Download SKILL.mdSave it as .claude/skills/dr-diagnose/SKILL.md (or your agent's skills folder).
name
dr-diagnose
description
Locate the cause of a DeepReason defect from the typed record, not from code reading. Produces DIAGNOSIS.md naming one primary cause with evidence pointers. Use only after GOAL.md exists.

Diagnose from the record

Input: GOAL.md. Output: DIAGNOSIS.md naming ONE primary cause. You read the record first and the code second. You change nothing.

Step 1 — run the stop report, and open DIAGNOSIS.md with it

Run this before reading any code, any log, and any run-config file:

deepreason stop-report <root-or-home>

Paste its section 4 (THE STOP, CLASSIFIED) verbatim as the FIRST section of DIAGNOSIS.md, before writing anything of your own. Cite a report line by section number for every claim naming a defect, a seat, or a model as the cause.

GATE, run before you commit DIAGNOSIS.md:

grep -q "THE STOP, CLASSIFIED" DIAGNOSIS.md

Exit 0 = pass. Exit 1 = the phase is not-done; STOP and report that.

The report accepts three source kinds, so a run that never opened a log still has one: a run root, a run directory that compiled a manifest and failed its qualification gate (root-no-log), and a home whose qualification is cached (home-no-root).

When the failure has no run root and no home at all — a smoke harness, a build, a tool — write one line in DIAGNOSIS.md naming which of the three kinds was absent, and paste that instrument's own typed failure envelope in place of section 4. The GATE above still applies to everything else.

Outlets, one per prohibition:

You cannot...Then
produce the reportSTOP; report not-done with the command's stderr
cite a report line for a causePARK the hypothesis; diagnose what you can cite
find any typed sourcepaste the instrument's failure envelope, and say which kind was absent

This displaces the old ordering, in which run-status.json and REPLAY_VALIDATION.json were rows 1 and 4 of "Where the truth lives" and each reader re-derived them by hand. The report derives all of it, plus the qualification rows and provider health that hand-reading skipped. Those rows below are now the DEEPER DIVE, entered after the report names a box.

Read the map's Traps SECOND — it is cheaper than the record

After the report names a box, read the Traps section of the map document covering the suspect subsystem (docs/map/SUB-*.md, CON-*.md, SEAM-*.md). Traps are the accumulated memory of what has actually gone wrong there, and a recurrence is the cheapest diagnosis available.

This costs one file read and can end the phase. It is not a substitute for the record: the record still decides, and a trap that merely LOOKS like your symptom is a hypothesis to test against the blob, not an answer. But a defect matching a recorded trap is the single most likely explanation, and checking is nearly free.

If the diagnosis turns out to be a NEW failure mode, dr-implement-fix will add it to that document's Traps as part of the fix commit.

Show full SKILL.md (348 more words)Show less

Where the truth lives — the deeper dive

Enter this after the stop report names a box, to establish the mechanism the box only points at. For a failed or suspect run root <root>:

  1. <root>/run-status.json — state, stop_reason, message. The message often IS the answer (e.g. a KeyError'd source id, a typed V6_ROUTE_SEAT_INSUFFICIENT_CAPABILITY).

  2. Cycle heartbeats — which problem each cycle actually worked:

     python3 - <root> <<'PY'
     import sys; from pathlib import Path
     from deepreason.harness import Harness
     h = Harness(Path(sys.argv[1]), read_only=True)
     for e in h.log.read():
         ins = [str(v) for v in (e.inputs or [])]
         if ins and ins[0] == 'cycle':
             print(e.seq, 'cycle', ins[1], '->', ins[2])
     PY
    
  3. Work attribution — join objects/workflow-work-preparation-v1/* (task_payload_value.problem_ref, contract_id, formal_fence_seq) with objects/workflow-work-terminal-v1/* (work_id, status, reason_code) and objects/workflow-provider-attempt-v1/* (work_id, prompt_tokens, completion_tokens, raw_ref). This tells you who spent every token and who got denied. A problem with ZERO provider attempts was never dispatched — that is a scheduler fact, not a model fact.

  4. REPLAY_VALIDATION.json / verify_root(<root>) — violations with check names and seqs. Characterize a violation before explaining it: same set vs. permuted order vs. missing is three different bugs.

  5. Raw model output — resolve a provider attempt's raw_ref in <root>/blobs/<2-char>/<hash>. completion_tokens == cap with empty text means reasoning burn, not a schema bug.

  6. Capability chain — harness.capability_state: proposals, current_transition_by_request, transition lifecycle + reason_code. Denials name their gate.

Only after the record narrows the cause to a mechanism do you open the implicated source file, and only that file plus at most two neighbors.

Discipline

  • Attribute, don't infer: "cycle 0 selected conn:X (seq 32)" beats any reading of _select_problem.
  • When a prior attempt failed differently, diff the two records, not the two vibes.
  • If you find a SECOND independent cause, put it in PARKED.md and continue with the primary (the one the success criterion needs).
  • If the record contradicts GOAL.md's Observed line, stop and return to the orchestrator saying so.

DIAGNOSIS.md template

# Diagnosis: <one line naming the mechanism>

## Stop report, section 4 (pasted verbatim, before anything of mine)
<the output of `deepreason stop-report <root-or-home>`, section 4>

Primary cause: <mechanism, one paragraph max; every clause naming a
  defect, a seat, or a model cites a report line above>
Evidence:
  - <record pointer: file/seq/object id> -> <what it shows>
  - <repeat; minimum 2 pointers, at least 1 non-code>
Implicated code: <file:line, max 3 sites>
Falsifiable prediction: <what dr-reproduce must show if this
  diagnosis is right, as a command + expected observation>
Ruled out: <the one alternative you checked and why it fails>

Exit criteria

  • grep -q "THE STOP, CLASSIFIED" DIAGNOSIS.md exits 0.
  • Every cause naming a defect, a seat, or a model cites a report line.
  • DIAGNOSIS.md committed and pushed; PARKED.md updated if applicable.
  • No code modified. No fix sketched beyond the mechanism name.
  • Return to the orchestrator.

© AHepi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/dr-diagnose of AHepi/DeepReason.

Open the folder on GitHubat commit 9607fba

Compare with similar skills

Dr Diagnose next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dr Diagnose compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dr Diagnose this skillAHepi/DeepReason141—~1.6kAutomated safety check: PassMIT
Diagnosing Missing RecordingsPostHog/posthog40k—~2kAutomated safety check: PassCustom licence
Logic Locatesickn33/agentic-awesome-skills47k1 repos~977Automated safety check: PassMIT
Recordingcodewhale-hq/Codewhale41k—~540Automated safety check: PassMIT
Rust Path Typesopeninterpreter/openinterpreter69k2 repos~605Automated safety check: PassApache-2.0
Python Type Safetywshobson/agents40k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Official

    Diagnoses why a session recording is missing or was not captured.

    40k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Logic Locate

    sickn33/agentic-awesome-skills

    Locate the root cause of a CONFIRMED failure via backward-then-forward semi-formal tracing.

    47k GitHub starsUsed in 1 repo~977 tokens
    DevelopmentAuto-check passed
  • Recording

    codewhale-hq/Codewhale

    Capture screenshots on registered computers, record on macOS or HarmonyOS, and manage saved captures.

    41k GitHub stars~540 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Rust Path Types

    openinterpreter/openinterpreter

    Rules for choosing Rust types for filesystem paths in new Codex code, covering protocol types, internal use and model tool arguments.

    69k GitHub starsUsed in 2 repos~605 tokens
    DevelopmentAuto-check passed
  • Python Type Safety

    wshobson/agents

    Python type safety with type hints, generics, protocols, and strict type checking.

    40k GitHub stars~1.4k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Diagnose Gateway

    openclaw/openclaw

    Diagnose Gateway, config, secrets, channels, and port failures with read-only one-liners.

    392k GitHub stars~670 tokensUpdated today
    Auto-check passed

More from AHepi/DeepReason

All 30 skills in this repo
  • Pinker Clarity Workflow

    AHepi/DeepReason

    Orchestrate a Steven Pinker-grounded workflow for teaching, explanatory writing, or material that must do both.

    141 GitHub stars~1.5k tokensUpdated 29 days ago
    Auto-check passed
  • Design, deliver, or audit explanations and lessons with a Pinker-informed focus on phenomena, the curse of knowledge, concrete models, active reasoning, feedback, and revision.

    141 GitHub stars~1.8k tokensUpdated 29 days ago
    Auto-check passed
  • Pinker Write For Readers

    AHepi/DeepReason

    Draft, revise, teach, or audit expository prose using Pinker's cognitive approach to style: classic presentation, reader modeling, curse-of-knowledge repair, coherent information order, deliberate…

    141 GitHub stars~2.1k tokensUpdated 29 days ago
    Auto-check passed
  • Example Battery

    AHepi/DeepReason

    Build a battery of concrete instances BEFORE writing or evaluating any definition, pin, or semantic clause (Reed step 1).

    141 GitHub stars~811 tokensUpdated 29 days ago
    Auto-check passed
  • Authoring Skills

    AHepi/DeepReason

    Rules for writing, editing, and retiring skill and workflow files for LLM agents.

    141 GitHub stars~1.7k tokensUpdated 29 days ago
    Auto-check passed
  • Deepreason Orchestrator

    AHepi/DeepReason

    Entry point for any DeepReason problem. An agent skill from AHepi/DeepReason.

    141 GitHub stars~1.1k tokensUpdated 29 days ago
    Auto-check passed

Questions about Dr Diagnose

What does Dr Diagnose do?

Locate the cause of a DeepReason defect from the typed record, not from code reading. Dr Diagnose is an agent skill from AHepi/DeepReason. Locate the cause of a DeepReason defect from the typed record, not from code reading.

How do I install Dr Diagnose in Claude Code?

Run `npx skills add AHepi/DeepReason --skill dr-diagnose -a claude-code`. Or copy the skill folder (.claude/skills/dr-diagnose in AHepi/DeepReason) into .claude/skills/dr-diagnose in your project. Claude Code loads it when a task matches its description.

How do I install Dr Diagnose in Codex?

Run `npx skills add AHepi/DeepReason --skill dr-diagnose -a codex`. Or copy the skill folder (.claude/skills/dr-diagnose in AHepi/DeepReason) into .agents/skills/dr-diagnose in your project. Codex loads it when a task matches its description.

Can I use Dr Diagnose in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add AHepi/DeepReason --skill dr-diagnose -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dr-diagnose, .gemini/skills/dr-diagnose, .github/skills/dr-diagnose and .opencode/skills/dr-diagnose in your project.

What does Dr Diagnose need to run?

SKILL.md names no scripts, command-line tools or credentials: Dr Diagnose is instructions for the agent only. Our summary lists: Python 3.

Does Dr Diagnose access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Dr Diagnose safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dr Diagnose use?

Dr Diagnose is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dr Diagnose use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dr Diagnose?

Skills that share tags, products or a category with Dr Diagnose: Diagnosing Missing Recordings (PostHog/posthog, 40k stars), Logic Locate (sickn33/agentic-awesome-skills, 47k stars), Recording (codewhale-hq/Codewhale, 41k stars) and Rust Path Types (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dr Diagnose?

AHepi (a GitHub user) maintains it in AHepi/DeepReason, which has 141 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on September 10, 2026.

Source: AHepi/DeepReason on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.