Agent skill

Five Whys Analysis

by neurofoo in neurofoo/agent-skills

Runs a Five Whys root cause analysis, asking why repeatedly from the stated problem until it reaches an actionable cause, then lists corrective actions and verification.

MITAuto-check passedDevelopment

Install Five Whys Analysis

skills CLI
$ npx skills add neurofoo/agent-skills --skill 5whys -a claude-code

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

GitHub CLI
$ gh skill install neurofoo/agent-skills 5whys --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/neurofoo/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/5whys .claude/skills/5whys && 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
5whys
GitHub stars
119
Used in
1 other repo
Token cost
~875 tokens
SKILL.md length
464 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Runs a Five Whys root cause analysis, asking why repeatedly from the stated problem until it reaches an actionable cause, then lists corrective actions and verification.

  • Investigating why a production failure or bug happened
  • SKILL.md covers Instructions, Guidelines and Examples
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Running a blameless post-incident analysis of a process problem

What it does

The agent starts from the problem as stated and asks why it happened, then asks why again about each answer, until it reaches a cause that is actionable, fundamental and explains the chain. Five rounds is typical but not a rule. The write-up has a problem statement, a table of levels with question and answer, the root cause with the reason it is the root and not another symptom, any branches where several causes fit, corrective actions split into immediate and systemic, and a way to verify the cause by testing the hypothesis.

Guidelines ask for factual, verifiable answers, a focus on systems and processes instead of blame, guesses flagged as hypotheses, a watch for circular logic and a stop once further whys turn philosophical. Worked examples include a software bug, where 500 errors on a checkout page trace back to a missing database review process for new queries, and a customer churn case.

When your agent uses it

  • Investigating why a production failure or bug happened
  • Running a blameless post-incident analysis of a process problem
  • Digging past symptoms to find a cause you can act on

Example prompts

  • “Run a five whys on why our nightly export failed three times this week.”
  • “Why did the checkout page return 500 errors? Do a root cause analysis with corrective actions.”
  • “Do a five whys on our customer churn spike and branch where several causes fit.”

What it can do on your machine

Read from SKILL.md and the folder at commit 0e7ac2a. 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

Five Whys Analysis loads about 875 tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 464 words of instructions outside code blocks.

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

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 neurofoo/agent-skills at commit 0e7ac2a, republished under its MIT licence (© neurofoo). 464 words, ~875 tokens.

