diagnosing-bugs

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and flaky performance regressions resist casual code reading; without a reproducible signal, debugging devolves into guessing. This Skill enforces a disciplined diagnosis loop that builds a tight pass/fail reproduction before any hypothesis is tested. ## Core Features & Use Cases - Feedback Loop Construction: Builds a red-capable, deterministic, fast reproduction command using failing tests, curl scripts, CLI fixtures, Playwright browser automation, trace replay, fuzz loops, or git bisect harnesses. - Structured Six-Phase Process: Guides reproduction and minimization, ranked falsifiable hypothesis generation, single-variable instrumentation with tagged debug logs, regression-test-first fixing, and cleanup verification. - Human-in-the-Loop Fallback: Ships a bash template (scripts/hitl-loop.template.sh) that drives a human through manual reproduction steps and captures observations as parseable KEY=VALUE output. - Use Case: A user reports that the export endpoint intermittently returns corrupt files. The Skill builds a curl loop that reproduces the failure at a high rate, minimizes the input, tests ranked hypotheses one variable at a time, and lands a regression test with the fix. ## Quick Start Ask the agent to diagnose the failing export endpoint by building a reproduction loop and following the diagnosing-bugs workflow.

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 chasing a clean repro: loop the trigger 100 times, parallelize, add stress, narrow timing windows, or inject sleeps. A 50%-flake bug is debuggable; a 1% flake is not.

How to reproduce a bug before fixing it?▼

Build one agent-runnable command that drives the actual bug code path and asserts the user's exact symptom, such as a failing test, curl script, CLI fixture diff, or Playwright browser script. Confirm it goes red, then minimize inputs until every remaining element is load-bearing.

Can I use Playwright to reproduce UI bugs?▼

Yes, a headless browser script with Playwright or Puppeteer is one of the recommended feedback loops. It drives the UI and asserts on DOM, console, or network behavior, giving an automated red/green signal for front-end bugs.

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

Writing the regression test first proves the test actually catches the bug by watching it fail before the fix and pass after. It only applies when a correct seam exists where the test exercises the real bug pattern as it occurs at the call site.

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

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

How do I debug a performance regression?▼

For performance regressions, avoid log-based probing and instead establish a baseline measurement with a timing harness, performance.now(), a profiler, or a query plan, then bisect. Measure first, fix second.