systematic-debugging

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

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/virahitvin8/crafty-gis --skill systematic-debugging-virahitvin8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/virahitvin8/crafty-gis/tree/main/GIT_STAR/assignment-generator/antigravity-skills-main/antigravity-skills-main/skills/systematic-debugging
Command: npx skills add https://github.com/virahitvin8/crafty-gis --skill systematic-debugging-virahitvin8

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 apply a quick workaround. ## Core Features & Use Cases - Four-Phase Process: Root cause investigation, pattern analysis, hypothesis testing, and implementation, with mandatory completion of each phase before proceeding. - 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 a rule to question the architecture after three failed fix attempts. - Use Case: A test fails intermittently in CI. Instead of adding longer sleep delays, 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 the 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 fix with a failing test. 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 eliminated flakiness and ran 40% faster in real sessions.

What should I do when a bug appears deep in the call stack?

Trace backward through the call chain to find the original trigger rather than fixing where the error appears. Add stack trace instrumentation with console.error before the failing operation, then fix at the source and add validation at each layer.

When should I question the architecture instead of fixing the bug?

After three or more failed fix attempts, stop and question the architecture. Signals include each fix revealing new problems elsewhere, fixes requiring massive refactoring, or new symptoms appearing after each change. Discuss with your team before attempting more fixes.

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

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