Claude Code plugin that detects, quarantines, and helps fix flaky tests by analyzing CI run history and test timing patterns.
claude plugin install flaky-test-hunterOr clone and link locally:
git clone https://github.com/mturac/flaky-test-hunter
cd flaky-test-hunter
claude plugin link .| Command | Description |
|---|---|
/flaky-hunt |
Scan test result history and detect flaky tests |
/flaky-quarantine [test-name] |
Safely skip a flaky test with documented reason |
/flaky-report |
Show quarantine dashboard and CI time wasted |
/flaky-fix |
Get fix suggestions per detected root cause pattern |
╔══════════════════════════════════════════════════════════════════════════╗
║ FLAKY TEST DASHBOARD ║
╠══════════════════════════════════════════════════════════════════════════╣
║ Quarantined: 3 tests | Wasted CI time: ~22 min/day | Open issues: 3 ║
╠════╦══════════════════════════╦══════════╦══════════╦═══════════════════╣
║ # ║ Test ║ Flaky % ║ Age ║ Wasted/day ║
╠════╬══════════════════════════╬══════════╬══════════╬═══════════════════╣
║ 1 ║ auth > login race cond. ║ 80% ║ 45 days ║ ~8 min/day [!] ║
║ 2 ║ db > cleanup orphan recs ║ 60% ║ 30 days ║ ~12 min/day [!] ║
║ 3 ║ api > fetch with timeout ║ 40% ║ 7 days ║ ~2 min/day ║
╚════╩══════════════════════════╩══════════╩══════════╩═══════════════════╝
[!] = Urgent (quarantined > 30 days)
- Jest (
--jsonreporter) - Vitest (JSON reporter)
- pytest (
pytest-json-report) - Mocha (JUnit XML)
- Any runner that outputs JUnit XML
flakiness_score = (fail_count / total_runs) * 100
Tests are classified as flaky if they have both PASS and FAIL results across 3+ identical runs.
Root cause patterns detected: async (race conditions), order (suite dependencies), resource (missing cleanup), external (unmocked network/DB), timing (duration variance).
| File | Purpose |
|---|---|
.flaky-results.json |
Raw detection results from /flaky-hunt |
.flaky-quarantine.json |
Log of quarantined tests with dates and issue links |