
Principle fix root causes
Guides the agent to trace bugs to their first wrong decision and fix them there
Principle fix root causes is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 5.1K
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Principle fix root causes
This skill shapes how the agent approaches debugging. Instead of patching the spot where a failure becomes visible, it pushes the agent to follow each symptom backwards until it reaches the first point where the system did something it should not have, or failed to handle a state it should have handled.
The workflow starts with reproducing the problem and repeatedly asking why until the answer is a concrete wrong decision in the code. When the cause is unclear, the agent is told to add instrumentation and read the actual runtime state rather than guess. The skill also asks whether the troublesome state is legitimate. If it is, the code should handle it where it broke; if it should never exist, the agent looks for whatever produced it, since guards, retries, swallowed errors, clamped values and discarded state can hide the real fault.
The skill also covers fixing the whole pattern rather than one instance, searching for other places with the same fault, and suggesting a cheap, always-on signal that would have revealed a hard-to-find cause at first glance. It needs no scripts or special tools and is written as a plain instruction file for Claude Code.
When your agent uses it
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.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 2 files (1 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the pstack plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add michael-denyer/pstack-claude
/plugin install pstack@pstack-claudeOr copy only this skill to ~/.claude/skills/principle-fix-root-causes:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/principle-fix-root-causes &&
cp -R "$tmp/plugins/pstack/skills/principle-fix-root-causes" ~/.claude/skills/principle-fix-root-causes &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/principle-fix-root-causes inside it instead.
Copy the skill folder to ~/.agents/skills/principle-fix-root-causes to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/principle-fix-root-causes &&
cp -R "$tmp/plugins/pstack/skills/principle-fix-root-causes" ~/.agents/skills/principle-fix-root-causes &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/principle-fix-root-causes inside it instead.
Copy the skill folder to ~/.cursor/skills/principle-fix-root-causes to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/principle-fix-root-causes &&
cp -R "$tmp/plugins/pstack/skills/principle-fix-root-causes" ~/.cursor/skills/principle-fix-root-causes &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/principle-fix-root-causes inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/michael-denyer/pstack-claude.git --path plugins/pstack/skills/principle-fix-root-causesOr copy the folder to ~/.gemini/skills/principle-fix-root-causes yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/principle-fix-root-causes:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/principle-fix-root-causes &&
cp -R "$tmp/plugins/pstack/skills/principle-fix-root-causes" ~/.copilot/skills/principle-fix-root-causes &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/principle-fix-root-causes inside it instead.
Get the folder:
git clone --depth 1 https://github.com/michael-denyer/pstack-claude.gitThen copy pstack-claude/plugins/pstack/skills/principle-fix-root-causes into your agent's skills folder as principle-fix-root-causes. Agents that support SKILL.md read one folder per skill.
What it does
- Trace symptoms to origin
- Follows each failure backwards to the first place the system went wrong instead of the place it surfaced.
- Legitimate state check
- Decides whether a troublesome state should be handled where it broke or traced to its source.
- Guard and workaround review
- Flags guards, retries, swallowed errors and clamped values that can mask a real bug.
- Pattern-wide fixes
- Encourages finding and correcting every place sharing the same fault, not just one instance.
- Instrument before guessing
- Recommends adding instrumentation and reading actual state when the cause is not obvious.
- Early warning signals
- Suggests lightweight, always-on signals that would have exposed a deep cause at first look.
Good for
- Track down why a function returns bad data even though the error appears elsewhere
- Find the real source of a null value that crashes a downstream component
- Fix a race condition instead of adding a retry around the failing call
- Review a bug fix to check whether it hides an upstream fault
- Locate every code path that shares the same faulty pattern after one bug is found
Principle fix root causes FAQ
When does Principle fix root causes trigger?
It is described as applying when the agent is debugging, and it is set to be non-user-invocable, so it loads based on the task matching its description.
Does Principle fix root causes need any scripts or tools?
No scripts are included and no allowed tools are set. It consists of a SKILL.md instruction file and one supporting file.
Where does Principle fix root causes work?
It is distributed as a Claude Code plugin through the pstack-claude marketplace.
How do I install Principle fix root causes in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/principle-fix-root-causes to use it in all your projects, or to .claude/skills/principle-fix-root-causes in one project. Or install the pstack plugin, which includes it: /plugin marketplace add michael-denyer/pstack-claude, then /plugin install pstack@pstack-claude.
Does Principle fix root causes run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Principle fix root causes?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Principle fix root causes?
The closest alternatives to Principle fix root causes are Debug, Diagnostic reasoning, Bug fix, Principle attack the premise and Correct.
Where this comes from
- Description: from the skill's own SKILL.md.
More from michael-denyer/pstack-claude

Makes the agent read pstack's poteto-mode skill first and follow its routing
- Open source
- 5.1K GitHub stars
- Developer tools

Has the agent restate your goals and the problem you're solving in its own words
- Open source
- 5.1K GitHub stars
- Productivity

Prototype 2-3 competing designs and compare them before committing to one
- Open source
- 5.1K GitHub stars
- Developer tools

Sketches types, signatures and module layout before the agent writes code
- Open source
- 5.1K GitHub stars
- Developer tools

Runs parallel candidate attempts at a task, then merges the best parts into one artifact
- Open source
- 5.1K GitHub stars
- Developer tools

Drafts a personal working-style skill from your past agent conversations
- Open source
- 5.1K GitHub stars
- Developer tools




