diagnose

Guide a disciplined diagnosis loop from reproduction to regression testing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Disciplined diagnosis loop for hard bugs. Reproduce → minimise → hypothesise → instrument → fix → regression-test. Use when user says "diagnose this" / "debug this", reports a bug, says something is broken/throwing/failing, or describes a performance regression.

Core Features & Use Cases

  • Build a fast, deterministic feedback loop to isolate root causes across unit, integration, and e2e scopes.
  • Provide step-by-step guidance through reproduction, hypothesis testing, instrumentation, and regression verification.
  • Support handling non-deterministic bugs by crafting repeatable probes and differential comparisons.

Quick Start

Initiate the diagnose workflow on a failing scenario and guide the user through reproducing, narrowing hypotheses, instrumenting the code, and validating a fix.

Frequently Asked Questions about diagnose

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

FAQPage Schema
How do I debug non-deterministic and flaky test failures?

Debug flaky failures by crafting repeatable probes and performing differential comparisons to isolate the root cause. This diagnosis workflow guides you through reproducing non-deterministic bugs reliably before applying a fix.

What is the best way to diagnose a performance regression in my codebase?

Diagnose performance regressions by building a fast, deterministic feedback loop to isolate root causes across unit, integration, and e2e scopes. The workflow requires a clear reproduction, targeted instrumentation, and verifiable evidence to ensure a reliable fix.

How do I systematically reproduce a hard bug before attempting a fix?

Reproduce hard bugs by following a structured loop: reproduce, minimise, hypothesise, instrument, fix, and regression-test. This approach ensures you establish a clear reproduction and test hypotheses with verifiable evidence before modifying code.

Can I use this diagnosis workflow for bugs across tests and deployments?

Yes, you can use this diagnosis workflow across codebases, tests, and deployments. It provides structured phases for investigating user-reported bugs, flaky failures, and performance regressions, guiding you from reproduction to regression testing.

Why do I need to write regression tests after fixing a bug?

Regression tests ensure a reliable fix by verifying that your instrumentation and evidence accurately resolve the original reproduction scenario. The disciplined diagnosis loop requires regression testing to validate the fix and prevent future recurrences.