flaky-test-diagnostician
Installation
SKILL.md
Flaky Test Diagnostician
Flaky tests erode trust in your test suite. Teams spend 5-10 hours a week rerunning builds, approving over failures, and chasing ghosts — and every flaky build that passes on rerun is a real defect that could have been caught.
This skill systematically isolates a flaky test, reruns it in controlled conditions, and classifies the failure against six known root causes — timing, shared state, network dependencies, selector fragility, environment differences, and order dependency — so you fix the cause, not the symptom.
Phase 1 — THINK
Before running anything, understand the test and its context:
- What kind of test is it? Unit, integration, E2E (Playwright/Cypress), or component test? Each has different flakiness profiles.
- What does the test touch? Filesystem, network, database, time, random values, shared fixtures, global state, other tests' leftovers?
- What's the failure pattern? Does it fail on CI but pass locally? Pass in isolation but fail in the suite? Fail at specific times of day?
- What's the rerun cost? How long does one run take? N=10 vs N=50 vs N=100 depends on test duration.