debug-investigate

Guide systematic root-cause debugging with reproduction, scoped narrowing, and hypothesis testing.

1|Updated Jul 9, 2026
One-click install
npx skills add https://github.com/PiercingXX/xx-stack --skill debug-investigate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-investigate
Source: https://github.com/PiercingXX/xx-stack/tree/main/runtime/skills/debug-investigate
Command: npx skills add https://github.com/PiercingXX/xx-stack --skill debug-investigate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

debug-investigate helps prevent premature changes by guiding you to reproduce, narrow scope, test hypotheses, and identify the true root cause of a bug or inconsistency.

Core Features & Use Cases

  • Reproduction-first debugging: verifies whether the symptom is consistently reproducible or intermittent before making any assumptions.
  • Hypothesis-driven narrowing: generates 3–5 targeted hypotheses and runs exactly one focused test per hypothesis to quickly confirm or eliminate causes.
  • Guardrails for safe fixes: enforces “no fixes without investigation,” stops after 3 failed hypothesis tests, and then recommends or applies only the smallest patch once the cause is confirmed.

Use case: A production issue appears sporadically after a release; use this skill to reproduce the behavior, isolate the affected component or state, test race vs. logic vs. environment hypotheses, and only then implement a minimal corrective patch with verification.

Quick Start

Use the debug-investigate skill to investigate the reported production bug by reproducing it, generating hypotheses, testing them one at a time, stopping after three ruled-out hypotheses, and then applying the smallest fix only after the root cause is confirmed.

Frequently Asked Questions about debug-investigate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the root cause of a production incident without making premature code changes?

Root cause analysis for production incidents requires reproducing the symptom, generating 3-5 targeted hypotheses, and testing exactly one per hypothesis. This systematic investigation enforces no fixes without confirmed evidence, stopping after three failed checks.

What's the best way to debug inconsistent behavior and sporadic regression issues after a release?

Debugging sporadic regression after a release involves reproduction-first verification to check consistency, then hypothesis-driven narrowing to isolate affected components or state. Test race, logic, and environment hypotheses one at a time before applying the smallest corrective patch.

How does hypothesis testing work when investigating a complex software bug?

Hypothesis testing during bug investigation generates 3-5 targeted assumptions and runs exactly one focused test per hypothesis. This process quickly confirms or eliminates potential causes, stopping after three ruled-out hypotheses to prevent endless trial-and-error debugging.

How do I debug 'works on my machine' scenarios where production behavior differs?

Investigating works on my machine scenarios requires scoped narrowing to isolate environment differences and state inconsistencies. Verify if symptoms are consistently reproducible or intermittent, test environment hypotheses against logic hypotheses, and confirm the cause before patching.

When should I stop investigating a bug and reconsider my debugging workflow?

Stop investigating a bug after three failed hypothesis tests, as enforced by this debugging workflow. This guardrail prevents endless trial-and-error, ensuring you step back to re-examine reproduction steps or seek additional evidence before attempting further fixes.

Can I apply a code fix before completing the root cause investigation workflow?

No code fixes are allowed without investigation. This workflow enforces strict guardrails requiring confirmed root cause evidence through reproduction and hypothesis testing, ensuring only the smallest minimal patch is applied once the true cause is verified.