Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Fix failing or flaky Playwright tests. Use when user says "fix test", "flaky test", "test failing", "debug test", "test broken", "test passes sometimes", or "intermittent failure".
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 103% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 101% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-20 | ✗→✓ | ▲ Improved | 82% | 0% |
Diagnose and fix a Playwright test that fails or passes intermittently using a systematic taxonomy.
$ARGUMENTS contains:
e2e/login.spec.ts"the checkout test fails in CI but passes locally"Run the test to capture the error:
bashnpx playwright test <file> --reporter=list
If the test passes, it's likely flaky. Run burn-in:
bashnpx playwright test <file> --repeat-each=10 --reporter=list
If it still passes, try with parallel workers:
bashnpx playwright test --fully-parallel --workers=4 --repeat-each=5
Run with full tracing:
bashnpx playwright test <file> --trace=on --retries=0
Read the trace output. Use /debug to analyze trace files if available.
Load flaky-taxonomy.md from this skill directory.
Every failing test falls into one of four categories:
| Category | Symptom | Diagnosis | |---|---|---| | Timing/Async | Fails intermittently everywhere | --repeat-each=20 reproduces locally | | Test Isolation | Fails in suite, passes alone | --workers=1 --grep "test name" passes | | Environment | Fails in CI, passes locally | Compare CI vs local screenshots/traces | | Infrastructure | Random, no pattern | Error references browser internals |
Timing/Async:
waitForTimeout() with web-first assertionsawait to missing Playwright callstoBeVisible() before interacting with elementsTest Isolation:
Environment:
docker locally to match CI environmentInfrastructure:
retries: 2)Run the test 10 times to confirm stability:
bashnpx playwright test <file> --repeat-each=10 --reporter=list
All 10 must pass. If any fail, go back to step 3.
Suggest:
retries: 2 if not alreadytrace: 'on-first-retry' in configOther measured skills in the registry, with their headline benchmark lift.