dx-swe-debugging

Diagnose software bugs through a four-phase root cause investigation process.

3|5|Updated Jan 21, 2025
One-click install
npx skills add https://github.com/DEEPX-AI/dx_stream --skill dx-swe-debugging-deepx-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dx-swe-debugging
Source: https://github.com/DEEPX-AI/dx_stream/tree/main/.deepx/skills/dx-swe-debugging
Command: npx skills add https://github.com/DEEPX-AI/dx_stream --skill dx-swe-debugging-deepx-ai

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 or social pressure to take shortcuts. ## Core Features & Use Cases - Four-Phase Debugging 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. - Pressure Resistance: Explicit anti-patterns, red flags, and rationalization tables that stop shortcut fixes during emergencies, plus escalation guidance when 3+ fixes fail (indicating architectural problems). - Use Case: A test fails intermittently in CI. Instead of adding sleep delays, you trace the data flow backward, find the race condition at its source, write a failing test, fix the root cause, and add validation layers so the bug cannot recur. ## Quick Start Use the dx-swe-debugging skill to investigate this test failure and find its root cause before proposing any fix.

Frequently Asked Questions about dx-swe-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 the issue, 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 race conditions?▼

Replace arbitrary setTimeout or sleep delays with condition-based waiting that polls for the actual expected state, such as waiting for a specific event or count. This eliminates timing guesses that pass on fast machines but fail under load.

What should I do when my first bug fix doesn't work?▼

Stop and return to root cause investigation 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 further changes.

How do I trace a bug that appears deep in the call stack?▼

Trace backward from the error location through each caller, checking what values were passed at each level until you find the original trigger. Add stack trace instrumentation with console.error before the failing operation if manual tracing is insufficient.

When is it acceptable to skip systematic debugging for a quick fix?▼

The methodology states it is never acceptable, including during production emergencies. Systematic investigation is faster than guess-and-check thrashing, and quick symptom patches typically create new bugs and require rework.

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

Use the included find-polluter.sh bisection script, which runs test files one by one and checks whether the unwanted file or directory appears after each run. It stops and reports the first test that creates the pollution.