systematic-debugging

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

Updated Aug 5, 2026
One-click install
npx skills add https://github.com/JhonMA82/api-starter --skill systematic-debugging-jhonma82
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/JhonMA82/api-starter/tree/main/.agents/skills/systematic-debugging
Command: npx skills add https://github.com/JhonMA82/api-starter --skill systematic-debugging-jhonma82

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? When facing bugs, test failures, or unexpected behavior, the temptation to apply quick symptom fixes leads to thrashing, recurring issues, and wasted hours. This Skill enforces a disciplined investigation process that finds the actual root cause before any fix is attempted. ## Core Features & Use Cases - Four-Phase Process: Root cause investigation, pattern analysis, hypothesis testing, and verified implementation, with mandatory completion of each phase before proceeding. - Supporting Techniques: Includes root-cause tracing through call stacks, defense-in-depth validation across layers, condition-based waiting to replace flaky timeouts, and a bisection script to find test polluters. - Pressure Resistance: Explicit red flags, rationalization tables, and architectural escalation rules (question the design after 3 failed fixes) keep the process intact under time pressure. - Use Case: A test fails intermittently in CI. Instead of adding arbitrary sleeps, you trace the data flow backward, find the original trigger, fix it at the source, and add validation at each layer so the bug becomes structurally impossible. ## 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 a 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 verified fix. Never propose fixes before completing the investigation phase.

How to fix flaky tests caused by arbitrary timeouts?▼

Replace setTimeout or 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, which eliminates race conditions and typically speeds up test execution.

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

Stop after three failed fixes and question the architecture rather than attempting a fourth. Repeated failures where each fix reveals new problems elsewhere indicate a fundamentally wrong pattern, so discuss architectural refactoring before continuing.

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

Use the find-polluter.sh bisection script with the polluted path and a test file pattern. It runs each test individually and stops at the first one that creates the unwanted file or directory, identifying the exact polluting test.

When is it acceptable to skip systematic debugging for simple bugs?▼

Never. Simple bugs have root causes too, and the process is fast for simple issues. Skipping investigation under time pressure guarantees rework, since symptom fixes set a pattern of guessing that compounds into larger problems.