investigate

Diagnose bugs and failing tests by verifying root causes with evidence before any fix.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/hanh-nd/agent-kit --skill investigate-hanh-nd
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: investigate
Source: https://github.com/hanh-nd/agent-kit/tree/main/plugins/agent-kit/.gemini/skills/investigate
Command: npx skills add https://github.com/hanh-nd/agent-kit --skill investigate-hanh-nd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging often jumps straight to patching symptoms, leaving the real root cause unfixed and sibling code paths broken. This Skill enforces an evidence-first investigation workflow that confirms the actual root cause of bugs, crashes, failing tests, and regressions before any code changes happen. ## Core Features & Use Cases - Structured five-phase workflow: Observe, localize, distinguish and verify hypotheses, trace the causal chain, then save and hand off a report. - Hypothesis ledger: Tracks each hypothesis as CONFIRMED, REFUTED, or INCONCLUSIVE with the exact evidence that decided it, preventing repeated dead ends. - Standardized investigation report: Produces a saved handoff document with baseline, root cause chain, evidence table, recommended actions, and prevention measures. - Use Case: A flaky test fails intermittently in CI. Use this Skill to reproduce it, narrow the failing layer, test competing hypotheses (race condition vs. state pollution), and hand off a CONFIRMED root-cause report to the developer or code skill. ## Quick Start Ask the agent to investigate why the login endpoint returns a 500 error after the latest deployment and produce a root-cause report.

Frequently Asked Questions about investigate

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

FAQPage Schema
How do I find the root cause of a failing test?▼

Reproduce the failure deterministically, localize the smallest failing layer, then form hypotheses and run tests that separate them. Confirm the root cause only by directly observing the bad value, branch, or state on the failing path, not by reading code and guessing.

How to debug intermittent or flaky test failures?▼

Document exactly when the failure appears, since deterministic reproduction may not be possible. Hold two to three competing hypotheses such as race conditions or state pollution, and name the fastest test that distinguishes them. If reproduction stays impossible, cap the report status at PROBABLE or INCONCLUSIVE.

What is the difference between a confirmed and probable root cause?▼

CONFIRMED means the suspected condition was directly observed on the failing path or isolated by a targeted test. PROBABLE means strong static evidence exists but nothing was directly verified, such as with intermittent bugs or restricted environments.

When should I stop investigating a bug and escalate?▼

Stop after three refuted hypotheses in a row, when more than five files are affected, when the bug cannot be reproduced, or when the root cause sits inside a third-party dependency. Document what was ruled out and mark the status INCONCLUSIVE or PROBABLE.

Does this investigation workflow modify source code to fix bugs?▼

No. The workflow explicitly forbids source changes and only produces an investigation report with recommended actions. Any temporary instrumentation added during debugging must be removed before the report is saved and handed off.