test-flake-investigator

Diagnose flaky tests that pass locally but fail in CI.

1|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/00PrabalK00/claude-skills --skill test-flake-investigator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-flake-investigator
Source: https://github.com/00PrabalK00/claude-skills/tree/main/skills/test-flake-investigator
Command: npx skills add https://github.com/00PrabalK00/claude-skills --skill test-flake-investigator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Investigate tests that pass locally but fail in CI by checking timing, order dependence, environment drift, parallelism, fixtures, and isolation.

Core Features & Use Cases

  • Identify and diagnose timing-related flakiness, order-dependent tests, and parallelism issues across test suites.
  • Analyze environment drift, resource contention, and fixture usage to isolate root causes.
  • Provide actionable, minimal repro steps and recommended mitigations with clear owner notes.

Quick Start

Run the flaky test investigator against your test suite to surface the most likely flaky tests and recommended fixes.

Frequently Asked Questions about test-flake-investigator

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

FAQPage Schema
How do I diagnose flaky tests that pass locally but fail in CI?

To diagnose flaky tests that pass locally but fail in CI, you need to analyze timing, order dependence, environment drift, and parallelism. Collecting failing outputs, logs, and runtime context helps narrow the surface and reproduce the issue across environments.

What causes timing-related flakiness and order-dependent test failures?

Timing-related flakiness and order-dependent test failures are caused by resource contention, environment drift, and poor fixture isolation. Analyzing these factors alongside parallelism issues helps isolate the root cause and surface actionable mitigations.

How do I troubleshoot environment drift causing my test suite to fail in CI?

To troubleshoot environment drift causing test suite failures in CI, collect configuration and runtime context to compare against local environments. Isolating fixture usage and checking for resource contention narrows down the discrepancies.

Can I use this to find minimal repro steps for parallelism issues in test suites?

Yes, you can use this to find minimal repro steps for parallelism issues in test suites. It isolates root causes of order dependence and provides verifiable fixes that improve test stability without overfitting to a single CI run.

What is the best way to fix flaky tests without overfitting to a single CI run?

The best way to fix flaky tests without overfitting to a single CI run is to generate actionable root-cause hypotheses based on broad runtime context, logs, and configuration. This approach ensures recommended mitigations are minimal and verifiable across environments.

Why do my tests fail in CI due to resource contention and fixture isolation?

Tests fail in CI due to resource contention and fixture isolation when parallel execution environments differ from local setups. Analyzing fixture usage and runtime logs isolates the contention and provides clear owner notes for resolving the instability.