systematic-debugging

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

1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/stefanfaur/roach-marketplace --skill systematic-debugging-stefanfaur
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/stefanfaur/roach-marketplace/tree/main/roach/skills/systematic-debugging
Command: npx skills add https://github.com/stefanfaur/roach-marketplace --skill systematic-debugging-stefanfaur

SYSTEM DOCUMENTATION & REQUIREMENTS

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 the actual root cause before any fix is attempted, even under time pressure. ## Core Features & Use Cases - Four-Phase Process: Structured workflow covering root cause investigation, pattern analysis, hypothesis testing, and verified implementation. - Supporting Techniques: Includes root cause tracing through call stacks, defense-in-depth validation at multiple layers, and condition-based waiting to replace flaky arbitrary timeouts in tests. - Rationalization Resistance: Explicit red flags, anti-patterns, and a rule to question the architecture after three failed fix attempts. - Use Case: When a test fails intermittently in CI, use this Skill to trace the failure back through the call chain, form a single hypothesis, create a failing test case, and fix the source rather than the symptom. ## 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 test failure systematically instead of guessing?▼

Follow the four-phase process: first investigate the root cause by reading errors and reproducing the issue, then analyze patterns against working code, form a single testable hypothesis, and implement one verified fix. Never propose fixes before completing the investigation phase.

How to find which test is polluting shared state?▼

Use the included find-polluter.js script, which runs test files one by one and checks whether a polluting artifact like a .git directory appears after each run. It stops at the first test that creates the pollution and reports the culprit file.

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

Replace arbitrary setTimeout or sleep delays with condition-based waiting that polls for the actual condition you need, such as an event appearing or state changing. The condition-based-waiting reference includes a generic waitFor implementation and domain-specific helpers.

What should I do when multiple fix attempts keep failing?▼

Stop after three failed fixes and question the architecture rather than attempting a fourth fix. Repeated failures where each fix reveals new problems elsewhere indicate a structural issue that requires discussing a redesign with your team.

When should I not use a full debugging process?▼

The process applies to any technical issue, including seemingly simple bugs, since simple issues have root causes too. The only exception is when investigation proves the issue is genuinely environmental or external, in which case you document findings and add appropriate handling.