diagnose

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

Updated May 11, 2026
One-click install
npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill diagnose-cloudofgeorge
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/cloudofgeorge/AI-hands-Engineer/tree/main/skills/engineering/diagnose
Command: npx skills add https://github.com/cloudofgeorge/AI-hands-Engineer --skill diagnose-cloudofgeorge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions resist casual debugging: without a deterministic reproduction signal, developers guess at causes and apply fixes that don't stick. This Skill enforces a disciplined six-phase loop that turns vague failure reports into verified fixes with regression tests. ## Core Features & Use Cases - Feedback loop construction: Builds a fast, deterministic pass/fail signal using failing tests, curl scripts, CLI fixtures, headless browser runs, trace replays, fuzz loops, or git bisect harnesses. - Ranked hypothesis testing: Generates 3-5 falsifiable hypotheses, instruments one variable at a time with tagged debug logs, and measures baselines for performance regressions. - Regression lockdown and post-mortem: Writes the regression test before the fix at a correct seam, cleans up all instrumentation, and hands architectural findings off for follow-up. - Use Case: A user reports that an export button intermittently throws an error. The Skill builds a reproduction loop (using the included human-in-the-loop bash template if needed), reproduces the failure, tests ranked hypotheses, applies the fix, and leaves a regression test behind. ## Quick Start Ask the agent to diagnose the bug where the export button intermittently throws an error and have it build a reproduction loop first.

Frequently Asked Questions about diagnose

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

FAQPage Schema
How do I debug an intermittent bug that only happens sometimes?▼

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 bug that fails 50% of the time is debuggable; one at 1% is not, so keep increasing the rate until hypotheses can be tested against it.

How to reproduce a bug before fixing it?▼

Build a fast, deterministic pass/fail loop first: a failing test, a curl script against a dev server, a CLI fixture diffed against a snapshot, or a headless browser script. Then iterate on the loop itself to make it faster, sharper, and more deterministic before forming hypotheses.

What should I do when a bug cannot be reproduced locally?▼

Stop and say so explicitly rather than guessing. List what you tried, then ask for environment access, a captured artifact such as a HAR file or log dump, or permission to add temporary production instrumentation. Do not proceed to hypothesising without a working loop.

How do I diagnose a performance regression in code?▼

Establish a baseline measurement first using a timing harness, performance.now(), a profiler, or a query plan, then bisect to find the regression point. Logs are usually the wrong tool for performance work; measure first and fix second.

When should a regression test not be written for a bug fix?▼

Skip it when no correct seam exists, meaning no test location exercises the real bug pattern as it occurs at the call site. A shallow test gives false confidence; instead document the missing seam as an architectural finding for follow-up.