Skip to content
Back to skills

Flaky Tests

ASecurity

Diagnose and fix non-deterministic tests instead of retrying them.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 3, 2026
developmentrustgo

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add Andersseen/agentyx --skill flaky-tests --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Flaky Tests?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Flaky Tests
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andersseen-flaky-tests/badge)](https://www.skillsdirectory.com/skills/andersseen-flaky-tests)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: flaky-tests
description: Diagnose and fix non-deterministic tests instead of retrying them.
---

# Flaky tests

A test that passes and fails without a code change destroys trust in the whole suite. Treat it as a
defect, not as noise.

## Never paper over it

Do not add a retry, a longer timeout or a skip as the fix. Retries hide real race conditions that
will surface in production, and a skipped test is a deleted test that still costs time to run.

## Find the source of non-determinism

The usual causes are time, ordering, concurrency, shared state, network and randomness. Pin clocks,
seed randomness, isolate state, and await every asynchronous operation explicitly.

## Reproduce before fixing

Run the test repeatedly, in random order and in parallel until the failure is reliable. A fix applied
to a failure you cannot reproduce is a guess.

## Quarantine with a deadline

If a flaky test must leave the critical path immediately, record why and when it will be fixed. An
unbounded quarantine list becomes permanent, and the coverage it represented is silently gone.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…