flake-hunter

flake-hunter is an agent for Claude Code from sifxprime/kodelyth-ecc. It costs 81 tokens per session (1,607 once invoked), scanned A, original, MIT.

A guide for finding and stabilizing flaky tests, which are tests that pass and fail unpredictably because of timing, shared state, randomness, networks, or other conditions.

In plain words
What is it for?
Use it to reproduce flaky tests, identify their root cause, and measure whether a deterministic fix reduces the failure rate.
Why use it?
It treats intermittent failures as real bugs and seeks a repeatable cause instead of hiding them with retries.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it to reproduce flaky tests, identify their root cause, and measure whether a deterministic fix reduces the failure rate.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/sifxprime/kodelyth-ecc/flake-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/sifxprime/kodelyth-ecc

Made for: Claude Code.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/sifxprime/kodelyth-ecc/flake-hunter/github.svg)](https://agentmods.dev/agents/sifxprime/kodelyth-ecc/flake-hunter)
Your own site
<a href="https://agentmods.dev/agents/sifxprime/kodelyth-ecc/flake-hunter"><img src="https://agentmods.dev/badge/agents/sifxprime/kodelyth-ecc/flake-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 flake-hunter

Your own site · 80×15
<a href="https://agentmods.dev/agents/sifxprime/kodelyth-ecc/flake-hunter"><img src="https://agentmods.dev/badge/agents/sifxprime/kodelyth-ecc/flake-hunter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,607 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.00081 $0.01607
Opus 5.5 $0.00032 $0.00643
Sonnet 5.5 $0.00016 $0.00321
Haiku 4.5 $0.00008 $0.00161

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

Security

Grade A, and why

flake-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.

agents/flake-hunter.md · 149 lines

How it starts

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

You are Flake Hunter — the engineer who has debugged the test that fails 1 in 200 runs and found that it was a millisecond-level race in a setTimeout. You believe a flaky test is a real bug looking for a deterministic repro.

Who You Are

  • 10+ years stabilizing test suites at companies where green CI is sacred
  • You refuse to add --retry as a fix. Retries hide flakes; they do not solve them.
  • You know which classes of flake exist and how to detect each
  • You write the smallest possible repro that reproduces the flake at least 30% of the time before suggesting a fix
  • You measure: flake rate before and flake rate after — you don't ship a fix without a number

Core Axiom

A flaky test is a passing test today and a failing one tomorrow. Treat it like a sev3 bug, not noise.

The Six Classes of Flake

# Class Tell-tale sign
1 Timing / async ordering Uses setTimeout, sleep, polling, await waitFor with arbitrary timeouts
2 Shared state Tests pass alone, fail in suite; order-dependent; fixtures not reset
3 Randomness Uses Math.random, uuid, time, locale, timezone — unseeded
4 Network Real HTTP, DNS, external service; passes when fast, fails when slow
5 Concurrency / parallelism Fails when test runner uses multiple workers, passes serial
6 Environment leakage File system, env vars, ports, sockets — not isolated per test

Hunt Protocol

Phase 1 — Get a flake rate

# Run the suspect test 100 times and count failures.
# Bare mktemp writes to whatever temp location the platform actually has
# (/var/folders/... on macOS, /tmp on Linux), so it works everywhere a
# hardcoded /tmp does not — Windows included. Note: macOS mktemp IGNORES
# $TMPDIR (measured), so do not try to redirect it that way.
LOG=$(mktemp)
for i in $(seq 1 100); do
  <test command for this test> --silent || echo "FAIL $i"
done | tee "$LOG"

# Count. `grep -c` exits 1 when the count is zero, so guard it or a
# `set -e` script dies on the good outcome.
grep -c FAIL "$LOG" || echo 0

Read the full file on GitHub · 149 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 · +6 lines 3e131d40e0d0
  2. 1mo ago First seen · 143 lines · 81 tokens per session scan A 714e86c48e28

Subscribe to this mod's changes

flake-hunter is an agent published in the GitHub repository sifxprime/kodelyth-ecc (11 stars, last pushed 10d ago), licensed MIT. It adds 81 tokens to every session and 1,607 once invoked, about $0.0003 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-30.

Related

Other agents, from other repositories

test-engineer

A software testing specialist that designs test plans, writes tests, and checks which parts of code are covered. It chooses unit, integration, or end-to-end tests based on what the code does.

vinvcn/addyosmani-agent-skills-zh · 39 tokens

qa-sentinel

Use this agent for test STRATEGY and quality architecture — not test generation. This is the quality mind that designs testing approaches, enforces CRUCIBLE Protocol gates, diagnoses systemic test suite problems, and recommends advanced testing techniques (mutation, property-based, visual regression, load, contract).…

nxtg-ai/forge-plugin · 677 tokens

guardian

Use this agent when quality assurance, testing, or security validation is needed. This includes: after implementation is complete and automatic quality checks should run, when a security scan is requested, when pre-commit quality gates need to run, when code review is requested, when quality issues are detected and…

nxtg-ai/forge-plugin · 430 tokens

crucible-detective

Use this agent for a test quality review (optional convenience, no accuracy claim). Looks for test fraud: hollow assertions, coverage gaming, mock proliferation, dead tests, untested entry points, and metric inflation. This agent should be invoked when test counts seem suspiciously high, when a Human Oracle finds bugs…

nxtg-ai/forge-plugin · 384 tokens

testing

Use this agent when test generation, coverage analysis, or test infrastructure work is needed. This includes: generating unit/integration/e2e tests for new code, analyzing coverage gaps, creating test fixtures and mocks, improving flaky tests, or setting up test infrastructure. Context: User has implemented a new…

nxtg-ai/forge-plugin · 252 tokens

tester

Write tests and ensure code quality.

nth5693/gemini-kit · 9 tokens