systematic-debugging

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

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/jeremybrasher/grokbot-skills --skill systematic-debugging-jeremybrasher
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: systematic-debugging
Source: https://github.com/jeremybrasher/grokbot-skills/tree/main/skills/systematic-debugging
Command: npx skills add https://github.com/jeremybrasher/grokbot-skills --skill systematic-debugging-jeremybrasher

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? When facing a bug, test failure, or unexpected behavior, the temptation is to apply a quick symptom fix that masks the real issue and causes repeated failures. This Skill enforces a disciplined investigation process that finds the actual root cause before any code changes. ## Core Features & Use Cases - Four-Phase Process: Root cause investigation, pattern analysis, single-hypothesis testing, and verified implementation with a failing reproduction first. - HOLD Protocol: A structured stop table that returns what evidence is missing instead of guessing when a failure cannot be named, observed, or reproduced. - Supporting Techniques: Companion references for root-cause tracing through call stacks, defense-in-depth validation layers, and condition-based waiting to replace flaky test timeouts. - Use Case: A production API fails intermittently. Instead of adding a retry, you follow Phase 1 to reproduce the failure, trace the bad value to its source, form one hypothesis, and ship a single verified fix. ## 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 a four-phase process: read the error completely and reproduce the failure, compare against working examples, form one testable hypothesis, then implement a single fix verified by a failing reproduction. Never propose a patch before the investigation phase names the cause.

How to fix flaky tests caused by arbitrary timeouts?▼

Replace setTimeout and sleep calls with condition-based waiting that polls for the actual event or state you need. The condition-based-waiting reference includes a waitFor polling pattern and helpers like waitForEvent and waitForEventCount.

What should I do when three or more fixes have already failed?▼

Stop attempting more fixes and question the architecture instead. Repeated failures that each reveal new coupling indicate a structural problem, so raise the architecture question with your team rather than attempting a fourth patch.

When should I not use a systematic debugging process?▼

Do not use it to implement an already-approved design, add features with no failing behavior, produce postmortems, or rewrite architecture on a first failure. It applies only when there is a named, observable technical failure to investigate.

Why does debugging fail when the bug is not reproducible?▼

Without a consistent reproduction or a next measurement to take, there is no evidence to investigate, so any root cause would be invented. The correct response is to state what is missing and hold rather than guess a likely fix.

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

Trace backward from the error site by asking what called each function and what value was passed, until you find where the bad value originated. The root-cause-tracing reference shows how to add stack-trace instrumentation and bisect test suites with find-polluter.sh.