diagnose

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

3|Updated Oct 28, 2020
One-click install
npx skills add https://github.com/k0d3x8its/dotfiles --skill diagnose-k0d3x8its
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/k0d3x8its/dotfiles/tree/main/claude/.claude/skills/diagnose
Command: npx skills add https://github.com/k0d3x8its/dotfiles --skill diagnose-k0d3x8its

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Hard bugs and performance regressions resist casual code reading; without a fast, deterministic pass/fail signal, debugging stalls. This Skill enforces a disciplined six-phase loop — feedback loop, reproduce, hypothesise, instrument, fix, regression test — so root causes are found systematically instead of by guesswork. ## Core Features & Use Cases - Feedback-loop construction: Ten ranked strategies for building an agent-runnable repro signal, from failing tests and CLI snapshots to Playwright scripts, fuzz loops, and git bisect harnesses. - Ranked falsifiable hypotheses: Forces 3-5 hypotheses with explicit predictions before any testing, avoiding single-hypothesis anchoring. - Tagged instrumentation and cleanup: Every debug log gets a unique [DEBUG-xxxx] prefix so removal is a single grep, and a post-mortem template captures root cause, fix, and prevention follow-ups. - Use Case: A user reports that a chat bar intermittently fails to expand. The Skill guides building a headless-browser loop that reproduces the glitch at a high rate, ranking hypotheses, instrumenting one variable at a time, writing a regression test at the correct seam, and filing a post-mortem in docs/post-mortems/. ## Quick Start Use the diagnose skill to build a feedback loop and root-cause the bug where the checkout total is occasionally wrong.

Frequently Asked Questions about diagnose

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I debug a bug that cannot be reproduced consistently?▼

Raise the reproduction rate instead of chasing a clean repro: loop the trigger 100 times, parallelise, add stress, narrow timing windows, or inject sleeps. A 50% flake is debuggable; a 1% flake is not, so keep increasing the rate before hypothesising.

How to build a feedback loop for debugging hard bugs?▼

Try in order: a failing test at the right seam, a CLI invocation diffed against a snapshot, a curl script against a dev server, a headless browser script, a replayed captured trace, a throwaway harness, a fuzz loop, or a git bisect harness. Make it fast, sharp, and deterministic.

What should I do when no automated reproduction is possible?▼

Stop and say so explicitly, listing what you tried. Ask for environment access, a captured artifact such as a HAR file or log dump, or permission to add temporary production instrumentation. As a last resort, use the HITL bash template so a human triggers the bug while output is captured.

How do I handle performance regressions differently from functional bugs?▼

Establish a baseline measurement first using a timing harness, profiler, or query plan, then bisect against it. Measure first and fix second; never change code before you can quantify the regression.

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 at the end of the session. Untagged logs tend to survive into production; tagged logs are reliably removed.

When should a regression test not be written before the fix?▼

Skip the test-first step when no correct seam exists, meaning no test can exercise the real bug pattern at the actual call site. A shallow test gives false confidence; instead document the missing seam and flag it for post-mortem follow-up.