five-whys

five-whys is a skill for Claude Code from tonydzi/second-brain-starter-kit. It costs 87 tokens per session (3,269 once invoked), scanned A, original, MIT.

A root-cause investigation method that asks why a recurring defect keeps happening across several cases. Root cause means the underlying problem rather than the immediate symptom.

In plain words
What is it for?
Use it to investigate a repeated software or operational defect and identify the condition that needs fixing.
Why use it?
It prevents treating repeated failures as unrelated incidents or inventing an explanation for a single event. It is intended for a pattern of recurrence, not an isolated failure.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex; $skill-name invocation.

Part of the second-brain-skills plugin — 259 skills, 3 agents, 1 plugin shipped together

Good fit Use it to investigate a repeated software or operational defect and identify the condition that needs fixing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tonydzi/second-brain-starter-kit/five-whys
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 tonydzi/second-brain-starter-kit --skill five-whys
Clone the repo
git clone --depth 1 https://github.com/tonydzi/second-brain-starter-kit

Made for: Claude Code.

Or install second-brain-skills, the plugin that ships this one along with the rest of its 259 skills, 3 agents, 1 plugin.

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 five-whys

README.md
[![agentmods](https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/five-whys/github.svg)](https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/five-whys)
Your own site
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/five-whys"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/five-whys/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 five-whys

Your own site · 80×15
<a href="https://agentmods.dev/skills/tonydzi/second-brain-starter-kit/five-whys"><img src="https://agentmods.dev/badge/skills/tonydzi/second-brain-starter-kit/five-whys.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,269 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.00087 $0.03269
Opus 5.5 $0.00035 $0.01308
Sonnet 5.5 $0.00017 $0.00654
Haiku 4.5 $0.00009 $0.00327

Measured 1mo ago against content hash 42df4a1e4694, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

five-whys 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 1mo ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/prior_art.py, scripts/selfheal.py, scripts/skill_usage_log.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/five-whys/SKILL.md · 201 lines

How it starts

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

/five-whys — доказать корень по серии случаев

Это расследование причин, а не генератор объяснений и не способ немедленно придумать новый механизм. /five-hard задаёт пять трудных вопросов к убеждению; к root-cause он не относится. В Claude вызывай /five-whys, в Codex — $five-whys.

Шаг 0 — сначала дверь, затем отдельная сессия

Явные фразы Антона «а опять почему?», «пять почему» и «чини корень» активируют этот гейт, но не разрешают выдумать серию или причину. Обычный автоматический вход — 3-й датированный случай одной смысловой семьи. Не считай по тексту ошибки или случайно придуманному имени класса.

До выбора --class выполни:

python "$HOME/.claude/scripts/prior_art.py" class "<нейтральное описание поломки>"

exit 0 означает, что прежнее не найдено; exit 3 означает найденный prior art, а не ошибку. Если прибор напечатал СЕМЬЯ <slug>, используй этот slug. Если известной семьи нет, но прибор показал прежние строки, бери имя предмета ремонта/нарушенного инварианта из самой ранней совпавшей строки. При exit 0, когда прежней строки нет, назови класс по текущему предмету ремонта/нарушенному инварианту и запиши его как 1-й датированный случай. Канал, код возврата, текст алерта и симптом классом не являются. Новая семья и сама причина — claims: не канонизируй их без улики.

Если текущий случай ещё не записан, запиши его только через дверь:

python "$HOME/.claude/scripts/selfheal.py" journal --class <семья> --what "<что>" --conditions "<условия>" --parts "<сопричастные>" --guess "🤔 <гипотеза>"

Не используй journal --dry-run: у этой команды dry-run не является безопасной гарантией. Счёт бери из фактического ответа selfheal.py; дедуп с ненулевым кодом означает, что новая датированная строка не появилась.

Полный разбор разрешён, если выполнено хотя бы одно условие:

  • есть три отдельные датированные строки одной смысловой семьи;
  • немедленный carve-out: безопасность, потеря данных, деньги, RED KEEP-ядро (sync, бэкапы, секреты, QQQ, рельсы наружу, deadman) или соврал сам прибор;
  • Антон явно потребовал разбор системного класса и дал серию; его приказ открывает дверь расследования, но количество случаев и доказанность всё равно называются честно.

Read the full file on GitHub · 201 lines

Files

What ships with it

3 files 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. 1mo ago Changed 42df4a1e4694
  2. 1mo ago Changed · -2 lines 9b975114640a
  3. 2mo ago Changed · +15 lines · +12 tokens per session 19a978d62a3b
  4. 2mo ago First seen · 188 lines · 75 tokens per session scan A b50def01287f

Subscribe to this mod's changes

five-whys is a skill published in the GitHub repository tonydzi/second-brain-starter-kit (16 stars, last pushed yesterday), licensed MIT. It adds 87 tokens to every session and 3,269 once invoked, about $0.0003 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-09-24.

Related

five-whys compared with skills from other repositories

five-whys next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
five-whystonydzi/second-brain-starter-kitSkill16yesterdayMITA87Claude Code
wiki-lintAgriciDaniel/claude-obsidianSkill17ktodayMITA79Claude Code
wiki-retrieveAgriciDaniel/claude-obsidianSkill17ktodayMITA99Claude Code
defuddleAgriciDaniel/claude-obsidianSkill17ktodayMITA61Claude Code
wiki-modeAgriciDaniel/claude-obsidianSkill17ktodayMITA83Claude Code
wiki-foldAgriciDaniel/claude-obsidianSkill17ktodayMITA76Claude Code
molio-doctorzhuzhaoyun/MolioSkill453todaynoneA0Claude Code, Codex