agentleFS
oztenozten/skills/five-whys/SKILL.md

five-whys

Skill7 starsChanged 9 months agoMITView on GitHub

Root cause analysis technique for self-improvement. Use after any failure, mistake, or suboptimal outcome to find systemic causes and actionable changes. Triggers: analyzing why something went wrong, debugging repeated failures, post-mortem analysis, retrospectives, understanding root causes, reflecting on what could be improved.

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use pre-mortem.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Ingramradical235Skill

    pre-mortem

    Pre-mortem analysis, scenario planning, future state narratives, and contingency frameworks. Use before finalizing any Strategy Kernel, when planning major initiatives, or when preparing Plan B triggers.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask "Why did this happen?"

    line 13
  2. Distinctive:

    When an answer contains multiple factors (look for "and", "plus", "also", or multiple clauses), fork into separate branches.

    line 20

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Five Whys

Iteratively ask "Why?" until reaching a cause that is actionable, systemic, and honest.

Process

  1. State the problem (specific, factual, no judgment)
  2. Ask "Why did this happen?"
  3. Take that answer, ask "Why?" again
  4. Repeat until reaching a root cause
  5. Identify what to change

Forking

When an answer contains multiple factors (look for "and", "plus", "also", or multiple clauses), fork into separate branches. Each branch gets its own chain of whys and its own change.

Problem: Deploy failed
│
├─ Branch A: Why did the config have a typo?
│  └── Why? I edited it manually
│      └── Why? No templating or validation
│          └── Change: Add config schema validation
│
└─ Branch B: Why were there no tests?
   └── Why? I didn't know that path existed
       └── Why? I didn't check coverage
           └── Change: Require coverage check

Blameless Reframes

AvoidInstead
"I was careless""What check would have caught this?"
"I should have known""What information was I missing?"
"I made a mistake""What made this mistake possible?"

"I failed" is never a root cause. Ask: what process, knowledge, or check was missing?

Pitfalls

  • Stopping too early: "I didn't test it" → keep going → "Why didn't I test?"
  • Vague answers: "Be more careful" is not actionable. "Read the full file before editing" is.
  • Single-threading: Multiple factors need multiple branches

Good Changes

  • Specific: "Search for function usage before modifying" not "Be more thorough"
  • Verifiable: You can tell if you did it
  • Preventive: Stops this class of problem, not just this instance

Output Template

## Problem
[What went wrong - specific and factual]

## Analysis

### Branch A: [First factor]
1. Why? [Answer]
2. Why? [Answer]
3. Why? [Root cause]

**Root cause**: [Systemic gap]
**Change**: [Specific action]

### Branch B: [Second factor, if any]
1. Why? [Answer]
2. Why? [Root cause]

**Root cause**: [Systemic gap]
**Change**: [Specific action]

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.