debug-investigation

Investigates bugs through reproduction, ranked hypotheses, and a minimal verified fix.

3|3|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/philipobenito/elelem --skill debug-investigation-philipobenito
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug-investigation
Source: https://github.com/philipobenito/elelem/tree/main/skills/debug-investigation
Command: npx skills add https://github.com/philipobenito/elelem --skill debug-investigation-philipobenito

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a bug, error, crash, or failing test is reported, it is tempting to jump straight to a fix based on the error message alone. This Skill enforces a disciplined, evidence-driven investigation that reproduces the bug first, identifies the true root cause, and delivers a minimal verified fix instead of a speculative patch. ## Core Features & Use Cases - Seven-phase investigation procedure: Understand the problem, reproduce, gather scoped evidence, form ranked hypotheses, test them within a three-cycle budget, confirm the root cause, then fix with a regression test, code review, and fresh verification. - Hard gates and budgets: No fix without reproduction and an identified root cause, a five-file refocus rule to stop evidence spirals, and a three-cycle investigation budget before asking the user for direction. - Explicit return states: Every run ends as Fixed, Escalated to design, Non-reproducible, or Budget exhausted, so an unresolved bug is never silently claimed as fixed. - Use Case: A user reports that a checkout endpoint intermittently returns null. The Skill reproduces the failure, traces it to an enum change in a recent commit, gets the fix approach approved, writes a failing regression test, applies the minimal fix, and verifies the full suite passes. ## Quick Start Use the debug-investigation skill to investigate this failing test and find its root cause before changing any code.

Frequently Asked Questions about debug-investigation

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 procedure: reproduce the bug first, gather scoped evidence around the error site, form two to four ranked hypotheses with predicted observations, and test them in order. Only after the root cause is confirmed and approved do you write a regression test and apply a minimal fix.

How to find the root cause of a failing test?

Reproduce the failing test and capture the exact output, then read only the error site plus one level of callers and callees. Distinguish the symptom from the root cause by tracing the causal chain, and confirm with a targeted check before fixing.

What should I do when a bug is not reproducible?

Stop the investigation at the reproduction phase and state explicitly that the bug is non-reproducible. Check that the environment matches dependencies, config, and data, then ask the reporter for the missing conditions, since a non-reproducible bug cannot have a verified fix.

When should a bug fix be escalated instead of applied?

Escalate when the confirmed root cause requires a fix that exceeds the minimal fix principle, such as several separate changes, a redesign, or a new interface. Hand the root cause, reproduction, and affected modules to the design stage rather than shrinking the fix to fit.

Why does debugging without a budget waste time?

Unbounded investigation becomes an ever-widening search that burns context without converging. Limiting the work to three hypothesis-test cycles forces a refocus conversation with the user, presenting what was ruled out and what remains uncertain instead of guessing.