debug

Diagnose bugs and test failures through evidence-driven reproduction, hypothesis testing, and root-cause analysis.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/HACK-WU/skills --skill debug-hack-wu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug
Source: https://github.com/HACK-WU/skills/tree/main/skills/debug
Command: npx skills add https://github.com/HACK-WU/skills --skill debug-hack-wu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When facing bugs, errors, test failures, or unexpected behavior, developers often guess at fixes by reading code statically, leading to wrong fixes and wasted time. This Skill enforces a systematic debugging loop where every conclusion is backed by runtime evidence—logs, stack traces, variable values, and test results—rather than speculation. ## Core Features & Use Cases - Evidence-Driven Debugging Loop: Executes a closed loop of information gathering, minimal reproduction, evidence collection, hypothesis-verify cycles, root-cause localization, minimal fix, and regression verification. - Bisection and Instrumentation: Uses git bisect, code disabling, and input halving to narrow scope, plus temporary DEBUG-TRACE instrumentation that is always cleaned up afterward. - Handoff Integration: Receives failure root-cause tasks from api-testing, e2e-testing, and demo-verify skills, and hands off impact analysis to bug-impact-analysis before or after fixes. - Use Case: A failing API test is handed over with its assertion output and logs; the Skill reproduces the failure minimally, instruments the suspicious path, falsifies hypotheses one by one, locates the root cause, applies a minimal fix, and verifies the reproduction case now passes. ## Quick Start Ask the AI to debug why this test is failing and locate the root cause with runtime evidence.

Frequently Asked Questions about debug

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

FAQPage Schema
How do I debug a failing test systematically?

Start by using the failing test as the minimal reproduction case, then collect runtime evidence from logs and stack traces. Form falsifiable hypotheses, verify them one at a time, and apply a minimal fix only after locating the root cause with evidence.

How to find which commit introduced a bug?

Use git bisect to binary-search the commit history between a known-good and known-bad state. This version-dimension bisection quickly narrows the introduction point without manually reviewing every change.

What should I do when a bug cannot be reproduced?

List the variables the reproduction depends on—data, timing, concurrency, environment—and align them one by one. If reproduction remains impossible, do not make blind changes; instead output a checklist of needed information such as production logs or real data samples.

Does this debugging approach modify my code permanently?

Only the minimal root-cause fix is kept permanently. All temporary instrumentation marked with DEBUG-TRACE and temporary reproduction scripts are removed after diagnosis, with a global search confirming zero leftover traces.

When should debugging hand off to impact analysis?

Hand off before fixing when the root cause is systemic, spans modules, has multiple candidate fixes, or touches public functions with many callers. After fixing, impact analysis runs by default when changes affect shared code or core paths.