systematic-debugging

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

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/pgoell/pgoell-claude-tools --skill systematic-debugging-pgoell
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/pgoell/pgoell-claude-tools/tree/main/plugins/workbench/skills/systematic-debugging
Command: npx skills add https://github.com/pgoell/pgoell-claude-tools --skill systematic-debugging-pgoell

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Random quick fixes waste time, mask underlying issues, and introduce new bugs. This Skill enforces a disciplined debugging methodology that finds the root cause before any fix is attempted, preventing guess-and-check thrashing. ## Core Features & Use Cases - Four-Phase Process: Root cause investigation, pattern analysis, hypothesis testing, and verified implementation, with an architecture-questioning escape hatch after 3+ failed fixes. - Supporting Techniques: Backward root-cause tracing through call stacks, defense-in-depth validation at multiple layers, and condition-based waiting to replace flaky arbitrary timeouts. - Debug Reports: Generates a structured HTML debug report capturing the hypothesis tree, attempt timeline, root cause, and validated fix. - Use Case: When a test fails intermittently in CI, use this Skill to gather evidence at each component boundary, trace the failure to its source, fix it once, and produce a shareable HTML report. ## Quick Start Use the systematic-debugging skill to investigate why the login integration test fails intermittently and produce a debug report.

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 bug systematically instead of guessing?

Follow the four phases: investigate the root cause by reading errors and reproducing consistently, analyze patterns against working code, form and test one hypothesis at a time, then implement a single verified fix. Never propose fixes before completing root cause investigation.

How to fix flaky tests caused by timing issues?

Replace arbitrary setTimeout or sleep delays 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 timeout, and only use fixed delays when testing documented timing behavior.

What should I do when multiple fix attempts keep failing?

After three or more failed fixes, stop and question the architecture rather than attempting another fix. Repeated failures where each fix reveals new problems elsewhere indicate a design problem, not a wrong hypothesis, and require architectural discussion.

How do I find which test is polluting shared state?

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

When should I add validation at multiple layers?

Add defense-in-depth validation after fixing a bug caused by invalid data, placing checks at the entry point, business logic, environment guards, and debug instrumentation. Single-point validation can be bypassed by other code paths, mocks, or refactoring.