investigate

Diagnose bugs through systematic root cause investigation before applying fixes.

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/raghavbadhwar/rstack --skill investigate-raghavbadhwar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: investigate
Source: https://github.com/raghavbadhwar/rstack/tree/main/investigate
Command: npx skills add https://github.com/raghavbadhwar/rstack --skill investigate-raghavbadhwar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When errors, stack traces, or unexpected behavior appear, developers often jump straight to patching symptoms. This Skill enforces a disciplined four-phase debugging workflow—investigate, analyze, hypothesize, implement—so fixes are grounded in an identified root cause rather than guesswork. ## Core Features & Use Cases - Root Cause Enforcement: Follows an Iron Law of no fixes without root cause, guiding the agent through investigation and hypothesis phases before any code change. - Scoped Edit Guardrails: PreToolUse hooks check a freeze boundary before Edit or Write operations, keeping debugging changes within the intended scope. - Historical Context Loading: Pulls prior investigations, project learnings, and recent eureka moments from local gstack analytics to inform the current diagnosis. - Use Case: A user reports "the checkout endpoint returns 500 since yesterday." The Skill investigates logs and code, forms and tests hypotheses about the regression, identifies the root cause, and only then implements the fix. ## Quick Start Ask the agent to investigate why the login endpoint started returning 500 errors and find the root cause before fixing it.

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 fixes?

Use a phased root cause workflow: investigate the symptoms, analyze the evidence, form and test hypotheses, then implement the fix only after the root cause is confirmed. This Skill enforces that sequence and blocks premature edits.

How to find the root cause of a 500 error or stack trace?

Start from the error output and stack trace, trace execution back through the failing code path, and test hypotheses against logs and recent changes. The Skill loads prior investigations and project learnings to surface known patterns before proposing a fix.

Can this Skill prevent changes outside the debugging scope?

Yes. PreToolUse hooks run a freeze-boundary check before every Edit and Write operation, so modifications stay within the approved debugging scope. Out-of-scope writes are blocked by the check script.

When should I use root cause investigation versus a quick patch?

Use root cause investigation for regressions, recurring errors, and anything where the cause is unclear, since patching symptoms often reintroduces the bug. A quick patch is only appropriate when the cause is already fully understood.

Does the debugging Skill work in headless or CI sessions?

Yes, it detects the session kind (interactive, spawned, or headless) and adapts. In headless runs it blocks instead of prompting when user input is unavailable, and in spawned sessions it auto-selects recommended options and reports results as prose.