flaky-test-detector

flaky-test-detector is a skill for Claude Code, Codex from ArabelaTso/Skills-4-SE. It costs 110 tokens per session (1,898 once invoked), scanned A, original, Apache-2.0.

A test-analysis skill that finds tests which sometimes pass and sometimes fail without code changes. It checks test code and past results for causes such as timing, shared state, randomness, external services, and test ordering.

In plain words
What is it for?
Use it to investigate flaky Python tests in pytest or unittest and Java tests in JUnit or TestNG.
Why use it?
It helps identify unreliable tests that can hide real regressions and slow development with misleading failures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to investigate flaky Python tests in pytest or unittest and Java tests in JUnit or TestNG.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arabelatso/skills-4-se/flaky-test-detector
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 ArabelaTso/Skills-4-SE --skill flaky-test-detector
Clone the repo
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/arabelatso/skills-4-se/flaky-test-detector/github.svg)](https://agentmods.dev/skills/arabelatso/skills-4-se/flaky-test-detector)
Your own site
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/flaky-test-detector"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/flaky-test-detector/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-test-detector

Your own site · 80×15
<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/flaky-test-detector"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/flaky-test-detector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,898 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00110 $0.01898
Opus 5 $0.00055 $0.00949
Sonnet 5 $0.00022 $0.00380
Haiku 4.5 $0.00011 $0.00190

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

Security

Grade A, and why

flaky-test-detector scanned grade A with 1 finding 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/analyze_test_results.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `requests.get()`, `http.client` - Real network calls
skills/flaky-test-detector/SKILL.md · 270 lines

How it starts

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

Flaky Test Detector

Identify and fix non-deterministic tests that intermittently fail without code changes.

Quick Start

When a user reports flaky tests or asks for test reliability analysis:

  1. Identify the approach: Determine if analyzing code patterns or test execution results
  2. Analyze for flakiness: Look for common flaky patterns in test code or execution history
  3. Report findings: List identified flaky tests with specific issues
  4. Suggest fixes: Provide concrete remediation strategies

What Makes Tests Flaky

Flaky tests fail intermittently without code changes due to:

  • Timing issues: Race conditions, fixed sleeps, async/await problems
  • State management: Shared state between tests, improper cleanup
  • External dependencies: Network calls, database connections, file system
  • Randomness: Unseeded random data, UUID generation
  • Time dependencies: Current time/date, timezone assumptions
  • Resource issues: Leaks, insufficient cleanup
  • Test order: Dependencies between tests
  • Environment: Hardcoded paths, missing env vars

Detection Methods

Static Code Analysis

Analyze test code for common flaky patterns.

When to use:

  • Reviewing test code for potential issues
  • Proactive flakiness prevention
  • Code review of new tests
  • Refactoring existing tests

Process:

  1. Read test files
  2. Search for flaky patterns (see flaky-patterns.md)
  3. Identify specific issues with line numbers
  4. Suggest fixes (see remediation-strategies.md)

Common patterns to detect:

Timing issues:

  • time.sleep(), Thread.sleep() - Fixed waits
  • Missing await in async functions
  • Race conditions with threading

State issues:

  • Class or global variables in test classes
  • Missing setUp/tearDown or fixtures
  • Database operations without cleanup

External dependencies:

  • requests.get(), http.client - Real network calls
  • Database connections to production/external DBs
  • File operations without temp directories

Read the full file on GitHub · 270 lines

Files

What ships with it

3 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. 7d ago First seen · 270 lines · 110 tokens per session scan A 9cfec36d4370

Subscribe to this mod's changes

flaky-test-detector is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (251 stars, last pushed 20d ago), licensed Apache-2.0. It adds 110 tokens to every session and 1,898 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

verify

Verify Elixir/Phoenix changes — compile, format, and test in one loop. Use after implementation, before PRs, or after fixing bugs.

oliver-kriska/claude-elixir-phoenix · 33 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

jamditis/claude-skills-journalism · 21 tokens

test-first-bugs

Enforces a test-driven bug-fixing workflow. Use when a user reports a bug, failing code, an error, or asks to fix something.

jamditis/claude-skills-journalism · 35 tokens

java-code-review

Review Java code for bugs, duplicate code, correctness risks, maintainability improvements, and missing tests. By default review files modified in git; when the user explicitly names files, classes, packages, or a diff, review that scope instead. Generate a detailed review.md report with actionable comments and fixes.

sivaprasadreddy/sivalabs-agent-skills · 64 tokens

run-checks

Run the project's full verification gate: every check the project defines as a pass/fail condition, built from its CI config, check scripts, and configured tools, or from a formatter-linter-test baseline when it declares none. Use when the user asks to "run checks", "run the verification gate", "run lint and tests"…

tobihagemann/turbo · 96 tokens

flake-triage

Decide whether a preview the visual-diff bot flagged actually regressed or is simply nondeterministic, using a repeat-render oracle at a single commit. Use when a PR's preview diff reports a changed preview whose source the PR does not touch, or when a render, GIF or filmstrip is suspected of being unstable.

yschimke/compose-ai-tools · 70 tokens