Download SKILL.mdSave it as .claude/skills/5whys/SKILL.md (or your agent's skills folder).
name
5whys
description
Five Whys root cause analysis. Iteratively asks "why" to drill past symptoms to underlying causes. Use for debugging, investigating failures, or understanding why something went wrong.
user-invocable
true

Five Whys Analysis

Perform iterative root cause analysis by asking "why" repeatedly until you reach the underlying cause.

Instructions

Start with the stated problem and ask "why" it occurred. For each answer, ask "why" again. Continue until you reach a root cause that:

  • Is actionable (you can do something about it)
  • Is fundamental (asking "why" further leads to abstract/unhelpful answers)
  • Explains the chain of causation

Typically this takes 5 iterations, but may be fewer or more.

Output Format

Problem Statement Restate the problem clearly and specifically.

Why Chain

LevelQuestionAnswer
1Why did [problem]?[Answer 1]
2Why did [Answer 1]?[Answer 2]
3Why did [Answer 2]?[Answer 3]
4Why did [Answer 3]?[Answer 4]
5Why did [Answer 4]?[Root Cause]

Root Cause The fundamental issue identified. Explain why this is the root (not just another symptom).

Branches (if applicable) If multiple valid answers exist at any level, show the branching analysis.

Corrective Actions

  • Immediate: What to do now to address the symptom
  • Systemic: What to change to prevent recurrence

Verification How will you confirm the root cause is correct? (Test the hypothesis)

Guidelines

  • Each answer should be factual and verifiable
  • Avoid blame ("John didn't do X")—focus on systems and processes
  • If you're guessing, note it as a hypothesis to verify
  • Watch for circular logic
  • It's okay to branch if there are multiple valid causes
  • Stop when further "why" questions become philosophical or unhelpful

Examples

Show full SKILL.md (225 more words)Show less
Software Bug

Problem: Users are seeing 500 errors on the checkout page

LevelQuestionAnswer
1Why are users seeing 500 errors?The payment service is timing out
2Why is the payment service timing out?Database queries are taking >30 seconds
3Why are database queries slow?The orders table has 50M rows and no index on customer_id
4Why is there no index?The table was created before we had this query pattern
5Why wasn't an index added when the query was added?No database review process for new queries

Root Cause: Missing process for database review when adding new query patterns.

Corrective Actions:

  • Immediate: Add index on customer_id
  • Systemic: Add database review checklist to PR template
Customer Churn

Problem: Enterprise customer canceled after 6 months

LevelQuestionAnswer
1Why did the customer cancel?They said the product wasn't delivering value
2Why wasn't it delivering value?They only had 12% feature adoption
3Why was adoption so low?Users weren't trained on key workflows
4Why weren't users trained?Onboarding ended after technical setup
5Why does onboarding end at setup?Success team is understaffed; prioritizes new sales

Root Cause: Success team capacity forces them to end onboarding prematurely.

Corrective Actions:

  • Immediate: Reach out to at-risk accounts with training
  • Systemic: Hire success capacity; redefine onboarding to include adoption milestone

$ARGUMENTS

© neurofoo, 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 5whys of neurofoo/agent-skills.

Open the folder on GitHubat commit 0e7ac2a

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in neurofoo/agent-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Five Whys Analysis 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.

Five Whys Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Five Whys Analysis this skillneurofoo/agent-skills1191 repos~875Automated safety check: PassMIT
OpenLogi macOS Permissions TriageAprilNEA/OpenLogi23k—~2.5kAutomated safety check: NotesApache-2.0
Bug Finder for daisyUIsaadeghi/daisyui43k—~2.3kAutomated safety check: PassMIT
Root Cause Debugginggarrytan/gstack136k—~1.4kAutomated safety check: PassMIT
Graph-Based Bug Tracingtirth8205/code-review-graph32k1 repos~287Automated safety check: PassMIT
Systematic DebuggingChrisWiles/claude-code-showcase6.1k3 repos~1.2kAutomated safety check: PassNone

Similar skills

  • Decides whether an OpenLogi device problem on macOS is a privacy-permission (TCC) problem, using agent log lines, and says which identity needs which grant.

    23k GitHub stars~2.5k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes
  • Bug Finder for daisyUI

    saadeghi/daisyui

    Investigates suspected bugs in the daisyUI monorepo through read-only analysis, then writes a decision-ready fix plan in tmp/bugs without changing any product code.

    43k GitHub stars~2.3k tokensUpdated 8 days ago
    DevelopmentAuto-check passed
  • Root Cause Debugging

    garrytan/gstack

    Investigates bugs, errors and stack traces in phases and requires a root-cause hypothesis to be confirmed before any fix is written.

    136k GitHub stars~1.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Graph-Based Bug Tracing

    tirth8205/code-review-graph

    Traces a bug through a code knowledge graph, following callers, callees and execution flow before opening source files, within a small token budget.

    32k GitHub starsUsed in 1 repo~287 tokens
    DevelopmentAuto-check passed
  • Systematic Debugging

    ChrisWiles/claude-code-showcase

    Applies a four-phase debugging routine that finds the root cause of a bug or failing test before any fix is written.

    6.1k GitHub starsUsed in 3 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Debugging and Error Recovery

    addyosmani/agent-skills

    Applies a stop-the-line rule and a step-by-step triage when tests fail, builds break or something stops working, aiming at the root cause instead of guesses.

    103k GitHub starsUsed in 1 repo~2.6k tokens
    DevelopmentAuto-check passed

More from neurofoo/agent-skills

All 22 skills in this repo
  • Eisenhower Matrix Prioritizer

    neurofoo/agent-skills

    Sorts a task list into the four Eisenhower quadrants (do, schedule, delegate, eliminate) with reasons, a time distribution check and first actions.

    119 GitHub stars~705 tokensUpdated 8 mo ago
    Auto-check passed
  • OODA Loop Analysis

    neurofoo/agent-skills

    Walks a problem or decision through the OODA loop: observe the facts, orient on causes and assumptions, decide among at least three options, and plan the execution.

    119 GitHub starsUsed in 1 repo~904 tokens
    Auto-check passed
  • Cynefin Problem Classifier

    neurofoo/agent-skills

    Sorts a problem into the Cynefin domains of simple, complicated, complex, chaotic or confused, then recommends a way of working that fits that domain.

    119 GitHub starsUsed in 1 repo~696 tokens
    Auto-check passed
  • Wardley Map Analysis

    neurofoo/agent-skills

    Maps a user need's value chain against evolution stages to guide build-versus-buy decisions and show competitive dynamics.

    119 GitHub stars~776 tokensUpdated 8 mo ago
    Auto-check passed
  • Jtbd

    neurofoo/agent-skills

    Jobs to Be Done analysis to understand what customers really want.

    119 GitHub starsUsed in 1 repo~754 tokens
    Auto-check passed
  • Swot

    neurofoo/agent-skills

    SWOT strategic analysis examining Strengths, Weaknesses, Opportunities, and Threats.

    119 GitHub starsUsed in 1 repo~634 tokens
    Auto-check passed

Categories

Questions about Five Whys Analysis

What does Five Whys Analysis do?

Runs a Five Whys root cause analysis, asking why repeatedly from the stated problem until it reaches an actionable cause, then lists corrective actions and verification. The agent starts from the problem as stated and asks why it happened, then asks why again about each answer, until it reaches a cause that is actionable, fundamental and explains the chain. Five rounds is typical but not a rule.

When should I use Five Whys Analysis?

Five Whys Analysis fits situations like: investigating why a production failure or bug happened; running a blameless post-incident analysis of a process problem; digging past symptoms to find a cause you can act on.

How do I install Five Whys Analysis in Claude Code?

Run `npx skills add neurofoo/agent-skills --skill 5whys -a claude-code`. Or copy the skill folder (5whys in neurofoo/agent-skills) into .claude/skills/5whys in your project. Claude Code loads it when a task matches its description.

How do I install Five Whys Analysis in Codex?

Run `npx skills add neurofoo/agent-skills --skill 5whys -a codex`. Or copy the skill folder (5whys in neurofoo/agent-skills) into .agents/skills/5whys in your project. Codex loads it when a task matches its description.

Can I use Five Whys Analysis 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 neurofoo/agent-skills --skill 5whys -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/5whys, .gemini/skills/5whys, .github/skills/5whys and .opencode/skills/5whys in your project.

What does Five Whys Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Five Whys Analysis is instructions for the agent only.

Does Five Whys Analysis 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 Five Whys Analysis 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 Five Whys Analysis use?

Five Whys Analysis 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 Five Whys Analysis use?

About 875 tokens (SKILL.md is roughly 3.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 Five Whys Analysis?

Skills that share tags, products or a category with Five Whys Analysis: OpenLogi macOS Permissions Triage (AprilNEA/OpenLogi, 23k stars), Bug Finder for daisyUI (saadeghi/daisyui, 43k stars), Root Cause Debugging (garrytan/gstack, 136k stars) and Graph-Based Bug Tracing (tirth8205/code-review-graph, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Five Whys Analysis?

neurofoo (a GitHub user) maintains it in neurofoo/agent-skills, which has 119 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on January 19, 2026.

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