systematic-debugging

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

Updated Dec 20, 2025
One-click install
npx skills add https://github.com/cristoslc/LLM-personal-agent-patterns --skill systematic-debugging-cristoslc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/cristoslc/LLM-personal-agent-patterns/tree/main/L3-agents-core/.agents/skills/systematic-debugging
Command: npx skills add https://github.com/cristoslc/LLM-personal-agent-patterns --skill systematic-debugging-cristoslc

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 root causes instead of treating symptoms, even under time pressure or social pressure to apply quick fixes. ## 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. - Pressure Resistance: Explicit anti-patterns, red flags, and rationalization tables that counter shortcuts like "just one quick fix" during emergencies. - Use Case: When a test fails intermittently in CI, follow Phase 1 to reproduce and gather evidence, trace the bad value to its source, form a single hypothesis, and implement one verified fix with a failing test first. ## Quick Start Ask the AI to apply the systematic debugging skill to investigate a failing test or bug and identify 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: 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. The included condition-based-waiting technique raised one test suite's pass rate from 60% to 100%.

Should I skip root cause analysis during a production emergency?▼

No. The skill explicitly states systematic debugging is faster than guess-and-check thrashing, even under time pressure. Quick symptom fixes set a bad pattern and typically cause rework and new bugs.

What should I do when three or more fix attempts have failed?▼

Stop attempting more fixes and question the architecture. Repeated failures where each fix reveals new problems elsewhere indicate a fundamentally wrong pattern, which should be discussed before further changes.

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

Use the included find-polluter.sh bisection script, which runs test files one by one and stops at the first test that creates the unwanted file or directory, identifying the exact polluter.