agentleFS
hidenobunagaihidenobunagai/astack/skills/principle-fix-root-causes/SKILL.md

principle-fix-root-causes

Skill1 starsChanged 11 days agoMITView on GitHub

Apply when debugging a wrong number, a failing pipeline, a broken notebook, or a failing test. Trace each symptom back to the first step where the data or code went wrong, and fix it there. A guard is a fix only when the bad state is legitimate.

48 other projects use a version of this, 41 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use setup-pstack, poteto-help and 4 more.

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

    setup-pstack

    Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.

    Also in 25 projects that use this

  • ianclearySkill

    poteto-help

    Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.

    Also in 14 projects that use this

  • 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

  • tristanphvnSkill

    ketchup-video

    Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.

    Also in 10 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

  • instructureSkill

    ketchup

    Rebuild context after /clear by analyzing uncommitted changes across Canvas LMS and all plugin repositories

    Also in 17 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 1

    Common

    Most of the 48 edited versions we read keep these.

  • 5

    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" at each step until the answer is a wrong decision in the code or the data handling.

    line 13
  2. Distinctive:

    When stuck, instrument. Print the actual frame, count the rows, read the schema.

    line 14
  3. Distinctive:

    When something changes only after a rerun or a restart, suspect persisted state first: cached intermediate files, a stale kernel, a lock …

    line 16
  4. Distinctive:

    Check for the pattern, not only the instance.

    line 17
  5. Common:

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

    line 18
  6. Distinctive:

    If the deciding fact took a deep dig to find, add the cheap, always-on signal that would have shown it at first look, such as a row-count …

    line 19

“Common” is measured: kept by at least 6 in 10 of the 48 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 value became visible, such as a dashboard total or a failed assertion. The root cause is the first step that produced a wrong row, a wrong dtype, or an unhandled state.

A symptom fix hides the evidence and lets the fault surface somewhere else. A fill_null(0) added to silence a downstream error can turn a missing source into a real zero in the report.

  • Reproduce first, on the same data, in a clean run (see principle-reproduce-from-clean-state).
  • Ask "why" at each step until the answer is a wrong decision in the code or the data handling. Walk back through the pipeline and check the row count and dtypes at each stage.
  • When stuck, instrument. Print the actual frame, count the rows, read the schema. Read the real value. Do not guess.
  • Ask whether the bad state is legitimate. If the source can really contain it, 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 at the point of failure hides the bug. Find what produced it. Defaults, retries, swallowed exceptions, clamped values, and silently dropped rows are the usual ways to hide a bug.
  • When something changes only after a rerun or a restart, suspect persisted state first: cached intermediate files, a stale kernel, a lock file, a saved model artifact.
  • Check for the pattern, not only 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, add the cheap, always-on signal that would have shown it at first look, such as a row-count log or a schema assertion.

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.