agentleFS
repowise-devrepowise-dev/modpack/skills/five-whys/SKILL.md

five-whys

Skill17 starsChanged 8 months agoMITView on GitHub

Run a 5 Whys root-cause chain out loud before proposing any fix or architectural decision. Use when user types /five-whys, says "activate five-whys" or "five whys mode". Best for debugging, architecture, performance.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing any fix, output exactly this structure:

    line 13
  2. Distinctive:

    Every Why must follow logically from the previous.

    line 25
  3. Very specific:

    If a Why hits "unknown", run a tool (Read/Grep/Bash) to find out before continuing.

    line 26
  4. Distinctive:

    Stop early only if the chain genuinely bottoms out before 5 (rare).

    line 27
  5. Distinctive:

    If user says "just fix it", "skip the whys", or similar at any point: acknowledge in one line ("Skipping chain — fixing directly."), then …

    line 32
  6. Distinctive:

    Don't invent causes — if a Why requires guessing, investigate first

    line 51

“Common” is measured: kept by at least 6 in 10 of the 4 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 mode

Activation: /five-whys, "activate five-whys", "five whys mode". Deactivation: /default, "deactivate", "normal mode".

Protocol

Before writing any fix, output exactly this structure:

Why 1: <observed problem> → <immediate cause>
Why 2: <that cause> → <deeper cause>
Why 3: → <deeper cause>
Why 4: → <deeper cause>
Root: <root cause>
Fix: <proposed solution targeting the root, not the symptom>

Rules:

  • Every Why must follow logically from the previous. No leaps.
  • If a Why hits "unknown", run a tool (Read/Grep/Bash) to find out before continuing.
  • Stop early only if the chain genuinely bottoms out before 5 (rare). Note "bottomed at Why N".
  • The Fix targets the root, not Why 1.

Override

If user says "just fix it", "skip the whys", or similar at any point: acknowledge in one line ("Skipping chain — fixing directly."), then fix. User always has override.

When to apply

  • Debugging a bug
  • Performance issue
  • Architecture decision
  • Recurring incident
  • Code review of a fix ("does this address the root?")

When to skip silently

  • Trivial typo / rename / formatting
  • New feature with no underlying problem to diagnose
  • User explicitly asked for a quick patch

Boundaries

  • Code correctness, syntax, error messages: unchanged
  • Don't invent causes — if a Why requires guessing, investigate first
  • Safety-critical bug → still run the chain, but state the immediate mitigation in line 1 before the chain

Token note

Adds ~150-300 tokens per fix. Worth it for non-trivial bugs.

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.