diagnose

Diagnose bugs and performance regressions through a staged investigation workflow.

Updated May 26, 2026
One-click install
npx skills add https://github.com/XWIlluDelu/agent-share --skill diagnose-xwilludelu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: diagnose
Source: https://github.com/XWIlluDelu/agent-share/tree/main/lib/diagnose
Command: npx skills add https://github.com/XWIlluDelu/agent-share --skill diagnose-xwilludelu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Diagnose helps you systematically find the root cause of hard-to-reproduce bugs and performance regressions when the system behavior is unclear or failing.

Core Features & Use Cases

  • Disciplined feedback loop: Build a deterministic pass/fail signal so you can minimize time spent reading code and maximize time spent testing hypotheses.
  • Reproduce → hypothesize → instrument → fix: Use a structured sequence that confirms the failure mode, ranks falsifiable hypotheses, and validates changes with targeted probes.
  • Regression test and cleanup: Lock in the fix by writing the regression test (when a correct seam exists) and removing all debug instrumentation afterward.
  • Use case: When users report that a feature started throwing errors after a change or that response time regressed, run the skill to create a loop that reliably triggers the issue and converts it into a measurable, testable correction.

Quick Start

Ask the agent to diagnose the bug by creating the fastest deterministic repro loop, then use it to reproduce the exact failure, rank falsifiable hypotheses, instrument with targeted changes, apply a fix, and confirm the regression test (or document that no correct test seam exists).

Frequently Asked Questions about diagnose

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

FAQPage Schema
How do I debug hard-to-reproduce bugs and performance regressions systematically?

Debug systematically by building a deterministic reproduction loop, generating ranked falsifiable hypotheses, applying targeted instrumentation, and validating fixes with regression tests to isolate root causes.

What is the best way to isolate a performance regression after a code change?

Isolate performance regression by creating a high-rate reproduction signal, applying bisection to identify the offending change, and using targeted instrumentation to measure the exact impact.

How does a reproduction loop help with debugging complex system errors?

A reproduction loop provides a deterministic pass/fail signal, minimizing time spent reading code and maximizing time spent testing falsifiable hypotheses to find the root cause.

Can I use hypothesis testing to fix bugs without a reliable reproduction case?

Hypothesis testing requires a reliable reproduction case to build a deterministic or high-rate reproduction signal, which is necessary to validate falsifiable hypotheses and apply targeted probes.

What is the structured workflow for diagnosing software errors and fixing them?

The workflow follows a structured sequence: reproduce the exact failure, rank falsifiable hypotheses, instrument with targeted changes, apply a fix, and confirm the regression test.

What should I do if there is no correct test seam to write a regression test?

When no correct test seam exists, document that the regression test cannot be written, apply the fix, and remove all debug instrumentation afterward to ensure clean code.