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 agentmods add skills/codebygarv/ai-skills/flaky-test-diagnosernpx 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.svg" alt="Measured on agentmods" 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 | $0.00022 | $0.00295 |
| Sonnet 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 2d 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.
- 2d 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 (25 stars, last pushed 17d ago), licensed MIT. It adds 43 tokens to every session and 590 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
bun-cli
Bun CLI reference for package management, script running, testing, bundling, and compilation. Covers bun install/add/remove/update, bun run, 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 catalogs, isolated installs and the global…
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.
agent-debug-fixer
中文调试修复技能。用于报错、测试失败、页面异常、功能不符合预期、需要定位根因并做最小修复时。触发语包括"进入调试模式""帮我修问题""报错了""测试失败""页面坏了""找根因"。.
om-troubleshooter
Diagnose and fix standalone Open Mercato bugs across scope, commands, locking, fields, generated registries, UI hydration, cache/search, bootstraps, queues, and providers. Use for "fix bug", "why does this fail", "regression", "debug", "napraw błąd", or a failing test.
moai-workflow-loop
Ralph Engine - Automated feedback loop with LSP diagnostics and AST-grep integration for continuous code quality improvement. Use when implementing error-driven development, automated fixing, or continuous quality validation workflows.