investigate

Diagnose bugs through phased root cause investigation with regression tests and structured debug reports.

107|7|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/no-session/pstack --skill investigate-no-session
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: investigate
Source: https://github.com/no-session/pstack/tree/main/investigate
Command: npx skills add https://github.com/no-session/pstack --skill investigate-no-session

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging by guessing creates whack-a-mole fixes that never address the real problem. This Skill enforces a disciplined root cause investigation workflow so every fix is verified against evidence, not intuition. ## Core Features & Use Cases - Four-phase debugging workflow: Investigate symptoms, analyze patterns, test hypotheses, then implement a minimal verified fix. - Scope locking: Restricts edits to the affected directory during a debug session to prevent unrelated changes and scope creep. - Regression testing: Requires a test that fails without the fix and passes with it, plus a full test suite run before completion. - Use Case: A user reports "checkout fails intermittently in production." The Skill traces the code path, checks recent git history, matches the symptom against known patterns like race conditions, confirms the hypothesis with a temporary log, then ships a minimal fix with a regression test and a structured debug report. ## Quick Start Ask the AI to investigate why your application throws an error 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?

Follow a phased root cause process: collect symptoms and stack traces, trace the code path, check recent git changes, form a testable hypothesis, and confirm it with temporary logging before writing any fix. This prevents symptom-patching that creates new bugs.

How to find the root cause of an intermittent bug?

Intermittent bugs often indicate race conditions or timing-dependent state. Gather reproduction evidence first, check concurrent access to shared state, and add instrumentation to capture the failure. Do not apply a fix you cannot reproduce and verify.

What should I do after multiple fix attempts fail?

After three failed hypotheses, stop and reconsider the architecture rather than guessing again. Escalate for human review, continue with a new evidence-backed hypothesis, or add logging and wait to catch the bug in the act.

Why write a regression test for every bug fix?

A regression test proves the fix works and prevents the bug from returning. It must fail without the fix and pass with it, confirming both that the test is meaningful and that the root cause was actually addressed.

When should a bug fix be escalated instead of shipped?

Escalate when the root cause remains unclear after investigation, when the fix touches more than five files, or when you cannot reproduce and verify the fix. Unverifiable fixes and large blast radii are signals to stop and involve the user.