diagnose

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

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/taylorelley/skills --skill diagnose-taylorelley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/taylorelley/skills/tree/main/skills/engineering/diagnose
Command: npx skills add https://github.com/taylorelley/skills --skill diagnose-taylorelley

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 diagnosis loop so the root cause is found, fixed, and locked down with a regression test instead of being patched by guesswork. ## Core Features & Use Cases - Feedback-loop construction: Builds a fast, deterministic pass/fail signal using failing tests, curl scripts, CLI fixtures, headless browsers (Playwright/Puppeteer), trace replay, fuzz loops, or git bisect harnesses. - Ranked falsifiable hypotheses: Generates 3-5 hypotheses with explicit predictions before testing, and instruments with tagged debug logs or baseline performance measurements. - Regression testing and post-mortem: Writes the regression test before the fix at a correct seam, cleans up all debug instrumentation, and hands architectural findings off for follow-up. - Use Case: A user reports that the export button intermittently throws an error. The Skill builds a reproduction loop, raises the flake rate until it is debuggable, isolates the cause one variable at a time, and ships a fix guarded by a failing-then-passing test. ## Quick Start Diagnose this bug: the export endpoint intermittently returns a 500 error, and help me reproduce it, find the root cause, and add a regression test.

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 intermittently?

Intermittent bugs are debugged by raising the reproduction rate rather than seeking 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 test hypotheses against.

How to reproduce a bug before fixing it?

Build a fast, deterministic pass/fail feedback loop first: a failing test, a curl script against a dev server, a CLI invocation with a fixture, or a headless browser script. Confirm the loop reproduces the exact symptom the user described before forming hypotheses.

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

Stop and say so explicitly rather than guessing. Ask the user for environment access, a captured artifact such as a HAR file, log dump, or screen recording, or permission to add temporary production instrumentation before proceeding.

How do I diagnose a performance regression in my code?

Performance regressions are diagnosed by measuring first: establish a baseline with a timing harness, performance.now(), a profiler, or query plans, then bisect to find the change that caused the slowdown. Logging is usually the wrong tool for perf work.

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

Write the regression test before the fix, but only at a correct seam where the test exercises the real bug pattern as it occurs at the call site. If no correct seam exists, document that as an architectural finding instead of writing a shallow test.