diagnosing-bugs

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

Updated Sep 21, 2026
One-click install
npx skills add https://github.com/maxentr/la-cuisine-de-mm --skill diagnosing-bugs-maxentr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnosing-bugs
Source: https://github.com/maxentr/la-cuisine-de-mm/tree/main/.agents/skills/diagnosing-bugs
Command: npx skills add https://github.com/maxentr/la-cuisine-de-mm --skill diagnosing-bugs-maxentr

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 signal 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 browser automation, trace replay, fuzz loops, or bisection harnesses. - Structured Hypothesis Testing: Generates 3-5 ranked falsifiable hypotheses, then instruments code with tagged debug logs or profilers, changing one variable at a time. - Regression Lockdown: Writes a regression test at the correct seam before the fix, verifies the original repro, and cleans up all debug instrumentation. - Use Case: A user reports that an export endpoint intermittently throws a 500 error. The Skill guides building a curl-based loop that reproduces the failure, minimizing the input, ranking hypotheses, instrumenting the suspected code path, and landing a fix with a regression test. ## Quick Start Diagnose this bug: the export button throws an intermittent 500 error, and walk me through building a reproduction loop.

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 I cannot reproduce consistently?

Non-deterministic 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 build a feedback loop for debugging a failing API endpoint?

Write a curl or HTTP script against the running dev server that asserts the exact symptom the user reported. The loop must be deterministic, fast, and able to go red on this specific bug, not just run without erroring.

What is the best way to debug performance regressions?

Performance regressions require measurement before fixing: establish a baseline with a timing harness, performance.now(), a profiler, or query plans, then bisect to find the cause. Logs are usually the wrong tool for perf diagnosis.

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

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 architectural gap instead of writing a shallow test.

Why should debug logs be tagged with a unique prefix?

Tagging every debug log with a unique prefix like [DEBUG-a4f2] makes cleanup a single grep operation at the end of the session. Untagged logs tend to survive and pollute the codebase, while tagged logs are reliably removed.

What should I do when I cannot build any reproduction loop?

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