diagnosing-bugs

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

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

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 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, headless browsers, trace replay, fuzz loops, or bisection harnesses. - Ranked hypothesis testing: Generates 3-5 falsifiable hypotheses, then instruments with tagged debug logs or debugger breakpoints, changing one variable at a time. - Regression test and cleanup: Converts the minimized repro into a regression test at a correct seam, removes all tagged instrumentation, and records the confirmed root cause. - Use Case: A user reports an intermittent export failure. The Skill builds a loop that reproduces it at a high rate, minimizes the scenario, tests ranked hypotheses, applies the fix, and locks it down with a regression test. ## Quick Start Diagnose this bug: the export button throws an error intermittently, so build a reproduction loop and find the root cause.

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?

Non-deterministic bugs require raising the reproduction rate rather than finding a clean repro. Loop the trigger 100 times, parallelize, 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 feedback loop that goes red on the specific symptom: a failing test, a curl script against a dev server, a CLI invocation with fixture input, or a headless browser script. Then minimize it by removing inputs and steps one at a time until every remaining element is load-bearing.

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

Stop and say so explicitly rather than guessing. 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 diagnose a performance regression in code?

For performance regressions, establish a baseline measurement first using a timing harness, profiler, or query plan, then bisect between known states. Measure first and fix second; scattered logging is usually the wrong tool for perf issues.

When should I write a regression test for a bug fix?

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