flaky-test-detective

Classify intermittent test failures, reproduce them deterministically, and prove fixes with repeated-run evidence.

2|Updated Jul 6, 2026
One-click install
npx skills add https://github.com/nguyenpv1980-wq/Project-Aegis --skill flaky-test-detective-nguyenpv1980-wq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flaky-test-detective
Source: https://github.com/nguyenpv1980-wq/Project-Aegis/tree/main/.claude/skills/flaky-test-detective
Command: npx skills add https://github.com/nguyenpv1980-wq/Project-Aegis --skill flaky-test-detective-nguyenpv1980-wq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill diagnoses tests that fail intermittently, so you can stop chasing random red runs with retries, sleeps, or guesswork and instead identify the real cause with evidence.

Core Features & Use Cases

  • Classify the flake by separating ordering, shared state, timing, environment, infrastructure, and product-side race conditions.
  • Reproduce deterministically with repeat runs, shuffle seeds, parallel stress, and environment pinning until the failure pattern is measurable.
  • Fix one cause and prove stability with before-and-after run counts, while keeping quarantine decisions honest and time-bounded.
  • Use case: a CI-only E2E test passes locally but fails about one in ten runs, and you need a case report that shows the root cause and verifies the fix.

Quick Start

Use the flaky-test-detective skill to classify this intermittent test failure, reproduce it with counts, fix the single demonstrated cause, and prove stability without adding retries or sleeps.

Frequently Asked Questions about flaky-test-detective

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

FAQPage Schema
How do I find the root cause of flaky tests that only fail in CI?

To find the root cause of flaky tests, classify the failure by separating ordering, shared state, timing, and infrastructure issues, then reproduce it deterministically with repeat runs and environment pinning until the pattern is measurable.

Why does my test pass on retry but fail intermittently during parallel runs?

Tests that pass on retry but fail during parallel runs often suffer from shared state or ordering dependencies. Reproduce the parallel-only bug using shuffle seeds and parallel stress tests to isolate the specific timing or state collision.

What's the best way to prove a flaky test fix actually improves test stability?

Prove test stability by applying one-change-at-a-time remediation and comparing before-and-after run counts. Use repeated-run evidence to demonstrate the single demonstrated cause is resolved without adding retries or sleeps.

Can I use this approach for quarantined tests and environment-dependent breakage?

Yes, this approach handles quarantined tests and environment-dependent breakage by keeping quarantine decisions honest and time-bounded, while using environment checks to isolate and verify the specific conditions causing the intermittent failure.

How do I reproduce a CI-only E2E test failure that passes locally every time?

Reproduce CI-only E2E test failures by pinning the environment, running repeated executions, and applying parallel stress to match CI conditions until the failure pattern becomes measurable and exposes the root cause.

When should I not use retries or sleeps to fix intermittent test failures?

Avoid retries or sleeps when fixing intermittent test failures if you cannot identify the root cause. Use evidence-based triage to classify the flake and prove stability with repeated-run counts before considering quarantine.