Skip to main content
skill CX Codex

thinking-scientific-method — Claude Code skill: how to install

Structured debugging skill that ranks falsifiable hypotheses and runs the cheapest discriminating check before changing code.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a claude-code
Open on GitHub

What thinking-scientific-method does

The skill enforces a differential diagnosis loop when a bug or anomaly has multiple plausible roots. Instead of guessing, the agent lists 2 to 5 specific hypotheses, defines falsification criteria in advance, and targets exact files, functions, or invariants.

Observations are prioritized by cost and discriminating power. The agent runs an immediate grep, diff inspection, or test run to eliminate invalid ideas before diving deep. Parsimony guides the choice only among surviving explanations: a simpler guess is dropped immediately once logs or code contradict it.

Running this routine on an obvious failure with a single clear stack trace is a waste of time.

What it helps with

  • localize defects with multiple plausible causes
  • formulate falsifiable hypotheses for subtle bugs
  • rank code inspections by discrimination and cost
  • rule out rival explanations before editing files

Example prompts for the agent

  • Use thinking-scientific-method to diagnose this failure before editing code
  • Formulate competing hypotheses for the bug and run the cheapest check first
  • Apply thinking-scientific-method to find which config or function broke the build

How to install thinking-scientific-method

1Skills CLI (Vercel)

npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a claude-code

2Manually: put the files in place

~/.claude/skills/thinking-scientific-method/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/thinking-scientific-method/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about thinking-scientific-method

How to install thinking-scientific-method in Claude Code?

Run npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a claude-code in your terminal.

What does thinking-scientific-method do?

It guides the agent through hypothesis differential: formulating 2 to 5 rival causes, testing them with cheap checks, and isolating the broken component.

When should this skill be skipped?

Skip it if the cause is immediately evident from a stack trace or test failure, or if you cannot observe logs, code, or diffs right now.

Source text

SKILL.md · MIT
---
name: thinking-scientific-method
description: When a symptom has several plausible causes, rank falsifiable hypotheses and run the cheapest discriminating observation first; prefer least-assumptive survivors only after evidence fit.
disable-model-invocation: true
---

# Scientific Method (Hypothesis Differential)

When a symptom could come from several places, enumerate competing falsifiable hypotheses and spend the cheapest observation on the one that best discriminates among them. After each observation, keep only hypotheses that still fit, then prefer the survivor with the fewest unsupported assumptions as the working explanation.

## When to Use

- A bug, incident, or anomaly has more than one plausible cause.
- You can observe code, logs, diffs, traces, tests, configs, or data now.
- You must localize the faulty file, function, branch, config, or invariant before fixing.
- Competing explanations fit the same surface facts and you need a discriminating check.

## When NOT to Use

- Cause is already obvious from a single stack, failing test, or recent diff — fix directly.
- Only one plausible hypothesis exists — test it; do not invent rivals for ritual.
- No observation is possible yet — obtain access first; do not speculate a localization.
- Multi-week experiments, product A/B tests, or policy trials — this skill is for agent-now checks.
- Fault is already localized and you need systemic root/prevention depth — use five-whys-plus.
- Selective "only these objects/times" defects better suited to IS/IS-NOT comparison — use Kepner-Tregoe.
- Representation (doc/dashboard) may be stale versus reality — verify territory with map-territory first, then resume hypotheses.

## Procedure

1. **State the symptom precisely.** Capture failing behavior, scope, timing, environment, and constraints. Separate observation from interpretation.
2. **Enumerate 2–5 competing hypotheses.** Name specific files, functions, configs, input conditions, or invariants. Reject vague buckets ("backend issue"). If no serious alternative remains after a deliberate check, exit this differential and test or fix the sole evidenced cause directly; never fabricate a rival to continue the procedure.
3. **Name falsifiers and cheap observations before looking.** For each hypothesis: what result drops it, and what read/grep/diff/log/test check can you run now. Prefer observations available immediately over deploys, canaries, or long waits.
4. **Rank observations by discrimination × cheapness.** Run the cheapest check that best separates the top contenders. Do not deep-dive the favorite first if a cheap cross-check would kill alternatives.
5. **Update after each observation.** Drop falsified hypotheses. Among survivors that still fit all evidence, prefer the one with the fewest independent unsupported assumptions (extra components, rare timing, external dependencies). Parsimony ranks survivors after fit; it never rescues a leaner hypothesis that evidence already contradicts. Escalate complexity only when simpler survivors are ruled out.
6. **Localize and stop.** When one hypothesis has direct supporting evidence and key alternatives are ruled out, name the file/function/config to change and the evidence that localizes it. Stop analyzing once localization is direct.

## Output

```text
Symptom: <specific failing behavior, scope, timing>
Hypotheses:
  H1: <specific cause> | Why plausible | Observation | Falsified if
  H2: ...
  H3: ...
Test order: <cheapest discriminating checks>
Results: <what each observation showed>
Survivors: <remaining Hs; least-assumptive working pick among fit>
Localized fault: <file/function/config + supporting evidence>
Ruled out: <Hs dropped and why>
```

## Verification

- Falsify the differential conclusion if you continued with fewer than two serious hypotheses, if no pre-stated falsifier existed, if a cheaper discriminating check was skipped, or if a "simpler" story was kept after evidence contradicted it.
- Stop when the fault is directly localized and alternatives that matter are ruled out; do not continue theorizing.
- Over-application guard: do not narrate observe→question without competing causes; do not treat fewest assumptions as proof; do not run this skill when a single obvious cause is already evidenced.

© tjboudreaux · MIT · tjboudreaux/cc-thinking-skills

Similar skills

Everything for Testing and QA →

From the same set27

thinking-steel-manning Builds the strongest opposing argument before rejecting or adopting a technical plan. Useful for architecture reviews and preventing sycophantic AI agreement. CX Codex +1 600installs thinking-second-order Traces consequences beyond an immediate fix, including reactions, timing, probability and feedback. Use it for architecture or strategic decisions with lasting effects. CX Codex +1 601installs thinking-triz A skill for when two design requirements pull against each other. It names the conflict and looks for a resolution that keeps both benefits. CX Codex +1 593installs thinking-probabilistic A skill that makes the agent name a base rate, give confidence intervals and update its estimate when new evidence lands, instead of stating one confident number. CX Codex +1 591installs thinking-reversibility A skill that makes the agent check how expensive a decision is to undo before it decides how much analysis to spend. Useful when you can't tell whether deep thought is warranted. CX Codex +1 577installs thinking-circle-of-competence Makes the agent answer only from what it read or ran in this session. Useful when a confident wrong answer costs you. CX Codex +1 572installs thinking-five-whys-plus Builds an evidence-backed causal chain from a localized fault to its systemic root. It helps uncover why an issue happened when symptom-level hotfixes keep failing. CX Codex +1 571installs thinking-ooda A skill for incidents and moving-target debugging: it runs the agent through Observe→Orient→Decide→Act at ~70% confidence, then re-observes. CX Codex +1 572installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor