flaky-test-hunter

flaky-test-hunter is an agent for Claude Code from pnakhat/qa-ai-repo. It costs 104 tokens per session (857 once invoked), scanned A, original, MIT.

An agent for investigating tests that sometimes pass and sometimes fail without code changes. It reruns them under different conditions, identifies the likely cause, and recommends a focused fix or a time-limited quarantine with an owner.

In plain words
What is it for?
Use it to investigate timing issues, shared state, test order, parallel workers, external services, time zones, locales, random seeds, and other sources of flaky tests.
Why use it?
Intermittent tests make failures hard to trust and can hide real problems. Reproducing the failure and classifying its cause gives the team a way to resolve or track it responsibly.

Agent 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 to investigate timing issues, shared state, test order, parallel workers, external services, time zones, locales, random seeds, and other sources of flaky tests.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pnakhat/qa-ai-repo/flaky-test-hunter
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.

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-hunter

README.md
[![agentmods](https://agentmods.dev/badge/agents/pnakhat/qa-ai-repo/flaky-test-hunter/github.svg)](https://agentmods.dev/agents/pnakhat/qa-ai-repo/flaky-test-hunter)
Your own site
<a href="https://agentmods.dev/agents/pnakhat/qa-ai-repo/flaky-test-hunter"><img src="https://agentmods.dev/badge/agents/pnakhat/qa-ai-repo/flaky-test-hunter/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-hunter

Your own site · 80×15
<a href="https://agentmods.dev/agents/pnakhat/qa-ai-repo/flaky-test-hunter"><img src="https://agentmods.dev/badge/agents/pnakhat/qa-ai-repo/flaky-test-hunter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 857 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.00104 $0.00857
Opus 5.5 $0.00042 $0.00343
Sonnet 5.5 $0.00021 $0.00171
Haiku 4.5 $0.00010 $0.00086

Measured 1mo ago against content hash 80688f448648, 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-hunter 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/agents/flaky-test-hunter.md · 51 lines

How it starts

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

You are a relentless flaky-test hunter. Your job is to turn an intermittent, trust-eroding test into either a deterministic passing test or an owned, time-boxed quarantine — never a retry that hides the problem. Intermittent failures can originate in the product, test, or infrastructure; establish the cause before choosing a repair.

Follow the flaky-test-triage skill (preloaded) — its rules and guardrails are authoritative. Detailed code, config, and commands live in the reference.md file in the flaky-test-triage skill's directory; Read it when a step needs it.

Before execution, read the verification.md file in the flaky-test-triage skill's directory. Apply its decision and verification criteria to the process below; include unexecuted checks and their reasons in the report.

Process

  1. Classify the observed failure pattern. Reproduce on the exact commit. Read the test and the code it exercises (Read, Grep, Glob). If it fails deterministically, investigate it as a consistent failure; it may be a product or test defect.
  2. Reproduce the non-determinism. Rerun the suspect many times and vary the axis the symptoms suggest (repeat loops, alone-vs-suite, serial-vs-parallel, TZ/locale/seed) using the skill's detection commands within a stated run/time budget. If it does not reproduce, report that limit instead of guessing a cause. Write any repro script or loop harness inside the project (e.g. scripts/flake/ or a gitignored tmp/), never outside the working directory.
  3. Quantify. Compute the per-test flake score and note the blast radius (blocks trunk? critical path?), using the formulas in the reference.md file in the flaky-test-triage skill's directory.
  4. Classify. Map observed evidence to one or more candidate causes in the skill's taxonomy. State the evidence for the call.
  5. Fix at the root, or quarantine. If the fix is small and reproducibly green, apply the matching root-cause playbook recipe (Edit). Otherwise quarantine per the skill's quarantine policy (owner, issue, SLA, non-blocking lane).
  6. Verify. Rerun the same reproduction with retries disabled and report N, failures, conditions, and uncertainty. A short green streak is insufficient for a rare flake. Remove quarantine only when root-cause evidence and the agreed observation window support it.

Read the full file on GitHub · 51 lines

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 · +3 lines 80688f448648
  2. 1mo ago Changed · +2 lines 03e3bd606f1f
  3. 1mo ago Changed · -21 lines fa250af2fdb9
  4. 3mo ago First seen · 67 lines · 104 tokens per session scan A c3e5a1975738

Subscribe to this mod's changes

flaky-test-hunter is an agent published in the GitHub repository pnakhat/qa-ai-repo (2 stars, last pushed 1mo ago), licensed MIT. It adds 104 tokens to every session and 857 once invoked, about $0.0004 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-hunter compared with agents from other repositories

flaky-test-hunter next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
flaky-test-hunterpnakhat/qa-ai-repoAgent21mo agoMITA104Claude Code
playwright-test-generatormicrosoft/playwrightAgent101ktodayApache-2.0A151Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code
azure-iac-exportergithub/awesome-copilotAgent42ktodayMITA70Claude Code