test-flakiness

test-flakiness is a skill for Claude Code from cenconq25/claude-code-app-studio. It costs 52 tokens per session (1,558 once invoked), scanned A, original, MIT.

A workflow for finding tests that sometimes pass and sometimes fail without code changes. It reads results from CI, the system that automatically runs tests, and keeps a list of unreliable tests.

In plain words
What is it for?
Use it to analyze recent CI or build history, calculate each test's pass rate and timing variation, identify flaky tests, and track fixes.
Why use it?
It separates genuine product failures from failures caused by timing, test order, or hidden shared state. This makes CI results easier to trust and shows which tests need quarantine or repair.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; names the AskUserQuestion tool.

Good fit Use it to analyze recent CI or build history, calculate each test's pass rate and timing variation, identify flaky tests, and track fixes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cenconq25/claude-code-app-studio/test-flakiness
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 cenconq25/claude-code-app-studio --skill test-flakiness
Clone the repo
git clone --depth 1 https://github.com/cenconq25/claude-code-app-studio

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 test-flakiness

README.md
[![agentmods](https://agentmods.dev/badge/skills/cenconq25/claude-code-app-studio/test-flakiness/github.svg)](https://agentmods.dev/skills/cenconq25/claude-code-app-studio/test-flakiness)
Your own site
<a href="https://agentmods.dev/skills/cenconq25/claude-code-app-studio/test-flakiness"><img src="https://agentmods.dev/badge/skills/cenconq25/claude-code-app-studio/test-flakiness/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 test-flakiness

Your own site · 80×15
<a href="https://agentmods.dev/skills/cenconq25/claude-code-app-studio/test-flakiness"><img src="https://agentmods.dev/badge/skills/cenconq25/claude-code-app-studio/test-flakiness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,558 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.00052 $0.01558
Opus 5 $0.00026 $0.00779
Sonnet 5 $0.00010 $0.00312
Haiku 4.5 $0.00005 $0.00156

Measured 6d ago against content hash d056b49d026c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

test-flakiness 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 6d 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/test-flakiness/SKILL.md · 212 lines

How it starts

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

Test Flakiness

Locate tests whose result depends on timing, ordering, or hidden state rather than on the system under test. Maintain a registry of known flakes with quarantine status and fix targets.


Phase 1: Source CI History

Determine where test history lives. Try in order:

  1. .test-history/ directory — JSON or JUnit XML reports stored locally.
  2. gh CLI — fetch recent CI runs: gh run list --workflow=test.yml --limit=N --json conclusion,databaseId
  3. Bitrise API — if configured, fetch recent builds.
  4. CircleCI API — if configured.
  5. Manual import — if none of the above, ask the user to drop JUnit XML files into .test-history/ and rerun.

Default window: last 30 days OR last 50 runs, whichever yields more data. Override via --days or --runs.

If history is unreachable, stop and tell the user how to enable it.


Phase 2: Parse Results

For each retrieved run, extract:

  • Run ID
  • Date
  • Branch
  • Commit SHA
  • Per-test result (pass / fail / error / skipped)
  • Per-test duration

Aggregate per test:

  • Total runs
  • Pass count
  • Fail count
  • Pass rate
  • Standard deviation of duration
  • First failure date, last failure date

Phase 3: Classify

Apply these thresholds:

Class Criterion
HEALTHY Pass rate 100% over the window.
FLAKY Pass rate >= 50% but < 100%, with at least one fail and one pass on the same SHA.
BROKEN Pass rate < 50% — likely a real regression, not flakiness.
SLOW Duration std-dev > 2x median, even if pass rate is 100%.
DEAD Skipped on every run in the window.

Surface FLAKY first; that is the target of this skill.


Phase 4: Gather Context for Each Flaky Test

For each FLAKY entry, read the test file and look for:

  • Direct timing dependencies — setTimeout, Thread.sleep, Future.delayed, hardcoded animation duration waits.
  • Real network or file I/O.
  • Order-dependence — module-scope mutable state, missing teardown, reliance on previous test's side effects.
  • Real device clock — Date(), DateTime.now(), Date.now() without injection.
  • Real randomness — unseeded Math.random, Random().
  • Concurrency — uncontrolled await Promise.all(...), async/await without explicit synchronization.
  • E2E specific — fixed waits, hardcoded element coordinates, missing retry on flakey selectors.

Read the full file on GitHub · 212 lines

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. 6d ago First seen · 212 lines · 52 tokens per session scan A d056b49d026c

Subscribe to this mod's changes

test-flakiness is a skill published in the GitHub repository cenconq25/claude-code-app-studio (40 stars, last pushed 4mo ago), licensed MIT. It adds 52 tokens to every session and 1,558 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

systematic-debugging

4-phase root cause debugging: understand bugs before fixing.

NousResearch/hermes-agent · 16 tokens

langsmith-observability

LLM observability platform for tracing, evaluation, and monitoring. Use when debugging LLM applications, evaluating model outputs against datasets, monitoring production systems, or building systematic testing pipelines for AI applications.

davila7/claude-code-templates · 45 tokens

experimental-code-coverage-local-debugger

Runs code coverage locally via Universal Test Runner (UTR) or helper scripts, mimicking LUCI trybots. Activate when CQ tryjobs fail or underreport coverage, to test local GN/recipe repairs before uploading, or to debug hermetic crashes.

chromium/chromium · 59 tokens

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens

ios-simulator

Verify and debug native, React Native, Expo, or Flutter apps on an iOS Simulator with agent-device. Use when an agent needs to launch an app, inspect its live UI, tap, type, scroll, validate a code change, collect failure evidence, or reproduce a workflow on an iPhone or iPad Simulator.

callstack/agent-device · 69 tokens