diagnosing-bugs

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

Updated Jul 12, 2025
One-click install
npx skills add https://github.com/kpayakv2/check-products --skill diagnosing-bugs-kpayakv2
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/kpayakv2/check-products/tree/main/.agents/skills/diagnosing-bugs
Command: npx skills add https://github.com/kpayakv2/check-products --skill diagnosing-bugs-kpayakv2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions resist casual debugging: staring at code rarely finds the cause. This Skill enforces a disciplined diagnosis loop that builds a tight, deterministic pass/fail signal first, then reproduces, minimizes, hypothesizes, instruments, fixes, and cleans up. ## Core Features & Use Cases - Feedback Loop Construction: Ten ranked strategies for building a red-capable repro command, from failing tests and curl scripts to Playwright browser automation, trace replay, fuzz loops, and git bisect harnesses. - Structured Six-Phase Process: Build the loop, reproduce and minimize, generate 3-5 falsifiable ranked hypotheses, instrument with tagged debug logs, write regression tests before fixes, and clean up all instrumentation. - Non-Deterministic Bug Handling: Techniques to raise reproduction rates through repetition, parallelization, stress, and timing injection until flaky bugs become debuggable. - Use Case: A user reports that an export button intermittently throws an error. The Skill guides building a headless browser loop that reproduces the failure, minimizing the scenario, testing ranked hypotheses one variable at a time, and landing a fix with a regression test. ## Quick Start Ask the assistant to diagnose the bug you are experiencing and describe the exact symptom, error message, or slowdown you observed.

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?▼

Intermittent bugs require raising the reproduction rate rather than finding a clean repro. Loop the trigger 100 times, parallelize execution, add stress, narrow timing windows, or inject sleeps until the failure rate is high enough to debug against.

How to reproduce a bug before fixing it?▼

Build a tight feedback loop first: a failing test, curl script, CLI invocation, or headless browser script that asserts the exact user symptom. The loop must be deterministic, fast, and able to go red on this specific bug before you form any hypothesis.

What is the best way to debug performance regressions?▼

Performance regressions need measurement, not logs. Establish a baseline with a timing harness, profiler, or query plan, then bisect between known-good and known-bad states to isolate the change that caused the slowdown.

Can I use git bisect to find when a bug was introduced?▼

Yes, if the bug appeared between two known states. Automate a bisection harness that boots at a given commit, runs your check, and reports pass or fail, then drive it with git bisect run for unattended binary search.

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

Writing the test first proves it actually catches the bug by watching it fail, then confirms the fix by watching it pass. If no correct test seam exists for the real bug pattern, that architectural gap is itself a finding worth documenting.

What should I do when a bug cannot be reproduced locally?▼

Stop and say so explicitly rather than guessing. Ask the user for environment access, a redacted captured artifact like a HAR file or log dump, or permission to add temporary production instrumentation before hypothesizing.