systematic-debugging

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

10|1|Updated Jul 29, 2026
One-click install
npx skills add https://github.com/flowing-abyss/obsidian-local-fonts --skill systematic-debugging-flowing-abyss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/flowing-abyss/obsidian-local-fonts/tree/main/.ai/skills/systematic-debugging
Command: npx skills add https://github.com/flowing-abyss/obsidian-local-fonts --skill systematic-debugging-flowing-abyss

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Developers under time pressure often apply quick symptom fixes that fail repeatedly, causing hours of thrashing and recurring bugs. This Skill enforces a disciplined four-phase debugging 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 explicit gates between phases. - 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. - Failure Escalation: After three failed fixes, the process mandates questioning the architecture rather than attempting a fourth fix. - Use Case: When a test fails intermittently in CI, instead of adding longer sleep delays, trace the data flow backward to 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 debug a test failure systematically instead of guessing?

Follow the four phases: read error messages and reproduce the issue consistently, compare against working examples, form one hypothesis and test it minimally, then implement a single fix verified by a failing test. Never propose fixes 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 what called each function and what values were passed, continuing until you find the original trigger. Add stack trace instrumentation with console.error before the failing operation if manual tracing is not possible.

What should I do when my first fix does not work?

Stop and return to Phase 1 to re-analyze with the new information rather than stacking more fixes. If three or more fixes have failed, treat it as an architectural problem and discuss the fundamental design before attempting another fix.

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 state you need, such as an event appearing or a count being reached. Poll every 10ms with a clear timeout error message.

When is it acceptable to skip the systematic debugging process?

The skill states it is never acceptable, including for simple bugs, emergencies, or manager pressure. Systematic investigation is faster than guess-and-check thrashing, and simple bugs have root causes too.

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

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