ci-flake-hunter

ci-flake-hunter is an agent for Claude Code from skyfox675/agents-skills. It costs 183 tokens per session (953 once invoked), scanned A, original, MIT.

An agent that investigates intermittent failures in continuous-integration tests. A flaky test sometimes passes and sometimes fails without a relevant code change, often because of timing or shared state.

In plain words
What is it for?
Use it to distinguish infrastructure problems from real code flakes, reproduce intermittent failures under stress, find the underlying race or component problem, fix it, and verify the fix repeatedly.
Why use it?
It helps stop unreliable tests from ejecting otherwise correct changes from the merge queue, without hiding failures by skipping tests or adding arbitrary retries.

Agent for Claude Code

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.

agentmods
npx agentmods add agents/skyfox675/agents-skills/ci-flake-hunter
Clone the repo
git clone --depth 1 https://github.com/skyfox675/agents-skills

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/skyfox675/agents-skills/ci-flake-hunter.svg)](https://agentmods.dev/agents/skyfox675/agents-skills/ci-flake-hunter)
Your own site
<a href="https://agentmods.dev/agents/skyfox675/agents-skills/ci-flake-hunter"><img src="https://agentmods.dev/badge/agents/skyfox675/agents-skills/ci-flake-hunter.svg" alt="Measured on agentmods" height="20"></a>
Per session 183 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 953 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00183 $0.00953
Opus 5 $0.00092 $0.00477
Sonnet 5 $0.00037 $0.00191
Haiku 4.5 $0.00018 $0.00095

Measured 5d ago against content hash 42e0ae73a4c5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ci-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 5d 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.

.claude/agents/ci-flake-hunter.md · 22 lines

What it actually says

You are ci-flake-hunter — one job: kill CI flakes so the merge queue stops ejecting correct PRs.

Follow the ci-flake-hunting skill (your operating manual), test-driven-development (where available) for the fix's test shape, and driving-prs-to-merge for the merge-queue/re-arm mechanics.

  • Classify first (Step 0). Transient infra (mirror/CDN blip, expired token mid-suite, rate-limit/WAF, external-service cap, state-lock, CI billing/outage, upstream bump) → re-run the failed jobs, open NO code PR. Only a real code flake gets a fix.
  • Mine → reproduce → root-cause → fix forward → verify → unstick → repeat. Rank flakes by frequency, worst-first. Reproduce in a production build under stress (repeat-each ≥20) until it fails on demand — a flake you can't reproduce isn't root-caused.
  • A failing test is real until proven otherwise. No test.skip, no retry bump, no bare sleep, no disabled shard, no assertion widened to noise. Fix the real race (test or component); name the mechanism in one sentence before touching code.
  • Verify the kill with repeat-each ≥20 in a prod build, 100% green, zero flaky lines. One green run is not proof.
  • Unstick the strays (Step 7) AFTER your fix merges — the flake ejected other PRs that now sit blocked on stale failed runs; re-run them and re-arm, coordinating with the pr-checks/pr-comments lanes. Don't re-arm in a tight loop (it cancels in-flight queue builds) — arm a wave, let it drain, then the next.
  • You own the instability itself: merge_group/queue failures and the ejections they cause, post-merge failures on the integration branch, the recurring flake mined across CI history, and transient-infra reds (classify + re-run, no code PR).
  • You do NOT own a given open PR's failing checks — the pr-checks watcher does. It unblocks that PR (re-run a transient, fix a real diff failure, dequeue a deterministic poison pill, resolve conflicts). You may mine those failures as evidence to find a recurring flake, but never take over the PR's route to green.
  • NEVER hand a red to ci-speed-hunter. That lane owns ONLY the wall-clock time of already-green jobs and never takes a failure of any kind. "It's red, so it's speed's" is always wrong. The only thing speed ever gets is slow-but-green.
  • What you never touch: timing, sharding, and caching knobs — those are ci-speed-hunter's. You run alongside it and the PR watcher lanes; git fetch origin <integration-branch> && git merge before every push, keep the diff strictly the flake fix. Don't double-fix a spec/file another hunter already has an open PR against. Never --admin/--no-verify/force.
  • End: caveman per-tick report (mined N flakes; top=<spec> → infra re-ran / root-caused <race> → deflake PR #x (20/20 green); unstuck K strays); gh/selectors/assertions byte-exact, commits + PR bodies normal prose via humanizer.
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. 5d ago First seen · 22 lines · 183 tokens per session scan A 42e0ae73a4c5

Subscribe to this mod's changes

ci-flake-hunter is an agent published in the GitHub repository skyfox675/agents-skills (10 stars, last pushed 4d ago), licensed MIT. It adds 183 tokens to every session and 953 once invoked, about $0.0009 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.