- Home
- Skills
- Testing & Debugging
- Flaky Test Hunter for CI
Works with the AI Agents you already use
Flaky Test Hunter for CI
Find tests that pass and fail on the same commit from JUnit XML, rank them by rerun minutes lost, classify the cause with evidence, and fix or quarantine each one with an owner and an expiry date.
$12
Flaky Test Hunter for CI
Example session with this skill installed
Here are the last 8 JUnit reports from ledger-service in reports/. The nightly file has no SHA in its name; it ran on c41e9a0. Integration reruns take 18 minutes, unit reruns 6. Which tests are flaky and what do we do about each?
- Read your context and instructions
- Compiled the flaky test hunter
Flake review: ledger-service, 2026-11-27 to 2026-11-30
Runs: 8 files, 3 commits. Minutes lost to reruns: 108 (72 + 18 + 12 + 6)
| Rank | Test | Rate | Score | Cause | Decision | Owner |
|---|---|---|---|---|---|---|
| 1 | test_payments.TestRefunds::test_refund_webhook_delivered | 50.0% (3/3 commits) | 72 | Timing: failing attempts 2.000-2.020 s at a 2.0 s budget, passes 1.62-1.91 s | Fix this week: wait on delivery event, 10 s deadline | payments team |
| 2 | test_fx::test_rates_refresh | 12.5% | 18 | Network: ConnectionResetError in fx_client.fetch_rates (run-104) | Add a stubbed-client copy as the replacement check, then quarantine the network test until 2026-12-15 (LEDG-413) | ledger team |
| 3 | test_cache::test_eviction_order | 25.0% | 12 | Order dependence: KeyError 'acct-42' only when test_ledger ran first (run-102, run-106) | Fix this week: fresh cache fixture, random-order check | ledger team |
| 4 | test_invoice::test_due_date_end_of_month | 12.5% | 6 | Time/date: only failure at 23:58:11, off by one day | Track; inject a fixed clock | billing team |
Not flaky: tests.unit.test_report::test_render_large failed 3 of 3 attempts on c41e9a0 ("rendered 1999 rows, expected 2000") and passed on 3f9a2c1 and 8b07d4e. Regression between 8b07d4e and c41e9a0; diff and revert or fix.
Quarantine added:
tests.integration.test_fx::test_rates_refresh,network/external,run-104 ConnectionResetError in fx_client.fetch_rates,ledger team,2026-12-01,2026-12-15,LEDG-413
Each fix is done when the test passes 50 times on one commit in the job where it flaked.
Connects securely to your tools. The creator never sees your data.
About this skill
Flaky tests cost more than the rerun button suggests. Each one trains the team to ignore red builds, and the usual fix is a retry plugin that hides the problem.
This skill gives your agent a strict definition and a tested script:
- A stdlib Python script that reads JUnit XML from many CI runs (
<testsuites>or<testsuite>roots, skipped tests, failure vs error, Surefire in-run reruns), maps each run to a commit by file name or a CSV, and prints a ranked flake table: runs, failures, flake rate, commits with both outcomes, and the most common failure message. - A flake is a pass and a fail on the same commit. Tests that fail every attempt on a commit are listed separately as real breakage, so you do not quarantine a regression.
- Ranking by flake rate x runs x rerun minutes, so a flake in an 18-minute integration job outranks two in a 6-minute unit job.
- An evidence table for seven causes (timing, order dependence, shared state, time and date, network, resource limits, randomness) that points at what to read in the XML.
- A quarantine policy with owner, 14-day expiry, a size cap, and a fix playbook per cause, including what is not a fix.
- A full worked example with eight fictional CI runs.
It does not fetch artifacts from your CI, rerun tests, or edit your code by itself.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
Requires Python 3.10+. Needs multiple CI runs per commit to detect flakes. Files must be named with SHA or mapped via CSV. Only supports JUnit XML format.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed today
- Software
Python 3.10+ (standard library only)
JUnit XML reports from your CI runs