Flaky Test Hunter skill for Claude and Codex
Flaky Test Hunter as an AI skill. It asks for Test name and code, Failure output, How often it fails and 3 more, then does the rest. Free to install in Claude…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a test fails intermittently, passes on rerun, or fails only on CI or only in the full suite and the team wants the cause found. Do not use for a test that fails every time or choosing a testing strategy. Related topics: coding, technical.
What it will ask you for
- Test name and code (longer free text)
- Failure output (longer free text)
- How often it fails (free text, e.g. "1 in 10 locally or 1 in 3 on CI")
- Where it fails (choose one: Only on CI, Only locally, Both, Unknown)
- Test framework and runner (free text, e.g. "Jest or pytest or Playwright")
- Recent changes (longer free text)
How it works
- Read the failing and passing output side by side and note every difference in order, timing or data.
- Score the four buckets of timing, shared state, order and environment against that evidence and rank them.
- Give a confirming command for the top suspects, such as repeated runs, isolation, a fixed seed or reversed order.
- Name the most likely root cause and justify it from the evidence rather than from habit.
- Write the fix that removes the cause, and show how to rerun enough times to trust the result.
What you get
A ranked suspect table with evidence for and against each, the commands to confirm them, the named root cause, the code fix, and a rerun plan with a pass threshold.
What it watches out for
- Adding a retry or a longer sleep, which hides the flake and slows the suite while the cause stays.
- Blaming CI slowness without checking for leaked state from an earlier test, the more common cause.
- Declaring victory after a few green runs, when a 1 in 20 flake needs dozens of runs to show it is gone.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.