← ClaudeAtlas

flaky-test-analyzerlisted

Diagnoses why tests pass inconsistently and suggests fixes for timing, ordering, and state isolation issues.
Notysoty/openagentskills · ★ 9 · Testing & QA · score 80
Install: claude install-skill Notysoty/openagentskills
# Flaky Test Analyzer ## What this skill does This skill directs the agent to diagnose flaky tests — tests that sometimes pass and sometimes fail without any code changes. It examines the test code, the code under test, and the failure patterns to identify the root cause category (timing, shared state, ordering, network, randomness, etc.) and then suggests targeted fixes that make the test deterministic. Use this when a test is unreliable in CI, when a test passes locally but fails on the CI server, or when a test fails intermittently with no obvious pattern. ## How to use ### Claude Code / Cline Copy this file to `.agents/skills/flaky-test-analyzer/SKILL.md` in your project root. Then ask: - *"Use the Flaky Test Analyzer skill on `tests/checkout.test.ts` — it fails about 1 in 5 runs in CI."* - *"This test passes locally but fails in CI. Use the Flaky Test Analyzer skill to diagnose it."* Provide: 1. The test file (or the specific test that's flaky) 2. The failure message when it does fail 3. How often it fails (every time? 1 in 10? only in CI?) 4. Any observations about when it fails (after a specific other test? at a specific time of day?) ### Cursor Add the instructions below to your `.cursorrules` or paste them into the Cursor AI pane. Provide the test code and failure output. ### Codex Paste the test file, the failure message, and any relevant context. Ask Codex to follow the instructions below. ## The Prompt / Instructions for the Agent When asked to diagn