agentleFS
adjohnadjohn/pstack/skills/principle-fix-root-causes/SKILL.md

principle-fix-root-causes

Skill9 starsChanged 13 days agoMITView on GitHub

Apply when debugging. Trace each symptom back to the first place the system went wrong and fix it there. A guard is a fix only when the state it handles is legitimate.

48 other projects use a version of this, 37 of them edited; 1 new project in the last 4 weeks, against 0 the 4 before.

Adopted by

Surging: 1 new project took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 1 new projectWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 1 in all, so this is a hint, not a trend.

Most recently taken up by

Used with

Projects with it also use make-bot-ui and Poteto Mode.

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.
  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 18 projects that use this

  • JoshueOsunaSkill

    Poteto Mode

    poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 1

    Common

    Most of the 40 edited versions we read keep these.

  • 6

    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:

    When debugging, fix the fault, not the place where it surfaced.

    line 9
  2. Distinctive:

    Ask "why" at each step until the answer is a wrong decision in the code, not a consequence of an earlier one.

    line 15
  3. Distinctive:

    When stuck, instrument. Read the actual error and the actual state.

    line 16
  4. Distinctive:

    When something fails only after a restart, suspect persisted state first: config files, caches, lock files, serialized state.

    line 18
  5. Distinctive:

    Check for the pattern, not just the instance.

    line 19
  6. Common:

    If a workaround needs a paragraph-long comment to justify it, the code is wrong.

    line 20
  7. Distinctive:

    If the deciding fact took a deep dig to find, propose the cheap, always-on signal that would have shown it at first look.

    line 21

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

Fix Root Causes

When debugging, fix the fault, not the place where it surfaced. The symptom is where a wrong state became visible. The root cause is the first place the system did something it should not do, or failed to handle a state it should handle.

Why: A symptom fix hides the evidence and leaves the fault free to surface somewhere else. Each one makes the system harder to reason about, because the code now carries a workaround for a bug that nobody named.

Pattern:

  • Reproduce first.
  • Ask "why" at each step until the answer is a wrong decision in the code, not a consequence of an earlier one.
  • When stuck, instrument. Read the actual error and the actual state. Do not guess.
  • Ask whether the state that triggered the symptom is legitimate. If the system may be in that state, the code that broke on it is the root cause, and handling the state there is the fix. If the state should never exist, a check where it broke hides the bug. Find what produced the state. Guards, retries, swallowed errors, clamped values, and discarded state are the usual ways to hide a bug.
  • When something fails only after a restart, suspect persisted state first: config files, caches, lock files, serialized state.
  • Check for the pattern, not just the instance. Find every place with the same fault and fix them all.
  • If a workaround needs a paragraph-long comment to justify it, the code is wrong. Fix the code, not the comment.
  • If the deciding fact took a deep dig to find, propose the cheap, always-on signal that would have shown it at first look.

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.