flaky-test-triage

flaky-test-triage is a skill for Claude Code from pnakhat/qa-ai-repo. It costs 125 tokens per session (3,524 once invoked), scanned A, original, MIT.

A method for finding and fixing flaky tests—tests that sometimes pass and sometimes fail even when the code has not changed. It measures how often each test flakes, investigates the cause, and tracks temporary quarantines when an immediate fix is not possible.

In plain words
What is it for?
Use it when tests pass on retry or fail unpredictably in continuous integration (CI). It helps reproduce failures under different conditions, identify causes such as timing or shared state, fix them, and verify the result.
Why use it?
Intermittent failures make developers ignore test results, allowing real bugs to slip through. This process separates genuine code bugs from unreliable tests and prevents simply hiding the problem with retries.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the flaky-test-triage plugin — 1 skill, 1 agent shipped together

Good fit Use it when tests pass on retry or fail unpredictably in continuous integration (CI). It helps reproduce failures under different conditions, identify causes such as timing or shared state, fix them, and verify the result.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pnakhat/qa-ai-repo/flaky-test-triage
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pnakhat/qa-ai-repo --skill flaky-test-triage
Clone the repo
git clone --depth 1 https://github.com/pnakhat/qa-ai-repo

Made for: Claude Code.

Or install flaky-test-triage, the plugin that ships this one along with the rest of its 1 skill, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flaky-test-triage

README.md
[![agentmods](https://agentmods.dev/badge/skills/pnakhat/qa-ai-repo/flaky-test-triage/github.svg)](https://agentmods.dev/skills/pnakhat/qa-ai-repo/flaky-test-triage)
Your own site
<a href="https://agentmods.dev/skills/pnakhat/qa-ai-repo/flaky-test-triage"><img src="https://agentmods.dev/badge/skills/pnakhat/qa-ai-repo/flaky-test-triage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flaky-test-triage

Your own site · 80×15
<a href="https://agentmods.dev/skills/pnakhat/qa-ai-repo/flaky-test-triage"><img src="https://agentmods.dev/badge/skills/pnakhat/qa-ai-repo/flaky-test-triage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,524 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00125 $0.03524
Opus 5.5 $0.00050 $0.01410
Sonnet 5.5 $0.00025 $0.00705
Haiku 4.5 $0.00013 $0.00352

Measured 1mo ago against content hash b24a96a380f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

flaky-test-triage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

flaky-test-triage/skills/flaky-test-triage/SKILL.md · 207 lines

How it starts

The opening of the file, as written. The whole thing — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flaky Test Triage

A flaky test passes and fails on the same code. It is worse than a failing test: it trains the team to ignore red, so real regressions slip through. Treat flake as a defect in the test, with a rate you measure, a cause you name, and a fix you land — never a nuisance you retry away.

Evidence-driven execution

Read verification.md before selecting the workflow or reporting results. It defines domain-specific failure probes, evidence requirements, and limits on what a passing run proves.

How to run

  1. Classify the failure pattern. Reproduce on the exact commit. A consistent failure can be a product or test defect; investigate the evidence. A flake is not automatically a test defect: races in the product (double submit, unawaited write, non-atomic counter) show up as flaky tests first. Rule out a product concurrency bug before "fixing" the test.
  2. Quantify. Compute the suite flake rate and a per-test flake score from reruns + CI history (formulas below). Rank by score × blast radius.
  3. Reproduce the non-determinism. Rerun the suspect many times; shuffle order; vary the axis supported by the evidence within a stated run/time budget. If it does not reproduce, report the evidence limit and next hypothesis.
  4. Classify against the taxonomy — match the tell-tale signal to a cause.
  5. Fix at the root using the per-cause playbook, or quarantine with an SLA if the release owner accepts the resulting coverage gap. A critical unresolved product risk may need to keep blocking the release.
  6. Verify. Re-run the original reproduction with retries disabled. Report N, failures, conditions, and uncertainty; require root-cause evidence and the agreed observation window before closure or removing quarantine.

Taxonomy — cause → tell-tale signal → fix direction

Grounded in Luo et al., An Empirical Analysis of Flaky Tests (FSE 2014), whose top three root causes were async wait, concurrency, and test-order dependency, plus browser-specific causes.

Read the full file on GitHub · 207 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +6 lines b24a96a380f9
  2. 1mo ago Changed · +43 lines 844492d3c720
  3. 1mo ago Changed · +2 lines cfd4759b90fa
  4. 3mo ago First seen · 156 lines · 125 tokens per session scan A b7a003bc7973

Subscribe to this mod's changes

flaky-test-triage is a skill published in the GitHub repository pnakhat/qa-ai-repo (2 stars, last pushed 1mo ago), licensed MIT. It adds 125 tokens to every session and 3,524 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

flaky-test-triage compared with skills from other repositories

flaky-test-triage next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
flaky-test-triagepnakhat/qa-ai-repoSkill21mo agoMITA125Claude Code
testinggarrytan/gbrainSkill34ktodayMITA63Claude Code
verifyYeachan-Heo/oh-my-claudecodeSkill41ktodayMITA12Claude Code
detect-static-dependenciesdotnet/skillsSkill6.4ktodayMITA135Claude Code
dart-downstream-fixdartsim/dartSkill1.2kyesterdayBSD-2-ClauseA25Claude Code
experiment-iterative-coderEvoScientist/EvoSkillsSkill48817d agoApache-2.0A145Claude Code
mockito-stale-mock-silent-trycatch-failuredivinevideo/divine-mobileSkill263todayMPL-2.0A186Claude Code, Codex