flaky-test-triage

flaky-test-triage is a skill for Claude Code, Codex from pnakhat/qa-ai-repo. It costs 125 tokens per session (2,525 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 CodeCodex

Written for no agent in particular: nothing here depends on one.

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, Codex.

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 2,525 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.02525
Opus 5 $0.00063 $0.01262
Sonnet 5 $0.00025 $0.00505
Haiku 4.5 $0.00013 $0.00252

Measured 11d ago against content hash b7a003bc7973, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 11d 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 · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 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.

How to run

  1. Confirm it's flake, not a real bug. Reproduce on the exact commit. If it fails deterministically, it's a bug — route it to the code, not here.
  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 workers/timezone/seed until it flips. A flake you can't reproduce, you can't fix — keep isolating.
  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 fix can't land now. Never leave it failing in the blocking lane.
  6. Verify. Rerun the fixed test ≥ N times green before closing; un-quarantine only after N consecutive green runs.

Taxonomy — cause → tell-tale signal → fix direction

Cause Tell-tale signal Fix direction
Async / timing Passes on retry; fails on slow/loaded CI; waitForTimeout/sleep in the body Web-first auto-retrying assertions; wait on the condition, not the clock
Shared state & ordering Fails only in some orders; green alone, red in suite; passes with --workers=1 Per-test setup/teardown; fresh state; no cross-test globals
External dependencies Fails when a third-party/API is slow or down; network in the stack trace Mock what you don't own; stub the boundary; retry only the real integration lane
Animations / transitions Fails mid-transition; screenshot diffs by a few px; timing-sensitive clicks Disable animations; assert post-settle state
Time / locale / randomness Fails at midnight, month/DST boundaries, in another TZ, or ~1 run in N Freeze the clock; pin TZ/locale; seed the RNG
Resource leaks Degrades as the suite runs; late tests flake; OOM/handle exhaustion Dispose/close in teardown; reset pools; cap concurrency

Read the full file on GitHub · 156 lines

Files

What ships with it

1 file 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. 11d 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 2mo ago), licensed MIT. It adds 125 tokens to every session and 2,525 once invoked, about $0.0006 per session on Opus 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

Other skills, from other repositories