think-diagnose

think-diagnose is a skill for Claude Code from chrisallenlane/claude-swe-workflows. It costs 53 tokens per session (3,899 once invoked), scanned A, original, MIT.

A cause-analysis process for a bug, incident, or other observed problem. It compares possible explanations against the available evidence and reports the most likely causes with confidence levels.

In plain words
What is it for?
Use it to investigate why a service failed, why a behavior appeared, or what may be causing a software bug or non-technical problem.
Why use it?
It helps avoid jumping to the first explanation when several causes could produce the same symptom. It gives reasoning and evidence to guide investigation, but does not fix code.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the claude-swe-workflows plugin — 22 skills, 37 agents shipped together

Good fit Use it to investigate why a service failed, why a behavior appeared, or what may be causing a software bug or non-technical problem.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chrisallenlane/claude-swe-workflows/think-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 chrisallenlane/claude-swe-workflows --skill think-diagnose
Clone the repo
git clone --depth 1 https://github.com/chrisallenlane/claude-swe-workflows

Made for: Claude Code.

Or install claude-swe-workflows, the plugin that ships this one along with the rest of its 22 skills, 37 agents.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/chrisallenlane/claude-swe-workflows/think-diagnose"><img src="https://agentmods.dev/badge/skills/chrisallenlane/claude-swe-workflows/think-diagnose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,899 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.00053 $0.03899
Opus 5.5 $0.00021 $0.01560
Sonnet 5.5 $0.00011 $0.00780
Haiku 4.5 $0.00005 $0.00390

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

Security

Grade A, and why

think-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 12d 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/think-diagnose/SKILL.md · 299 lines

How it starts

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

Think-Diagnose - Abductive Reasoning About Causes

Takes a phenomenon — something that was observed and that the user wants to understand — and produces a ranked set of candidate causes with evidence-based confidence calibration. Uses abductive reasoning: inference to the best explanation. Distinct from /bug-fix (which handles code-specific diagnosis with artifact output and execution tooling); /think-diagnose is pure reasoning about causes, applicable to non-code phenomena as readily as code ones.

This skill produces no tangible artifacts. It is a consultant, not an implementer. No code, no tickets, no commits. The output is a structured diagnosis report that the user can act on by gathering more evidence, adopting a leading cause, or piping to /think-brainstorm for remediation.

Roles

Judge (you, running this skill):

  • Capture the phenomenon in a written brief
  • Elicit evidence, rigorously separating observation from interpretation
  • Choose appropriate reasoning lenses
  • Spawn diagnosticians in isolation
  • Evaluate candidate causes against evidence (this skill has a real evaluative phase, unlike purely-divergent think-* skills)
  • Calibrate confidence honestly
  • When candidates won't separate, narrow them by ACH (step 7)
  • Report

Diagnosticians: Each receives a specific reasoning lens and generates candidate causes (with mechanisms, predictions, refuters, and plausibility) in isolation from other diagnosticians.

Evidence-gatherers (narrowing only): THK - ACH Evidence Gatherer. Each receives the candidate set and one evidence class, and enumerates confirming and disconfirming evidence neutrally, in isolation. Gatherers never pick a hypothesis.

Workflow

1. Receive the Phenomenon

The phenomenon may arrive as:

  • Conversation context — summarize it back, confirm
  • A document — read the file (incident report, data summary, observation log)
  • Fresh user input — capture verbatim

Produce a written brief of the phenomenon. Precisely what is the thing to explain? Vague phenomena produce vague diagnoses.

Read the full file on GitHub · 299 lines

Files

What ships with it

1 file 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. 12d ago First seen · 299 lines · 53 tokens per session scan A 7c309f53d8d4

Subscribe to this mod's changes

think-diagnose is a skill published in the GitHub repository chrisallenlane/claude-swe-workflows (21 stars, last pushed 13d ago), licensed MIT. It adds 53 tokens to every session and 3,899 once invoked, about $0.0002 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-18.

Related

think-diagnose compared with skills from other repositories

think-diagnose next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
think-diagnosechrisallenlane/claude-swe-workflowsSkill2113d agoMITA53Claude Code
five-whyswesammustafa/Claude-Code-Everything-You-Need-to-KnowSkill3.7k2d agononeA53Claude Code
check-linkswesammustafa/Claude-Code-Everything-You-Need-to-KnowSkill3.7k2d agononeA44Claude Code, Codex
check-cache-bugsFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A38Claude Code
sandbox-unblockFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A65Claude Code
investigateFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A41Claude Code
qaFlorianBruniaux/claude-code-ultimate-guideSkill7.6ktodayCC-BY-SA-4.0A37Claude Code