flaky-test-diagnoser

Diagnose intermittent test failures by measuring flakiness and isolating root causes.

4|Updated Feb 23, 2026
One-click install
npx skills add https://github.com/npow/claude-skills --skill flaky-test-diagnoser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flaky-test-diagnoser
Source: https://github.com/npow/claude-skills/tree/main/flaky-test-diagnoser
Command: npx skills add https://github.com/npow/claude-skills --skill flaky-test-diagnoser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps identify why tests fail intermittently instead of masking failures with retries or guessing at the cause.

Core Features & Use Cases

  • Flakiness Measurement: Runs tests repeatedly to establish pass and failure rates.
  • Root Cause Analysis: Evaluates ordering, timing, shared state, external dependencies, resource leaks, and non-deterministic inputs.
  • Evidence-Based Diagnosis: Uses isolation, bisection, timing, environment, and distinguishing experiments to narrow competing hypotheses.
  • Use Case: When a test passes locally but fails intermittently in CI, use this Skill to measure the failure pattern, identify environmental or state-related factors, and produce a reproducible diagnosis with recommended next probes.

Quick Start

Ask the flaky-test-diagnoser skill to investigate the intermittent failure in the specified test and provide a diagnosis with experiment results and fail-rate measurements.

Frequently Asked Questions about flaky-test-diagnoser

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

FAQPage Schema
How do I diagnose intermittent test failures that pass locally but fail in CI?

To diagnose intermittent test failures, you need to measure the flakiness rate through repeated test execution and perform root cause analysis by evaluating test isolation, shared state, and timing to distinguish competing hypotheses. This Skill automates that diagnostic process by running repeated executions, generating hypotheses about ordering or environment factors, and recording structured evidence to isolate the non-deterministic root cause.

What causes flaky tests and how does root cause analysis identify them?

Flaky tests are caused by shared state, test ordering dependencies, timing issues, resource leaks, and non-deterministic inputs. Root cause analysis identifies them by running isolation, bisection, and distinguishing experiments to narrow competing hypotheses and produce structured evidence of the specific environmental factor.

Can I use hypothesis testing to isolate non-deterministic test failures across different test runners?

Yes, you can use hypothesis testing to isolate non-deterministic test failures across common test runners and programming languages. The Skill applies isolation and timing analysis to distinguish experiments, measuring flakiness to find reproducible evidence regardless of the specific environment.

What is the best way to measure the flakiness rate of randomly failing tests?

The best way to measure the flakiness rate of randomly failing tests is to execute the specified test repeatedly to establish statistical pass and failure rates. This repeated execution provides the baseline measurement needed to conduct hypothesis generation and timing analysis.

Does test isolation analysis work for environment-sensitive tests that fail intermittently?

Yes, test isolation analysis works for environment-sensitive tests by evaluating external dependencies, shared state, and resource leaks. It uses bisection and distinguishing experiments to narrow competing hypotheses and produce a reproducible diagnosis of the environmental factors.