flaky-tests-pro

flaky-tests-pro is a skill for Claude Code from kelvinkosbab/AppBootstrapAI. It costs 146 tokens per session (1,333 once invoked), scanned A, original, MIT.

A testing skill for finding, fixing, and preventing flaky tests in Apple and Android projects. A flaky test gives different results when the code has not changed.

In plain words
What is it for?
Use it to reproduce a named flaky test, investigate an intermittently failing test suite, review changes for flake risks, or set rules for retries, quarantining, and tracking. It covers Swift, XCTest, XCUITest, Kotlin, JVM tests, Android instrumentation tests, and their build tools.
Why use it?
It replaces unreliable retries with investigation into causes such as timing, shared state, order, randomness, networks, or devices. It also helps identify which tests make continuous integration, the automated build-and-test process, fail intermittently.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to reproduce a named flaky test, investigate an intermittently failing test suite, review changes for flake risks, or set rules for retries, quarantining, and tracking. It covers Swift, XCTest, XCUITest, Kotlin, JVM tests, Android instrumentation tests, and their build tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kelvinkosbab/appbootstrapai/flaky-tests-pro
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.

Any agent
npx skills add kelvinkosbab/AppBootstrapAI --skill flaky-tests-pro
Clone the repo
git clone --depth 1 https://github.com/kelvinkosbab/AppBootstrapAI

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 flaky-tests-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/flaky-tests-pro/github.svg)](https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/flaky-tests-pro)
Your own site
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/flaky-tests-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/flaky-tests-pro/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.

agentmods 80×15 button for flaky-tests-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/kelvinkosbab/appbootstrapai/flaky-tests-pro"><img src="https://agentmods.dev/badge/skills/kelvinkosbab/appbootstrapai/flaky-tests-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 146 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,333 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00146 $0.01333
Opus 5.5 $0.00058 $0.00533
Sonnet 5.5 $0.00029 $0.00267
Haiku 4.5 $0.00015 $0.00133

Measured 9d ago against content hash 387aa01410c6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

flaky-tests-pro 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 9d 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/skills/flaky-tests-pro/SKILL.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 lines — stays where its author put it; the contents beside it link to each section on GitHub.

A flaky test passes and fails on the same code. It is a bug, either in the test or in the code under test, and a retry only hides it. This skill is the deep companion to the always-on apple-testing-strategy.md and android-testing-strategy.md rules. Report only genuine problems.

Pick the mode from the request:

  • Fix: a named test flakes. Reproduce, classify, fix, verify (below).
  • Triage a suite: CI is intermittently red and nobody knows which tests. Find the flaky set from CI history or repetition runs, rank by failure rate and cost, then fix the top ones.
  • Prevent: review tests or a PR for flake risk with the checklist below.
  • Set policy: decide how CI retries, quarantines, and tracks flakes, from references/ci-policy.md.

Load only what the task needs:

  • references/causes-and-fixes.md — the cause taxonomy, the signal each cause leaves, and the fix in Swift and Kotlin. Load for every Fix and Prevent task.
  • references/apple.md — reproducing with xcodebuild repetition flags, test plans, and swift test; reading .xcresult; Swift Testing, XCTest, and XCUITest fixes; known-issue and disabling APIs.
  • references/android.md — repeating JVM and instrumented tests, the test-retry plugin, Test Orchestrator, Gradle Managed Devices, Compose and Espresso synchronization, Robolectric loopers, @FlakyTest.
  • references/ci-policy.md — retry and quarantine policy, flake tracking, and the external tools and agent skills worth knowing (Tuist, Develocity, Marathon, Firebase Test Lab, and others).

Fix Workflow

  1. Reproduce before touching code. Run the one test many times, in the same conditions CI uses (parallel on, same device or simulator, same order). Record the failure rate, such as 3 of 200. A flake you can't reproduce, you can't prove fixed. If it won't fail alone, run it with its whole suite or with randomized order: the cause is probably shared state or order.
  2. Read the failures, not just the count. Collect the failure messages and stack traces from several failing runs. Different messages across runs usually mean a race; the same message usually means one bad wait or assumption.
  3. Classify the cause with references/causes-and-fixes.md. Name it in the report ("async wait: asserts before the load finishes").
  4. Fix the source. Inject the clock, await the real signal, isolate the state, stub the network. Fix the code under test when the race is real there: a flaky test that exposes a production race is the test working.
  5. Verify with the same repetition that reproduced it, at least 10 times the original failure interval (a 1-in-50 flake needs 500 clean runs). Then run the full suite once to make sure the fix didn't move the problem.
  6. Remove any retry, skip, or known-issue marker the flake was carrying, in the same change.

Never "fix" a flake by raising a timeout, adding a sleep, adding a retry, or deleting the assertion. Raising a timeout is acceptable only when the operation is genuinely slow and bounded, and the report says so.

Read the full file on GitHub · 54 lines

Files

What ships with it

4 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.

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. 9d ago First seen · 54 lines · 146 tokens per session scan A 387aa01410c6

Subscribe to this mod's changes

flaky-tests-pro is a skill published in the GitHub repository kelvinkosbab/AppBootstrapAI (8 stars, last pushed today), licensed MIT. It adds 146 tokens to every session and 1,333 once invoked, about $0.0006 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-11-21.

Related

flaky-tests-pro compared with skills from other repositories

flaky-tests-pro next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
flaky-tests-prokelvinkosbab/AppBootstrapAISkill8todayMITA146Claude Code
argent-react-native-app-workflowsoftware-mansion/argentSkill3.3ktodayApache-2.0A41Claude Code, Codex
argent-test-ui-flowsoftware-mansion/argentSkill3.3ktodayApache-2.0A44Claude Code, Codex
argent-react-native-optimizationsoftware-mansion/argentSkill3.3ktodayApache-2.0A46Claude Code, Codex
mobile-automationmobile-next/mobile-mcpSkill11k5d agoApache-2.0A58Claude Code, Codex
argent-metro-debuggersoftware-mansion/argentSkill3.3ktodayApache-2.0A50Claude Code, Codex
argent-qa-e2esoftware-mansion/argentSkill3.3ktodayApache-2.0A91Claude Code, Codex