diagnosing-bugs

Diagnose hard bugs through feedback loops, hypothesis testing, and root-cause fixes with regression tests.

1|1|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/muhammaddadu/ai-skill-collection --skill diagnosing-bugs-muhammaddadu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/muhammaddadu/ai-skill-collection/tree/main/3-delivery/diagnosing-bugs
Command: npx skills add https://github.com/muhammaddadu/ai-skill-collection --skill diagnosing-bugs-muhammaddadu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Debugging hard or flaky bugs often devolves into guessing, symptom-patching, and thrashing. This Skill enforces a systematic six-phase discipline that finds the actual root cause and locks it down with a regression test. ## Core Features & Use Cases - Red-Capable Feedback Loops: Build a tight, deterministic, agent-runnable command that reproduces the exact user symptom before any hypothesis work begins. - Structured Hypothesis Testing: Generate 3-5 ranked, falsifiable hypotheses, then instrument with tagged debug logs or a debugger, changing one variable at a time. - Root-Cause Fixes with Regression Tests: Fix at the source (never the symptom), convert the minimized repro into a failing test at the correct seam, and clean up all instrumentation afterward. - Use Case: A CI test fails intermittently. Use this Skill to raise the reproduction rate, bisect to the offending change, confirm the root cause with evidence, and ship a fix plus a regression test. ## Quick Start Use the diagnosing-bugs skill to find the root cause of this failing test and fix it with a regression test.

Frequently Asked Questions about diagnosing-bugs

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

FAQPage Schema
How do I debug a flaky test that only fails sometimes?

Raise the reproduction rate instead of chasing a clean repro: loop the trigger 100 times, parallelize, add stress, and narrow timing windows. A 50% flake is debuggable; keep increasing the rate until your feedback loop reliably goes red.

How to find the root cause of a bug instead of patching symptoms?

Build a red-capable feedback loop first, then generate 3-5 ranked falsifiable hypotheses and test them one variable at a time. Only write the fix once you can state the root cause and the evidence confirming it.

What is a red-capable feedback loop in debugging?

It is a single command (test, curl script, CLI invocation, or headless browser script) that drives the actual bug code path and asserts the user's exact symptom. It must be deterministic, fast, and runnable unattended so it goes red on the bug and green once fixed.

When should I write the regression test during debugging?

Write the regression test before the fix, but only if a correct seam exists where the test exercises the real bug pattern as it occurs at the call site. If no correct seam exists, document that finding as an architecture issue instead of writing a shallow test.

When should I not use this debugging skill?

Do not use it for post-incident reviews; use an incident-postmortem process instead. It is designed for live root-cause diagnosis of reproducible bugs and performance regressions, not retrospective analysis.