flaky-test-detective

Diagnose flaky tests by identifying root causes like timing and shared state.

5|Updated Dec 31, 2025
One-click install
npx skills add https://github.com/patricio0312rev/skillset --skill flaky-test-detective-patricio0312rev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flaky-test-detective
Source: https://github.com/patricio0312rev/skillset/tree/main/templates/testing/flaky-test-detective
Command: npx skills add https://github.com/patricio0312rev/skillset --skill flaky-test-detective-patricio0312rev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Diagnoses and fixes flaky tests by identifying root causes such as timing issues, shared state, randomness, and network dependencies, and provides stabilization strategies.

Core Features & Use Cases

  • Flaky Test Patterns: Timing Issues, Shared State, Randomness, Network Dependencies.
  • Flaky Test Detection Script: A script to run multiple test iterations and gather results to surface flaky tests.
  • Stabilization Guidelines: Recommendations for waits, isolation, deterministic data, and API mocking.
  • CI Monitoring: Integration tips to monitor flaky trends in CI and revert to stable baselines.

Quick Start

Run the detection script to identify flaky tests in your project and apply the stabilization guidelines.

Frequently Asked Questions about flaky-test-detective

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

FAQPage Schema
How do I diagnose flaky tests caused by timing issues and shared state?

To diagnose flaky tests caused by timing issues and shared state, use the detection script to run multiple test iterations. It identifies root causes across unit, integration, and end-to-end tests by analyzing test instability patterns.

What is the best way to stabilize flaky tests in a CI pipeline?

The best way to stabilize flaky tests in a CI pipeline is applying stabilization guidelines for deterministic data and API mocking. It also provides CI monitoring tips to revert to stable baselines and track flaky trends.

Why does my test suite fail intermittently during CI runs?

Your test suite fails intermittently during CI runs due to root causes like timing issues, shared state, randomness, and network dependencies. Running a detection script across multiple iterations surfaces these specific flaky scenarios.

Can I use API mocking to fix flaky tests with network dependencies?

Yes, you can use API mocking to fix flaky tests with network dependencies. The stabilization guidelines recommend using API mocking alongside proper wait strategies and test isolation to ensure deterministic test results.

How do I detect flaky tests across multiple test iterations?

You detect flaky tests across multiple test iterations by running the dedicated detection script. It gathers results from repeated test executions to surface inconsistencies, providing auto-fix patterns for common flaky scenarios.