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.
npx skills add codebygarv/Ai-skills --skill flaky-test-diagnosergit clone --depth 1 https://github.com/codebygarv/Ai-skillsWrote 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.
[](https://agentmods.dev/skills/codebygarv/ai-skills/flaky-test-diagnoser)<a href="https://agentmods.dev/skills/codebygarv/ai-skills/flaky-test-diagnoser"><img src="https://agentmods.dev/badge/skills/codebygarv/ai-skills/flaky-test-diagnoser/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.
<a href="https://agentmods.dev/skills/codebygarv/ai-skills/flaky-test-diagnoser"><img src="https://agentmods.dev/badge/skills/codebygarv/ai-skills/flaky-test-diagnoser.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.00590 |
| Opus 5.5 | $0.00017 | $0.00236 |
| Sonnet 5.5 | $0.00009 | $0.00118 |
| Haiku 4.5 | $0.00004 | $0.00059 |
Grade A, and why
flaky-test-diagnoser 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.
How it starts
The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Purpose
Find the actual cause of an intermittently-failing test and fix it properly, rather than reaching for a retry wrapper that hides the flake while leaving the underlying nondeterminism in place.
When to Use
- A test passes locally but fails in CI, or fails maybe one run in ten.
- Tests fail when run in a different order, in parallel, or on a slower machine.
- A team has started ignoring or auto-retrying certain tests.
What to Analyze
- Timing and async assumptions — fixed
sleep/timeout waits instead of waiting for the actual condition; assertions that race an unawaited promise; anything that passes on a fast machine and fails on a loaded CI runner. - Shared mutable state — module-level variables, singletons, or a database not reset between tests, so a test's outcome depends on what ran before it.
- Test-order dependence — a test that only passes when run after another that happens to set up its state. Surfaces when a runner randomizes order or shards across workers.
- External dependencies — real network calls, live third-party APIs, or system clock/timezone dependence. Anything the test doesn't control can fail independently of the code.
- Nondeterministic data — random values,
Date.now(), unstable ordering from aSet/Map/database query without an explicitORDER BY, or locale-dependent formatting. - Resource contention — parallel tests competing for the same port, file, temp directory, or database row.
Output Format
- Most likely cause — named specifically, with the evidence from the test/code that points to it.
- Why it manifests intermittently — the specific condition (slow machine, particular ordering, parallel execution) that makes it fail rather than pass.
- Fix — as concrete code, addressing the root nondeterminism.
- How to confirm — how to reproduce the flake deliberately (run in a loop, force a specific order, add artificial delay) so the fix is verifiable rather than assumed.
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 1mo ago First seen · 37 lines · 43 tokens per session scan A daca6958b7e3
flaky-test-diagnoser is a skill published in the GitHub repository codebygarv/Ai-skills (27 stars, last pushed 2mo ago), licensed MIT. It adds 43 tokens to every session and 590 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
bun-cli
Bun CLI reference for package management, script running, type checking, testing, bundling, and compilation. Covers bun install/add/remove/update, bun run, bun check and --check, bun test, bun build, bunx, bun patch, bun audit fix, bun dedupe, bun prune, bun why, bun pm, bun repl, bunfig.toml, bun.lock, workspace…
git-ci
CI/CD status queries for GitHub Actions (gh) and GitLab CI (glab). Check pipeline status, failing jobs, workflow runs, job logs, and merge readiness. Use when checking CI status, debugging build failures, viewing job logs, watching pipeline progress, or configuring gh/glab CI read-only allowlists. Not for PR workflows…
ds-debug
Bug hunter — reproduce the failure as an observed red, localize it (bisect, logs, tracing), test at most three hypotheses, land the minimal fix behind a red-proven regression test, and prove it with the project's own check. Use when something is broken and the cause is not yet known.
test-failure-explorer
Import and query an existing Vitest 3.2 JSON report to explore test failures, file-level errors and original diagnostic evidence.
developing-openrig
Use when changing OpenRig's own source in a clone of the openrig repository: finding which package or file owns a behaviour, choosing which tests to run, testing a change without disturbing the OpenRig daemon your own session runs on, judging whether a diff touches a high-risk area, or preparing a pull request. Not…
agent-debug-fixer
A Chinese-language debugging and repair workflow for software problems. It investigates errors, failed tests, broken pages, or behavior that does not match expectations, then makes a minimal fix.