systematic-debugging

Diagnose bugs through a four-phase root cause investigation process before proposing fixes.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/macintorsten/aurapod --skill systematic-debugging-macintorsten
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/macintorsten/aurapod/tree/main/.github/skills/systematic-debugging
Command: npx skills add https://github.com/macintorsten/aurapod --skill systematic-debugging-macintorsten

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Random fixes and quick patches waste time, mask underlying issues, and introduce new bugs. This Skill enforces a disciplined debugging methodology that finds root causes instead of treating symptoms, even under time pressure or social pressure to apply quick fixes. ## Core Features & Use Cases - Four-Phase Process: Structured workflow covering root cause investigation, pattern analysis, hypothesis testing, and implementation with explicit gates between phases. - Supporting Techniques: Includes root-cause-tracing for backward call-stack analysis, defense-in-depth validation at multiple layers, and condition-based waiting to replace flaky arbitrary timeouts in tests. - Pressure Resistance: Anti-patterns, red flags, and rationalization tables that catch shortcut behavior during emergencies, plus a bisection script (find-polluter.sh) to identify which test creates unwanted state. - Use Case: When a test fails intermittently or a production bug appears deep in the call stack, follow Phase 1 to gather evidence at each component boundary, trace the bad value to its source, then fix at the origin with a failing test case. ## Quick Start Use the systematic-debugging skill to investigate this failing test and find its root cause before suggesting any fix.

Frequently Asked Questions about systematic-debugging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the root cause of a bug instead of fixing symptoms?▼

Follow the four-phase process: investigate the root cause by reading errors and reproducing consistently, analyze patterns against working examples, form and test a single hypothesis, then implement one fix with a failing test case. Never propose fixes before completing the investigation phase.

How to fix flaky tests caused by arbitrary timeouts?▼

Replace setTimeout and sleep calls with condition-based waiting that polls for the actual condition you care about, such as an event appearing or state changing. Poll every 10ms with a clear timeout error, and only use arbitrary delays when testing actual timing behavior.

What should I do when a bug appears deep in the call stack?▼

Trace backward through the call chain to find the original trigger rather than fixing where the error appears. Add stack trace instrumentation with console.error before the problematic operation, then fix at the source and add validation at each layer.

How do I find which test is polluting shared state?▼

Use the find-polluter.sh bisection script with the polluted file path and a test pattern. It runs test files one by one, checks whether the pollution appears after each run, and stops at the first test that creates the unwanted file or state.

When is it acceptable to skip systematic debugging for a quick fix?▼

Never, according to the skill's iron law: no fixes without root cause investigation first. Even under time pressure or emergencies, systematic debugging is faster than guess-and-check thrashing, and three or more failed fixes indicate an architectural problem requiring discussion.