investigate

Diagnose bugs through systematic root cause investigation before applying fixes.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/VertaKhan/cs_gstack --skill investigate-vertakhan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: investigate
Source: https://github.com/VertaKhan/cs_gstack/tree/main/.claude/skills/gstack/investigate
Command: npx skills add https://github.com/VertaKhan/cs_gstack --skill investigate-vertakhan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging often devolves into whack-a-mole symptom patching that makes the next bug harder to find. This Skill enforces a disciplined four-phase workflow (investigate, analyze, hypothesize, implement) with one iron law: no fixes without a confirmed root cause. ## Core Features & Use Cases - Root Cause Investigation: Collects symptoms, traces code paths with Grep/Read, checks recent git history, and reproduces the bug before forming any hypothesis. - Pattern Analysis & Hypothesis Testing: Matches bugs against known patterns (race conditions, null propagation, stale cache, config drift), optionally searches the web for sanitized error signatures, and enforces a 3-strike escalation rule. - Scope Lock & Regression Tests: Freezes edits to the affected directory to prevent scope creep, then requires a regression test that fails without the fix and passes with it. - Use Case: A user reports "the checkout total is wrong intermittently." The Skill traces the data flow, identifies a race condition in concurrent cart updates, locks edits to the checkout module, applies a minimal fix, and ships a regression test with a structured debug report. ## Quick Start Ask the assistant to investigate why a specific error or unexpected behavior is happening, providing the error message or reproduction steps.

Frequently Asked Questions about investigate

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

FAQPage Schema
How do I debug a bug systematically instead of guessing?▼

Follow a four-phase process: collect symptoms and reproduce the bug, match it against known failure patterns, verify a root cause hypothesis with temporary logging, then apply a minimal fix with a regression test. Never fix before confirming the root cause.

What is root cause analysis in software debugging?▼

Root cause analysis traces a symptom back through the code path, recent git changes, and data flow to find the actual defect rather than its surface symptom. The fix targets that origin, preventing whack-a-mole debugging where each patch creates new bugs.

How do I write a regression test for a bug fix?▼

Write a test that reproduces the original bug scenario and fails without the fix, then passes once the fix is applied. This proves both that the test is meaningful and that the fix actually resolves the root cause.

When should I stop debugging and escalate to a human?▼

Escalate after three failed hypotheses, when a fix touches more than five files without clear justification, or when the change is security-sensitive and you cannot verify it. Repeated failures usually signal an architectural issue, not a simple bug.

Why do intermittent bugs keep coming back after fixes?▼

Recurring bugs typically mean previous fixes addressed symptoms, not the root cause, or the bug is timing-dependent like a race condition. Check git history for prior fixes in the same files, which indicates an architectural smell.