thinking-scientific-method — скилл для Claude Code: что делает
Скилл задаёт протокол научной отладки: агент формулирует проверяемые гипотезы сбоя и отсекает ложные самыми дешёвыми проверками.
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a claude-codeЧто делает thinking-scientific-method
Скилл включает пошаговый цикл дифференциальной диагностики, когда у сбоя есть несколько правдоподобных причин. Вместо хаотичных правок агент формулирует от 2 до 5 гипотез с конкретными файлами или инвариантами и заранее определяет критерий опровержения для каждой.
Проверки ранжируются по цене и силе разделения: агент сразу выполняет быстрый grep, чтение диффа или тест, отбрасывая неверные догадки. Бритва Оккама работает строго после проверки фактами — простое объяснение не спасает гипотезу, если логи или код ей прямо противоречат.
Инструкция бесполезна при очевидных падениях по одному стектрейсу, поэтому запускать её ради ритуала нельзя.
Какие задачи решает
- локализовать сбой с несколькими вероятными причинами
- составить список опровержимых гипотез для аномалии
- выбрать самую быструю проверку в логах или коде
- отсечь ложные версии до внесения изменений
Примеры запросов агенту
- Локализуй причину сбоя по методу scientific-method, проверь логи и тесты
- Сформулируй конкурирующие гипотезы для этой ошибки и начни с дешёвой проверки
- Разбери инцидент через thinking-scientific-method перед тем как править код
Как установить thinking-scientific-method
1Через Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a claude-code2Вручную: положить файлы
~/.claude/skills/thinking-scientific-method/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/thinking-scientific-method/
1Через Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a codex2Вручную: положить файлы
.agents/skills/thinking-scientific-method/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a cursor2Вручную: положить файлы
.cursor/skills/thinking-scientific-method/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install tjboudreaux/cc-thinking-skills thinking-scientific-method2Вручную: положить файлы
.github/skills/thinking-scientific-method/SKILL.md1Через Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a gemini-cli2Командой платформы
gemini skills install https://github.com/tjboudreaux/cc-thinking-skills --path skills/thinking-scientific-methodВручную: положить файлы
.devin/skills/thinking-scientific-method/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о thinking-scientific-method
Как установить thinking-scientific-method в Claude Code?
Выполните команду npx skills add tjboudreaux/cc-thinking-skills --skill thinking-scientific-method -a claude-code.
Что делает скилл thinking-scientific-method?
Он заставляет модель выдвигать конкурирующие гипотезы поломки и отсекать их недолгими проверками логов или кода перед локализацией дефекта.
Когда не стоит применять этот скилл?
Его не используют, когда причина уже видна в стектрейсе, когда гипотеза всего одна или если нельзя провести прямые наблюдения в кодовой базе.
Исходный текст
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