# Root Cause Debugging

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-alisinadevelo-md-files-root-cause-debugging`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [AlisinaDevelo](https://agentstack.voostack.com/s/alisinadevelo)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [AlisinaDevelo](https://github.com/AlisinaDevelo)
- **Source:** https://github.com/AlisinaDevelo/md-files/tree/main/plugins/forge/skills/root-cause-debugging

## Install

```sh
agentstack add skill-alisinadevelo-md-files-root-cause-debugging
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Root-Cause Debugging

Find the originating wrong assumption, not the nearest symptom. Fixes applied to
symptoms create more bugs; fixes applied to causes are durable.

## The method

1. **Reproduce deterministically.** Capture the exact command, inputs, environment, and
   full error/trace. If it's flaky, find what flips it — ordering, timing, shared state,
   uninitialized data. You can't fix what you can't trigger on demand.
2. **Read the trace from your deepest frame outward.** Locate the implicated code and
   *read it* — don't infer behavior from names.
3. **Form a falsifiable hypothesis.** "X is null here because Y returns null when Z."
   State what you'd observe if it's true.
4. **Test it with evidence.** A targeted log/print, a narrowed test, an inspected value,
   a minimal reproducer. Confirm or kill the hypothesis. Iterate. Never assert a cause
   you haven't observed.
5. **Trace to the origin.** A wrong value at line 200 was usually set at line 40. Walk
   backward until reality first diverged from intent. That's the root cause.
6. **Fix the cause, then verify.** Re-run the failing case *and* its neighbors to confirm
   the fix works and breaks nothing.

## Techniques

- **Bisect** — `git bisect` to find the introducing commit; binary-search the input or
  the code path to halve the search space each step.
- **Rubber-duck** — explain the flow aloud; the wrong assumption often surfaces mid-
  sentence.
- **Minimal reproducer** — strip the case to the smallest thing that still fails.
- **Differential** — what's different between the passing and failing case? Environment,
  data, version, order.

## Anti-patterns (these hide bugs, they don't fix them)

- Wrapping in try/catch to silence an exception you don't understand.
- Adding `if (x == null) return` without asking why `x` is null.
- Retrying a deterministic failure.
- Changing a test's expected value to match buggy output.

## When stuck

State your current hypothesis, the evidence for and against it, and the single
experiment that would confirm or refute it next. Don't thrash — each action should
eliminate possibilities.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [AlisinaDevelo](https://github.com/AlisinaDevelo)
- **Source:** [AlisinaDevelo/md-files](https://github.com/AlisinaDevelo/md-files)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-alisinadevelo-md-files-root-cause-debugging
- Seller: https://agentstack.voostack.com/s/alisinadevelo
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
