Flaky Hunter
Testing & Qualityflaky-hunterFlaky Hunter is an Agent Skill for testing & quality published in the Archive228/loopkit repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Diagnose and fix tests that pass sometimes and fail other times. Use when CI is red intermittently.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Archive228/loopkit/blob/HEAD/skills/flaky-hunter/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/flaky-hunter, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Flaky Test Hunter
Run the suspect test 20x in a loop first — confirm it's actually flaky, not just broken. Common causes, in order of likelihood:
- Time/order — depends on test execution order or shared mutable state. Isolate it; run alone.
- Async race — asserting before a promise/refetch resolves. Await the actual condition, not a sleep.
- Real network/clock/random — mock them. Freeze time, seed RNG, stub the call.
- Resource leak — a prior test left a connection/file/port open.
Fix the cause, not the symptom.
retry(3)on a flaky test hides a real race that will bite in production. Quarantine only as a last resort, with a ticket.