investigate

Diagnose bugs through systematic root cause investigation before applying verified fixes.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/dhnpmp-tech/project-agent --skill investigate-dhnpmp-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: investigate
Source: https://github.com/dhnpmp-tech/project-agent/tree/main/.claude/skills/gstack/investigate
Command: npx skills add https://github.com/dhnpmp-tech/project-agent --skill investigate-dhnpmp-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging often devolves into whack-a-mole fixes that patch symptoms while the real defect survives. This Skill enforces a disciplined five-phase workflow — investigate, analyze, hypothesize, implement, verify — so every fix is grounded in a confirmed root cause with a regression test proving it works. ## Core Features & Use Cases - Root Cause First (Iron Law): No fix is written until a specific, testable root cause hypothesis is formed from symptoms, code traces, and git history. - Scope Lock: Restricts edits to the affected module via a freeze mechanism, preventing scope creep during a debug session. - Pattern Matching & Hypothesis Testing: Matches bugs against known patterns (race conditions, null propagation, stale cache, config drift) and tests hypotheses with temporary instrumentation, with a 3-strike escalation rule. - Regression Test Requirement: Every fix ships with a test that fails without the fix and passes with it, plus a structured debug report. - Use Case: A user reports "checkout fails intermittently in production." The Skill traces the code path, checks recent commits, identifies a race condition on shared cart state, confirms it with a log probe, applies a minimal fix, and adds a regression test. ## Quick Start Ask the agent to investigate why the payment endpoint returns a 500 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 fixes?

Follow a phased root cause workflow: collect symptoms and stack traces, trace the code path with grep, check recent git changes, then form a testable hypothesis before editing anything. Confirm the hypothesis with a temporary log statement, apply a minimal fix, and add a regression test that fails without it.

What is root cause analysis in software debugging?

Root cause analysis identifies the actual defect behind a symptom rather than patching surface behavior. It involves reproducing the bug, tracing data flow, checking recent changes, and verifying a specific hypothesis with evidence before writing any fix.

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.

What should I do when multiple fix attempts fail?

Stop after three failed hypotheses and escalate rather than guessing further. Repeated failures usually indicate an architectural issue rather than a simple bug, so flag it for human review or add instrumentation to catch the failure next time.

Why does a bug keep recurring in the same files?

Recurring bugs in the same files signal an architectural smell, not coincidence. Check git log for prior fixes in that area and consider whether the module's design — shared state, missing guards, unclear boundaries — is generating the defects.