diagnosing-bugs

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

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

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 command (failing test, curl script, headless browser, replayed trace, fuzz loop, or bisection harness) that catches the exact reported symptom. - Structured Hypothesis Testing: Generates 3-5 ranked, falsifiable hypotheses and maps each instrumentation probe to a specific prediction, changing one variable at a time. - Regression Lockdown: Converts the minimized repro into a regression test at a correct seam, verifies the fix, and removes all tagged debug instrumentation. - Use Case: A user reports the export endpoint intermittently returns empty files. The Skill builds a curl-based loop that reproduces the failure at a high rate, minimizes the input, tests ranked hypotheses with tagged logs, and lands a fix with a regression test. ## Quick Start Diagnose this bug: the checkout page throws a 500 error when the cart contains more than three items.

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 tight feedback loop first: a failing test, curl script, CLI invocation, or headless browser script that goes red on the exact reported symptom. Then minimize the repro by removing inputs and steps one at a time until every remaining element is load-bearing.

What is a good hypothesis for debugging?▼

A good debugging hypothesis is falsifiable and states a concrete prediction, such as: if X is the cause, then changing Y will make the bug disappear. Generate 3-5 ranked hypotheses before testing any of them to avoid anchoring on the first plausible idea.

Can I debug a bug without being able to reproduce it?▼

No. Without a red-capable feedback loop, hypothesizing is guessing. Stop, list what you tried, and ask the user for environment access, a redacted captured artifact like a HAR file or log dump, or permission to add temporary production instrumentation.

How do I debug a performance regression?▼

For performance regressions, logs are usually the wrong tool. Establish a baseline measurement with a timing harness, profiler, or query plan, then bisect between known states. Measure first, fix second.

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 as a finding itself.