diagnose

Diagnose hard bugs and performance regressions through a structured reproduce-hypothesise-fix workflow.

Updated Jul 23, 2025
One-click install
npx skills add https://github.com/derrik-fleming/dotfiles --skill diagnose-derrik-fleming
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/derrik-fleming/dotfiles/tree/main/private_dot_agents/skills/diagnose
Command: npx skills add https://github.com/derrik-fleming/dotfiles --skill diagnose-derrik-fleming

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions stall when developers stare at code without a reproducible signal. This Skill enforces a disciplined six-phase loop — build a feedback loop, reproduce, hypothesise, instrument, fix, and clean up — so debugging converges on the real root cause instead of guesswork. ## Core Features & Use Cases - Feedback-loop construction: Ten ranked strategies for building a deterministic pass/fail signal, from failing tests and curl scripts to headless browser runs, replayed traces, fuzz loops, and git bisect harnesses. - Falsifiable hypothesis ranking: Generates 3–5 ranked 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 checklist captures the confirmed root cause. - Use Case: A user reports that an export endpoint intermittently returns corrupted data. The Skill guides building a 100-iteration loop to raise the reproduction rate, ranking hypotheses, instrumenting the boundary, and landing a regression test at the correct seam. ## Quick Start Ask the agent to diagnose the bug you are seeing and describe the exact symptom, error message, or performance regression you observed.

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 only happens sometimes?▼

Non-deterministic bugs need a higher reproduction rate rather than a clean repro. Loop the trigger 100 times, parallelise, add stress, narrow timing windows, or inject sleeps until the failure rate is high enough to debug against.

How to diagnose a performance regression in code?▼

Performance regressions skip log-based instrumentation. Establish a baseline measurement with a timing harness, profiler, or query plan first, then bisect between states to isolate the cause before fixing.

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

Stop and say so explicitly rather than guessing. Ask for environment access, a captured artifact like a HAR file or log dump, or permission to add temporary production instrumentation before forming hypotheses.

Why write a regression test before fixing a bug?▼

Writing the test first proves it exercises the real bug pattern by watching it fail, then confirms the fix by watching it pass. If no correct test seam exists, that architectural gap is itself a finding worth flagging.

When should I not use a structured debugging workflow?▼

Phases can be skipped only with explicit justification, such as trivial typos with obvious fixes. The workflow targets hard bugs where the cause is unclear; applying it to trivial issues adds unnecessary overhead.