Claude Skill Flaky Test Detector — Testing skill for Claude Code
Claude Code skill for detecting flaky test patterns that cause intermittent CI failures.
How to install Claude Skill Flaky Test Detector
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open wrsmith108/claude-skill-flaky-test-detector and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Skill Flaky Test Detector does
Claude Code skill for detecting flaky test patterns that cause intermittent CI failures.
Alternatives in Testing
- Webapp Testing — Test local web applications using Playwright for UI verification and debugging 94.1k ★
- #29 — #52, #103) 92.5k ★
- /test Routing — Vérifie le routing de commandes RTK sans exécution (dry-run) 25.5k ★
README
Flaky Test Detector
A Claude Code skill for detecting flaky test patterns that cause intermittent CI failures.
Installation
As a Claude Code Skill
# Clone to your Claude skills directory
git clone https://github.com/wrsmith108/claude-skill-flaky-test-detector.git ~/.claude/skills/flaky-test-detector
Standalone Usage
# Run directly with npx
npx tsx scripts/index.ts [directory] [options]
Trigger Phrases
This skill activates when you mention:
- "flaky test"
- "intermittent failure"
- "test sometimes fails"
- "race condition in test"
- "timing issue in test"
- "test passes locally but fails in CI"
- "non-deterministic test"
Pattern Detection
Scans `*.test.ts` and `*.spec.ts` files to detect:
| Severity | Pattern | Risk |
|---|---|---|
| HIGH | 1-second TTL | Second-boundary race conditions |
| HIGH | Math.floor(Date.now() / 1000) |
Second truncation timing edge cases |
| HIGH | Very short setTimeout (<100ms) | Unreliable timeouts |
| MEDIUM | Date.now() without mocking |
Real time causes non-determinism |
| MEDIUM | new Date() without mocking |
Real date causes flakiness |
| MEDIUM | Low timeout values | Race conditions in CI |
| LOW | Math.random() without seeding |
Non-reproducible behavior |
| LOW | process.nextTick in assertions |
Timing-dependent assertions |
Usage
Scan Current Directory
# Run the detector on all test files
npx tsx scripts/index.ts
# Scan specific directory
npx tsx scripts/index.ts ./src/tests
# Output as JSON
npx tsx scripts/index.ts --json
# CI mode: exit with code 1 if HIGH severity issues found
npx tsx scripts/index.ts --ci
Options
| Option | Description |
|---|---|
--json |
Output results as JSON |
--ci |
CI mode: exit with code 1 if HIGH severity issues found |
--quiet |
Suppress output except errors |
--help |
Show help message |
Output Example
## Flaky Test Analysis
Scanned 94 test f
Related Skills
Flaky Test Detector
Detect, analyze, and eliminate flaky tests across any test runner. An AI agent skill that identifies non-deter
Skill CI Churn
GitHub Actions cost analyzer & flaky-test detector for pull requests. Measures wasted CI compute, classifies c
Flaky Test
Diagnose a flaky test by running it N times. Delegates to flaky-test-isolator subagent — N runs, signature-gro
QA Review
Review test automation code for OOP compliance, Allure metadata, proper abstractions, and flaky patterns. Invo
Create Test Repo
Create a new ArcKit test repo with full scaffolding, auto-detecting the next version number
Test Feature
Intelligently test a feature by automatically detecting whether to use MCP, API, or UI testing, and choosing b
Related Agents
Rig Debugger
Systematic root-cause debugger. Use when investigating a failing test, a production bug, a flaky behavior, or
Test Maintainer
Fixes failing and flaky tests, and refactors a suite that has grown duplication. Finds the root cause instead
Flaky Test Isolator
USE WHEN a test intermittently fails on unchanged code. Runs it N times sequentially, captures pass/fail + std