diagnosing-bugs

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

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

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 pass/fail signal, debugging devolves into unfalsifiable guessing. This Skill enforces a disciplined diagnosis loop that builds a tight, deterministic 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, headless browser scripts, trace replay, fuzz loops, or bisection harnesses. - Ranked Hypothesis Testing: Generates 3-5 falsifiable hypotheses, instruments one variable at a time with tagged debug logs, and validates fixes against the original scenario. - Regression Lockdown: Converts the minimized repro into a failing regression test at a correct seam, then cleans up all instrumentation. - Use Case: A user reports an intermittent export failure in production. The Skill replays a captured network trace to build a red loop, minimizes the failing input, tests ranked hypotheses, and ships a fix with a regression test. ## Quick Start Diagnose this bug: the export endpoint intermittently returns a 500 error under load.

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

Build a feedback loop that goes red on the exact symptom: replay a captured trace, write a curl script against a dev server, or create a throwaway harness exercising the bug code path. If no loop is possible, request a redacted HAR file, log dump, or permission for temporary production instrumentation.

How to debug flaky non-deterministic test failures?▼

Raise the reproduction rate instead of chasing a clean repro: loop the trigger 100 times, parallelize, add stress, narrow timing windows, and inject sleeps. A 50%-flake bug is debuggable; keep raising the rate until the loop reliably goes red.

What is the best way to diagnose a performance regression?▼

Establish a baseline measurement first using a timing harness, performance.now(), a profiler, or a query plan, then bisect between known states. Logs are usually wrong for perf work; measure first and fix second.

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 pass after the fix. Only do this at a correct seam that exercises the real bug pattern; if no correct seam exists, that architectural gap is itself the finding.

When should I use a human-in-the-loop debugging script?▼

Use it as a last resort when a human must physically interact with the UI. The hitl-loop.template.sh script structures the session with step prompts and captured answers, so the agent still receives parseable output while the human performs clicks or sign-ins.