{"data":{"slug":"discovered-58b0d45159e25a22496671f432e78ac9c6b02d6364b0c5ed","title":"Fix Root Causes","summary":"Debug by identifying and correcting the first point where the system made an incorrect decision or failed to handle a legitimate state.","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","download_url":"https:\/\/skillshunter.net\/skills\/discovered-58b0d45159e25a22496671f432e78ac9c6b02d6364b0c5ed\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_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.","instructions":"---\nname: principle-fix-root-causes\ndescription: When debugging, fix where the system first went wrong.\ndisable-model-invocation: true\n---\n\n# Fix Root Causes\n\nFix 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.\n\n- Reproduce first. Ask \"why\" until the answer is a wrong decision in the code. When stuck, instrument and read the actual state.\n- 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.\n- Fix the pattern, not the instance. Find every place with the same fault.\n- If the deciding fact took a deep dig, propose the cheap, always-on signal that would have shown it at first look.\n","use_cases":["Debugging software defects by tracing back to the root cause","Improving code reliability by addressing systemic issues rather than isolated symptoms"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/jueyi6\/empstack\/blob\/74181e31d2f00313f8683ba157966efcabbe109e\/skills\/principle-fix-root-causes\/SKILL.md","source_commit":"74181e31d2f00313f8683ba157966efcabbe109e","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T08:56:10.000000Z","updated_at":"2026-12-02T09:15:14.000000Z","seo_title":"Fix Root Causes - Debugging Principle","seo_description":"A debugging principle focused on identifying and correcting the first point where the system made an incorrect decision or failed to handle a legitimate state.","seo_keywords":["debugging principle","root cause analysis","software debugging","code reliability","systemic issue resolution"]}}