
Fix Flaky Playwright Tests
Diagnoses and fixes failing or intermittently passing Playwright tests using a four-category checklist.
- Repository
- alirezarezvani/claude-skills
- Stars
- 29,149
- Licence
- MIT
- Files
- 2 files
What it does
When installed, the agent follows a structured routine whenever you ask it to fix a broken or unreliable Playwright end-to-end test. It reruns the test (sometimes many times, or in parallel) to reproduce the failure, captures a trace, sorts the problem into one of four common causes (timing, test isolation, CI-versus-local environment, or browser infrastructure), applies a matching fix, and reruns the test ten times to confirm it is stable. It also suggests changes to prevent the problem from coming back.
Great for
- Developers maintaining a Playwright test suite that has tests failing in CI but passing locally
- Teams dealing with intermittent test failures that block merges
- QA engineers who want a consistent checklist for triaging flaky tests
Skip it if
- Projects that do not use Playwright, since the commands and fixes are Playwright-specific
- Application bugs where the test is correctly catching a real defect; the skill is aimed at making tests stable, so it could mask a genuine problem if misused
- Running on production or shared environments without care, because the routine repeatedly runs test commands (up to 10 or more repetitions with 4 workers) which can add load and may modify test data
Try asking
- “Fix the flaky test in e2e/checkout.spec.ts that passes sometimes”
- “The login test fails in CI but passes on my laptop, debug it”
- “Why does should redirect after login fail intermittently? Reproduce it and fix it”
Install in 3 steps
- 1
Download the skill
The ZIP contains the 2 original files, the MIT licence and an attribution note.
fix.zip - 2
Add it to your agent
Claude Code (all projects)
mkdir -p ~/.claude/skills && unzip fix.zip -d ~/.claude/skills/Claude Code / Agent SDK (this project only)
mkdir -p .claude/skills && unzip fix.zip -d .claude/skills/Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.
- 3
Ask for the task
No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.
Get better results
- Give the agent the test file path and the exact error message or CI log so it can skip straight to categorizing the failure.
- Review the proposed diff before accepting it, especially any added retries or longer timeouts, which can hide real bugs.
- Ask the agent to explain which category it chose and why, so you can check its reasoning.
What's inside
- flaky-taxonomy.md
- SKILL.md
Redistributed unmodified from alirezarezvani/claude-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.