From pw
Reviews Playwright test files for 20 anti-patterns, best practices, and coverage gaps. Scores 1-10 per file, generates reports, and offers fixes for critical issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pw:reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Systematically review Playwright test files for anti-patterns, missed best practices, and coverage gaps.
Systematically review Playwright test files for anti-patterns, missed best practices, and coverage gaps.
$ARGUMENTS can be:
testDirplaywright.config.ts for project settings*.spec.ts / *.spec.js files in scopeLoad anti-patterns.md from this skill directory. Check for all 20 anti-patterns.
Critical (must fix):
waitForTimeout() usageexpect(await ...))baseURLawait on Playwright callsWarning (should fix):
8. Tests longer than 50 lines (consider splitting)
9. Magic strings without named constants
10. Missing error/edge case tests
11. page.evaluate() for things locators can do
12. Nested test.describe() more than 2 levels deep
13. Generic test names ("should work", "test 1")
Info (consider):
14. No page objects for pages with 5+ locators
15. Inline test data instead of factory/fixture
16. Missing accessibility assertions
17. No visual regression tests for UI-heavy pages
18. Console error assertions not checked
19. Network idle waits instead of specific assertions
20. Missing test.describe() grouping
Rate 1-10 based on:
For each file:
## <filename> — Score: X/10
### Critical
- Line 15: `waitForTimeout(2000)` → use `expect(locator).toBeVisible()`
- Line 28: CSS selector `.btn-submit` → `getByRole('button', { name: "submit" })`
### Warning
- Line 42: Test name "test login" → "should redirect to dashboard after login"
### Suggestions
- Consider adding error case: what happens with invalid credentials?
If reviewing an entire test suite:
/batch for very large suitesFor each critical issue, provide the corrected code. Ask user: "Apply these fixes? [Yes/No]"
If yes, apply all fixes using Edit tool.
4plugins reuse this skill
First indexed Mar 9, 2026
npx claudepluginhub arogyareddy/alirezarezvani-claude-skills --plugin pwReviews Playwright test files for 20 anti-patterns, best practices, and coverage gaps. Scores 1-10 per file, generates reports, and offers fixes for critical issues.
Reviews test suites for coverage completeness, quality, and best practices. Checks happy/sad paths, edge cases, assertions, isolation, AAA patterns, and compliance with RSpec, Minitest, Jest, Playwright.
Reviews test files for bug-catching quality, grading on six dimensions like assertion depth, input coverage, mock health with actionable scorecard.