diagnose

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

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/TrayMachi/dotfiles --skill diagnose-traymachi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/TrayMachi/dotfiles/tree/main/agents/skills/diagnose
Command: npx skills add https://github.com/TrayMachi/dotfiles --skill diagnose-traymachi

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 reliable reproduction signal. This Skill enforces a disciplined six-phase loop — build a feedback loop, reproduce, hypothesise, instrument, fix, and clean up — so debugging becomes systematic 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 Playwright 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 cleanup is a single grep, and the post-mortem phase records the confirmed root cause. - Use Case: A user reports that an export endpoint intermittently returns empty files. The Skill guides building a loop that replays the failing request 100 times, ranking hypotheses about race conditions, instrumenting the suspected boundary, and landing a regression test with the fix. ## Quick Start Ask the agent to diagnose the bug where the export endpoint intermittently returns empty files and follow the structured diagnosis loop.

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 or flaky bug?

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 bug is debuggable; a 1% flake is not, so keep increasing the rate until hypotheses can be tested against it.

How to diagnose a performance regression in code?

Establish a baseline measurement first using a timing harness, profiler, or query plan, then bisect between known-good and known-bad states. Logs are usually the wrong tool for performance work; measure first and fix second.

What should I do when a bug cannot be reproduced?

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 core dump, or permission to add temporary production instrumentation before forming hypotheses.

When should I write a regression test for a bug fix?

Write the regression test before the fix, but only at a correct seam that exercises the real bug pattern as it occurs at the call site. If no correct seam exists, that architectural gap is itself a finding worth flagging.

Why generate multiple hypotheses before testing a bug?

Generating 3-5 ranked falsifiable hypotheses prevents anchoring on the first plausible idea. Each hypothesis must state a testable prediction, and showing the list to the user lets domain knowledge re-rank it cheaply before testing begins.