systematic-debugging

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

3|1|Updated May 29, 2026
One-click install
npx skills add https://github.com/mambo-wang/CodingHub --skill systematic-debugging-mambo-wang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/mambo-wang/CodingHub/tree/main/.qoder/skills/systematic-debugging
Command: npx skills add https://github.com/mambo-wang/CodingHub --skill systematic-debugging-mambo-wang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Random fix attempts waste time, mask underlying defects, and introduce new bugs. This Skill enforces a disciplined debugging methodology that finds the actual root cause before any fix is proposed, even under time pressure or social pressure to apply quick patches. ## Core Features & Use Cases - Four-Phase Process: Root cause investigation, pattern analysis, hypothesis testing, and implementation, with explicit gates preventing you from skipping ahead. - Anti-Rationalization Defenses: Red-flag lists, common excuse rebuttals, and a mandatory architecture review after three failed fix attempts. - Supporting Techniques: Includes root-cause tracing up the call stack, defense-in-depth validation at multiple layers, condition-based waiting to replace flaky timeouts, and a bisection script to find polluting tests. - Use Case: A test fails intermittently in CI. Instead of adding another sleep, you follow Phase 1 to reproduce and gather evidence, trace the bad value to its origin, write a failing test, and fix the source with layered validation. ## 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 debug a failing test systematically?▼

Follow the four phases: read the full error and reproduce the failure consistently, compare against working examples in the same codebase, form one specific hypothesis and test it minimally, then write a failing test before implementing the fix. Never propose a fix before completing root cause investigation.

How to find the root cause of a bug deep in the call stack?▼

Trace backward from the error location by asking who called each function and what values were passed, continuing until you find where the invalid data originated. Add stack-trace logging with console.error before the failing operation if manual tracing is not possible.

Should I apply a quick fix during a production outage?▼

The skill mandates root cause investigation even during emergencies, arguing that systematic debugging is faster than repeated guess-and-check cycles. Quick symptom fixes typically lead to recurring incidents and more downtime overall.

How do I fix flaky tests caused by timing issues?▼

Replace hardcoded setTimeout or sleep calls with condition-based waiting that polls for the actual state you need, such as an event appearing or a count being reached. This eliminates race conditions and typically makes tests faster and fully reliable.

What should I do after three failed fix attempts?▼

Stop and question the architecture rather than attempting a fourth fix. Repeated failures where each fix exposes new problems elsewhere indicate a structural issue, so discuss the fundamental design with your team before continuing.

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

Use the included find-polluter.sh bisection script, which runs each test file individually and checks whether the unwanted file or state appears afterward. It stops at the first test that creates the pollution.