# Fix Root Causes

Debug by identifying and correcting the first point where the system made an incorrect decision or failed to handle a legitimate state.

**Canonical URL:** https://skillshunter.net/skills/discovered-58b0d45159e25a22496671f432e78ac9c6b02d6364b0c5ed

**JSON URL:** https://skillshunter.net/api/public/v1/skills/discovered-58b0d45159e25a22496671f432e78ac9c6b02d6364b0c5ed

**Markdown URL:** https://skillshunter.net/skills/discovered-58b0d45159e25a22496671f432e78ac9c6b02d6364b0c5ed.md

**Instructions download URL:** https://skillshunter.net/skills/discovered-58b0d45159e25a22496671f432e78ac9c6b02d6364b0c5ed/download

**Category:** Software & Development

**Source URL:** https://github.com/jueyi6/empstack/blob/74181e31d2f00313f8683ba157966efcabbe109e/skills/principle-fix-root-causes/SKILL.md

**Source commit:** 74181e31d2f00313f8683ba157966efcabbe109e

**Listing approved at:** 2026-12-02

**Created at:** 2026-11-30T08:56:10.000000Z

**Updated at:** 2026-12-02T09:15:14.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's note

Before debugging, reproduce the issue and instrument the code to observe the actual state. Determine whether the triggering state is legitimate and address the root cause, not just the symptom.

### When to use it

- Debugging software defects by tracing back to the root cause
- Improving code reliability by addressing systemic issues rather than isolated symptoms

## Skill instructions

---
name: principle-fix-root-causes
description: When debugging, fix where the system first went wrong.
disable-model-invocation: true
---

# Fix Root Causes

Fix the fault, not the place where it showed up. The root cause is the first place the system did something it should not do, or failed to handle a state it should handle.

- Reproduce first. Ask "why" until the answer is a wrong decision in the code. When stuck, instrument and read the actual state.
- Ask whether the state that triggered the symptom is legitimate. If it is, handle it where the code broke. If it should never exist, a check there hides the bug, so find what produced it. Guards, retries, swallowed errors, clamped values, and discarded state are the usual ways to hide a bug.
- Fix the pattern, not the instance. Find every place with the same fault.
- If the deciding fact took a deep dig, propose the cheap, always-on signal that would have shown it at first look.

