debug

Diagnose and fix root causes of bugs through a structured reproduce and verify loop.

Updated Aug 2, 2026
One-click install
npx skills add https://github.com/JabezJesudasonJena/hack-ag --skill debug-jabezjesudasonjena
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: debug
Source: https://github.com/JabezJesudasonJena/hack-ag/tree/main/.agents/skills/debug
Command: npx skills add https://github.com/JabezJesudasonJena/hack-ag --skill debug-jabezjesudasonjena

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a test fails for a non-obvious reason or behavior is unexpected, developers often patch symptoms instead of causes. This Skill runs a disciplined root cause investigation so the actual bug is found, proven with evidence, and fixed with the smallest possible change. ## Core Features & Use Cases - Structured investigation loop: Reproduce the bug deterministically, localize it by bisecting code or git history, then test one falsifiable hypothesis at a time until the cause is confirmed. - Minimal root cause fix: Applies only the targeted change that addresses the proven cause, with no opportunistic refactors or scope creep. - Regression protection: Verifies the fix against the original reproduction and the surrounding test suite, then adds or hands off a regression test so the bug cannot silently return. - Use Case: A date cutoff test fails only in certain timezones. The Skill reproduces the failure, instruments the parsing boundary, confirms the date is parsed as local time, fixes the parsing, and adds a regression test. ## Quick Start Run the debug skill to find and fix the root cause of this failing test, then add a regression test for it.

Frequently Asked Questions about debug

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, then localize it by bisecting the code path or git history. State one falsifiable hypothesis at a time and confirm or reject it with a small experiment before making any fix.

How to debug intermittent or flaky test failures?

Make the failure deterministic first by controlling timing, ordering, data, or concurrency factors. If reproduction is impossible, add instrumentation to capture the failure context rather than applying a blind fix.

Can this debugging workflow run in a subagent?

Yes, the investigation loop can run in a subagent with Read, Bash, Grep, Glob, Edit, and Write tools so iterative tool use does not fill the main context. The subagent must report the root cause with evidence, not just a fix.

Why should I avoid fixing the first symptom I see?

Patching a symptom like a null value hides the underlying cause, so the bug survives elsewhere. The loop requires proving why the symptom occurs before changing code, ensuring the fix addresses the actual cause.

What happens after the bug fix is verified?

The original reproduction is rerun to confirm it passes, the surrounding test suite is checked for regressions, and a regression test is added or handed to the test skill. Sibling locations with the same root cause are also searched.