diagnose

Diagnose hard bugs by building deterministic feedback loops for hypothesis testing.

1|1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/luan/agents --skill diagnose-luan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/luan/agents/tree/main/skills/diagnose
Command: npx skills add https://github.com/luan/agents --skill diagnose-luan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Diagnose hard bugs and performance regressions by turning vague failures into a measurable, repeatable signal so you can reliably narrow to root cause.

Core Features & Use Cases

  • Build a feedback loop first: create a fast deterministic pass/fail signal via tests, scripts, CLI fixtures, headless replay, harnesses, fuzzing, bisection, or differential runs.
  • Reproduce before hypothesizing: confirm the failure mode matches the user’s report and is repeatable (or reproducible at a usable rate).
  • Rank falsifiable hypotheses and test predictions: generate 3–5 ranked, prediction-driven hypotheses, then instrument changes one variable at a time.
  • Fix with regression coverage: write a regression test before the fix when a correct seam exists, then re-run the original feedback loop to ensure the symptom is truly resolved.
  • Cleanup and post-mortem: remove tagged debug instrumentation, delete throwaway prototypes, and document the effective cause and what would have prevented the bug.

Quick Start

Diagnose the reported issue by constructing a fast feedback loop that reliably reproduces the exact symptom, then iterate through reproduce, ranked falsifiable hypotheses, targeted instrumentation, and 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 find the root cause of a hard bug that is difficult to reproduce?

To find the root cause of a hard bug, build a deterministic feedback loop that reliably reproduces the exact symptom, then test ranked falsifiable hypotheses by changing one variable at a time until the root cause is identified.

What is the best way to debug a performance regression?

The best way to debug a performance regression is to transform the reported slowdown into a measurable, repeatable signal using differential runs or bisection, allowing you to isolate the specific change responsible for the performance drop.

How do I create a regression test before applying a bug fix?

You create a regression test before applying a bug fix by exposing a correct seam in your test or CLI workflow, writing a test that captures the current failure, and confirming it passes only after the fix is applied.

Does hypothesis testing work for intermittent flaky test failures?

Yes, hypothesis testing works for intermittent flaky test failures by establishing a usable reproduction rate through fuzzing or trace replay, then applying one-variable-at-a-time probes to isolate the race condition or state dependency.

Can I use bisection to minimize a failing test case?

Yes, you can use bisection to minimize a failing test case by systematically reducing the input space or replay trace until the smallest deterministic sequence that still triggers the exact reported failure is isolated.

When should I clean up debug instrumentation after diagnosing an issue?

You should clean up debug instrumentation after diagnosing an issue once the original repro no longer reproduces, removing all tagged probes and throwaway prototypes, then document the effective cause and prevention strategies for the post-mortem.