systematic-debugging

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

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/surfingalien/FinSurfing --skill systematic-debugging-surfingalien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/surfingalien/FinSurfing/tree/main/.claude/skills/systematic-debugging
Command: npx skills add https://github.com/surfingalien/FinSurfing --skill systematic-debugging-surfingalien

SYSTEM DOCUMENTATION & REQUIREMENTS

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

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 or social pressure to apply a quick workaround. ## Core Features & Use Cases - Four-Phase Process: Root cause investigation, pattern analysis, hypothesis testing, and verified implementation with mandatory failing test cases. - 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. - Anti-Rationalization Guardrails: Red flags, common rationalizations, and eight documented anti-patterns that stop premature fixes, shotgun changes, and symptom patching. - Use Case: When a test fails intermittently in CI, use this Skill to reproduce the failure consistently, trace the bad value to its source, form a single hypothesis, and verify the fix with a failing-then-passing test instead of stacking sleep calls. ## Quick Start Use the systematic-debugging skill to investigate why this test is failing and find the root cause before proposing 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 failing test systematically?

Follow the four phases: reproduce the failure consistently and read error messages completely, compare against working examples, form one specific hypothesis and test it minimally, then create a failing test case before implementing a single fix. Never change multiple things at once.

How to find the root cause of a bug deep in the call stack?

Trace backward through the call chain from the error location, asking what called each function and what value was passed, until you find the original trigger. Add stack trace instrumentation with console.error before the failing operation if manual tracing is not possible.

Should I apply a quick fix during a production emergency?

The skill mandates root cause investigation even under time pressure, arguing that systematic debugging is faster than guess-and-check thrashing. Quick symptom fixes mask the real issue and typically cause the incident to recur.

Why are my tests flaky and how do I fix race conditions?

Flaky tests usually rely on arbitrary setTimeout delays that guess at timing. Replace them with condition-based waiting that polls for the actual expected state or event, which eliminates race conditions and typically speeds up execution.

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

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

When is it acceptable to skip the systematic debugging process?

Never, according to the skill. Simple bugs have root causes too, and skipping investigation for seemingly easy issues is listed as a rationalization that leads to rework and new bugs.