diagnose

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

Updated May 12, 2026
One-click install
npx skills add https://github.com/eduardtomasek/codex-dev-stack --skill diagnose-eduardtomasek
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/eduardtomasek/codex-dev-stack/tree/main/skills/.agents/diagnose
Command: npx skills add https://github.com/eduardtomasek/codex-dev-stack --skill diagnose-eduardtomasek

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Hard bugs and performance regressions stall when developers jump straight to guessing fixes without a reproducible signal. This Skill enforces a disciplined six-phase loop — build a feedback loop, reproduce, hypothesise, instrument, fix with regression test, and clean up — so root causes are found systematically instead of by luck. ## Core Features & Use Cases - Feedback loop construction: Ten ranked strategies for building a deterministic pass/fail signal, from failing tests and curl scripts to replayed traces, fuzz loops, and git bisect harnesses. - Ranked falsifiable hypotheses: Generates 3-5 hypotheses with explicit predictions before 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 captures the confirmed root cause in the commit message. - Use Case: A user reports "the export button throws intermittently." The Skill builds a loop (possibly using the bundled human-in-the-loop bash template), reproduces the failure, tests ranked hypotheses one variable at a time, and lands a fix guarded by a regression test. ## Quick Start Ask the agent to diagnose the bug where the export endpoint intermittently returns a 500 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 or non-deterministic 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; keep increasing the rate until hypothesis testing becomes practical.

How to reproduce a bug that only a human can trigger in the UI?▼

Use the bundled hitl-loop.template.sh script as a last resort. It prompts the human through structured steps, captures their answers as KEY=VALUE output, and feeds the results back to the agent so the loop stays structured.

What should I do before writing a fix for a bug?▼

First build a deterministic pass/fail feedback loop, reproduce the exact user-reported symptom, then write 3-5 ranked falsifiable hypotheses with explicit predictions. Only instrument and fix after those steps, changing one variable at a time.

How is a performance regression diagnosed differently from a crash?▼

For performance regressions, logs are usually wrong. Establish a baseline measurement with a timing harness, profiler, or query plan first, then bisect between known states. Measure first, fix second.

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

Skip the regression test when no correct seam exists — when the only available test point cannot exercise the real bug pattern as it occurs at the call site. Document the missing seam itself as an architectural finding instead.