diagnosing-bugs

Diagnose hard bugs and performance regressions through a structured feedback-loop workflow.

Updated Apr 23, 2026
One-click install
npx skills add https://github.com/sndrgrdn/skills --skill diagnosing-bugs-sndrgrdn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/sndrgrdn/skills/tree/main/diagnosing-bugs
Command: npx skills add https://github.com/sndrgrdn/skills --skill diagnosing-bugs-sndrgrdn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions resist casual code reading; without a reproducible signal, debugging devolves into guessing. This Skill enforces a disciplined six-phase diagnosis loop that builds a tight pass/fail feedback loop first, then reproduces, minimizes, hypothesizes, instruments, fixes, and cleans up. ## Core Features & Use Cases - Feedback loop construction: Builds a red-capable, deterministic, fast reproduction command using failing tests, curl scripts, CLI fixtures, headless browser scripts, trace replay, fuzz loops, or bisection harnesses. - Structured hypothesis testing: Generates 3-5 ranked falsifiable hypotheses, then instruments with tagged debug logs or debugger breakpoints, changing one variable at a time. - Regression testing and cleanup: Writes the regression test before the fix at a correct seam, removes all tagged instrumentation, and documents the confirmed root cause. - Use Case: A user reports an export button throwing an error intermittently. The Skill drives a reproduction loop (using the human-in-the-loop bash template if needed), minimizes the failing scenario, tests ranked hypotheses, and lands a fix with a regression test. ## Quick Start Ask the assistant to diagnose the bug where the export button throws an error, and have it build a reproduction loop before proposing any fix.

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 bug that only happens sometimes?▼

For non-deterministic bugs, raise the reproduction rate instead of seeking a clean repro: loop the trigger 100 times, parallelize, add stress, narrow timing windows, or inject sleeps. A 50% flake rate is debuggable; 1% is not, so keep increasing the rate until the loop is usable.

How to reproduce a bug before fixing it?▼

Build a tight feedback loop first: a failing test, curl script, CLI invocation with fixture input, headless browser script, or replayed captured trace that asserts the user's exact symptom. The loop must be deterministic, fast, and able to go red on this specific bug before any hypothesis work begins.

What should I do when I cannot reproduce a bug locally?▼

Stop and say so explicitly rather than guessing. Ask the user for access to the environment that reproduces it, a redacted captured artifact such as a HAR file or log dump, or permission to add temporary production instrumentation.

Why should I write the regression test before the fix?▼

Writing the regression test first proves the test actually catches the bug: you watch it fail, apply the fix, then watch it pass. It also forces you to find a correct seam where the test exercises the real bug pattern as it occurs at the call site.

How do I debug a performance regression?▼

For performance regressions, avoid log-based probing. Establish a baseline measurement with a timing harness, profiler, or query plan, then bisect between known-good and known-bad states. Measure first, fix second.

When should debugging involve a human in the loop?▼

Use a human-in-the-loop bash script only as a last resort when no automated loop is possible, such as UI flows requiring manual sign-in. The script structures the human's steps and captures their observations as parseable output for the agent.