investigate

Diagnose bugs through systematic root cause investigation before implementing fixes.

1|Updated Jul 23, 2026
One-click install
npx skills add https://github.com/sanjanb/my-agent-harness --skill investigate-sanjanb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: investigate
Source: https://github.com/sanjanb/my-agent-harness/tree/main/skills/investigate
Command: npx skills add https://github.com/sanjanb/my-agent-harness --skill investigate-sanjanb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging often devolves into guess-and-check patching that masks symptoms instead of fixing the underlying defect. This Skill enforces a disciplined four-phase workflow—investigate, analyze, hypothesize, implement—with an iron law that no fix ships without an identified root cause. ## Core Features & Use Cases - Structured Root Cause Analysis: Walks through investigation, analysis, hypothesis formation, and implementation phases so fixes address the actual defect. - Proactive Error Triage: Triggers on reports of 500 errors, stack traces, regressions, and "it was working yesterday" scenarios. - Context-Aware Sessions: Loads prior investigations, project learnings, and past eureka moments from the gstack knowledge store to avoid re-solving known problems. - Use Case: A user reports a production 500 error after a deploy. The Skill gathers evidence, forms hypotheses, confirms the root cause, and only then guides the fix. ## Quick Start Ask the agent to investigate why the login endpoint started returning 500 errors after the last deploy.

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 with root cause analysis?

Invoke the investigate skill when you hit an error, stack trace, or regression. It walks through four phases—investigate, analyze, hypothesize, implement—and refuses to apply fixes until the root cause is confirmed.

What triggers the investigate debugging skill?

Phrases like "debug this", "fix this bug", "why is this broken", "investigate this error", and "root cause analysis" trigger it. It also activates proactively on reports of 500 errors, stack traces, or behavior that stopped working.

Does the investigate skill work in headless or CI sessions?

Yes, it detects session kind (interactive, spawned, or headless) from the preamble. In headless mode it blocks instead of prompting, and in spawned sessions it auto-chooses recommended options and reports results as prose.

Why does the skill block edits during debugging?

PreToolUse hooks run a freeze check before Edit and Write operations to enforce a debug scope boundary. This prevents premature code changes before the root cause investigation completes.

Can the investigate skill use past debugging history?

Yes, it queries prior investigations tagged to the current repo, loads recent project learnings, and surfaces cross-project eureka moments from the gstack analytics store to inform the current diagnosis.