New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Review Playwright tests for quality

by alirezarezvani · MIT license · ★ 26,349 on GitHub · updated Aug 30

Review Playwright Tests cover

Review Playwright tests for quality. Use when user says "review tests", check test quality", "audit tests", "improve tests", "test code review", or "playwright best practices check".

---
name: "pw-review"
description: >-
  Review Playwright tests for quality. Use when user says "review tests",
  "check test quality", "audit tests", "improve tests", "test code review",
  or "playwright best practices check".
---

# Review Playwright Tests

Systematically review Playwright test files for anti-patterns, missed best practices, and coverage gaps.

## Input

`$ARGUMENTS` can be:
- A file path: review that specific test file
- A directory: review all test files in the directory
- Empty: review all tests in the project's `testDir`

Overview

Systematically review Playwright test files for anti-patterns, missed best practices, and coverage gaps.

What you get

  • File-by-file review with scores
  • Summarytotal files, average score, critical issue count
  • Actionable fix list
  • Coverage gaps identified (pages/features with no tests)
Manual install (npx, ZIP)
Claude Codenpx skills add alirezarezvani/claude-skills --skill pw-review -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \ | tar -xz -C ~/.claude/skills --strip-components=4 claude-skills-19392f7a0826/engineering-team/playwright-pro/skills/pw-review
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/fcbea7447637d23334dd/pw-review.zip" -OutFile "$env:TEMP\pw-review.zip"; Expand-Archive "$env:TEMP\pw-review.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.0 KB
  • anti-patterns.md4.2 KB
Read the files here
alirezarezvani/19392f72 files
SKILL.md
Show the full text103 lines

Review Playwright Tests

Systematically review Playwright test files for anti-patterns, missed best practices, and coverage gaps.

Input

$ARGUMENTS can be:

  • A file path: review that specific test file
  • A directory: review all test files in the directory
  • Empty: review all tests in the project's testDir

Steps

1. Gather Context
  • Read playwright.config.ts for project settings
  • List all *.spec.ts / *.spec.js files in scope
  • If reviewing a single file, also check related page objects and fixtures
2. Check Each File Against Anti-Patterns

Load anti-patterns.md from this skill directory. Check for all 20 anti-patterns.

Critical (must fix):

  1. waitForTimeout() usage
  2. Non-web-first assertions (expect(await ...))
  3. Hardcoded URLs instead of baseURL
  4. CSS/XPath selectors when role-based exists
  5. Missing await on Playwright calls
  6. Shared mutable state between tests
  7. Test execution order dependencies

Warning (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

3. Score Each File

Rate 1-10 based on:

  • 9-10: Production-ready, follows all golden rules
  • 7-8: Good, minor improvements possible
  • 5-6: Functional but has anti-patterns
  • 3-4: Significant issues, likely flaky
  • 1-2: Needs rewrite
4. Generate Review Report

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?
5. For Project-Wide Review

If reviewing an entire test suite:

  • Spawn sub-agents per file for parallel review (up to 5 concurrent)
  • Or use /batch for very large suites
  • Aggregate results into a summary table
6. Offer Fixes

For each critical issue, provide the corrected code. Ask user: "Apply these fixes? [Yes/No]"

If yes, apply all fixes using Edit tool.

Output

  • File-by-file review with scores
  • Summary: total files, average score, critical issue count
  • Actionable fix list
  • Coverage gaps identified (pages/features with no tests)
1---
2name: "pw-review"
3description: >-
4 Review Playwright tests for quality. Use when user says "review tests",
5 "check test quality", "audit tests", "improve tests", "test code review",
6 or "playwright best practices check".
7---
8 
9# Review Playwright Tests
10 
11Systematically review Playwright test files for anti-patterns, missed best practices, and coverage gaps.
12 
13## Input
14 
15`$ARGUMENTS` can be:
16- A file path: review that specific test file
17- A directory: review all test files in the directory
18- Empty: review all tests in the project's `testDir`
19 
20## Steps
21 
22### 1. Gather Context
23 
24- Read `playwright.config.ts` for project settings
25- List all `*.spec.ts` / `*.spec.js` files in scope
26- If reviewing a single file, also check related page objects and fixtures
27 
28### 2. Check Each File Against Anti-Patterns
29 
30Load `anti-patterns.md` from this skill directory. Check for all 20 anti-patterns.
31 
32**Critical (must fix):**
331. `waitForTimeout()` usage
342. Non-web-first assertions (`expect(await ...)`)
353. Hardcoded URLs instead of `baseURL`
364. CSS/XPath selectors when role-based exists
375. Missing `await` on Playwright calls
386. Shared mutable state between tests
397. Test execution order dependencies
40 
41**Warning (should fix):**
428. Tests longer than 50 lines (consider splitting)
439. Magic strings without named constants
4410. Missing error/edge case tests
4511. `page.evaluate()` for things locators can do
4612. Nested `test.describe()` more than 2 levels deep
4713. Generic test names ("should work", "test 1")
48 
49**Info (consider):**
5014. No page objects for pages with 5+ locators
5115. Inline test data instead of factory/fixture
5216. Missing accessibility assertions
5317. No visual regression tests for UI-heavy pages
5418. Console error assertions not checked
5519. Network idle waits instead of specific assertions
5620. Missing `test.describe()` grouping
57 
58### 3. Score Each File
59 
60Rate 1-10 based on:
61- **9-10**: Production-ready, follows all golden rules
62- **7-8**: Good, minor improvements possible
63- **5-6**: Functional but has anti-patterns
64- **3-4**: Significant issues, likely flaky
65- **1-2**: Needs rewrite
66 
67### 4. Generate Review Report
68 
69For each file:
70```
71## <filename> — Score: X/10
72 
73### Critical
74- Line 15: `waitForTimeout(2000)` → use `expect(locator).toBeVisible()`
75- Line 28: CSS selector `.btn-submit` → `getByRole('button', { name: "submit" })`
76 
77### Warning
78- Line 42: Test name "test login" → "should redirect to dashboard after login"
79 
80### Suggestions
81- Consider adding error case: what happens with invalid credentials?
82```
83 
84### 5. For Project-Wide Review
85 
86If reviewing an entire test suite:
87- Spawn sub-agents per file for parallel review (up to 5 concurrent)
88- Or use `/batch` for very large suites
89- Aggregate results into a summary table
90 
91### 6. Offer Fixes
92 
93For each critical issue, provide the corrected code. Ask user: "Apply these fixes? [Yes/No]"
94 
95If yes, apply all fixes using `Edit` tool.
96 
97## Output
98 
99- File-by-file review with scores
100- Summary: total files, average score, critical issue count
101- Actionable fix list
102- Coverage gaps identified (pages/features with no tests)
103 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 26,349
Checked
Source
alirezarezvani/claude-skills ↗
Creator
alirezarezvani · 363 listings
View creator

Similar skills

See all →
SkillRequires technical rigor and verificationCode Review Receptionobra/superpowers · by obraUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation★ 290k GitHub starsSkillConduct high-quality, persona-driven code reviewsCode Review ExpertHoangNguyen0403/agent-skills-standard · by HoangNguyen0403Conduct high-quality, persona-driven code reviews. Use when reviewing PRs, critiquing code quality, or analyzing changes for team feedback.★ 569 GitHub starsSkillExplain something in the format that is fastestLLM output explainerJohnQinAMD/llm-output-explainer · by JohnQinAMDExplain something in the format that is fastest to understand, from controlled English (ASD-STE100 style), to a diagram, to an interactive HTML page, to a narrated explainer video. Check facts against their sources, using parallel subagents for independent evidence streams when the host supports them. Use when the user wants to understand a substantial concept, algorithm, code change, pull request, paper, benchmark result, or agent output, or asks for an explainer, diagram, HTML explanation, STE, or video. Not for one-line answers, drafting a pull request description, or code review.★ 4 GitHub starsSkillRequests code review before mergingRequesting code reviewobra/superpowers · by obraUse when completing tasks, implementing major features, or before merging to verify work meets requirements★ 290k GitHub starsPromptAct as a code review agent to evaluate and improve codef/prompts.chat · by Xiang FanAct as a code review agent to evaluate and improve code quality, style, and functionality.New listingPromptAct as an expert AI code reviewerCode review by coderabitf/prompts.chat · by Faisal BhuiyanYou are an expert AI code reviewer.New listing

More from alirezarezvani

SkillResume a paused experiment/ar:ar-resume — Resume Experimentalirezarezvani/claude-skills · by alirezarezvaniResume a paused experiment. Checkout the experiment branch, read results history, continue iterating. Use when the user runs /ar:ar-resume or asks to pick up a previously started autoresearch experiment.★ 26.3k GitHub starsSkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loopalirezarezvani/claude-skills · by alirezarezvaniStart an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule.★ 26.3k GitHub starsSkillRun a single experiment iteration/ar:run — Single Experiment Iterationalirezarezvani/claude-skills · by alirezarezvaniRun a single experiment iteration. Edit the target file, evaluate, keep or discard. Use when the user runs /ar:run or asks for one manual autoresearch iteration.★ 26.3k GitHub starsSkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experimentalirezarezvani/claude-skills · by alirezarezvaniSet up a new autoresearch experiment interactively. Collects domain, target file, eval command, metric, direction, and evaluator. Use when the user runs /ar:setup or asks to start optimizing a file with the autoresearch loop.★ 26.3k GitHub starsSkill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberationalirezarezvani/claude-skills · by alirezarezvani/cs:boardroom <brief> — 6-phase multi-role deliberation across the C-suite with Phase 2 isolation, critic pre-screen, and synthesis. Outputs a board memo. Use when a decision spans multiple executive domains — e.g. a pricing change touching finance, positioning, and product, or a raise-vs-cut runway call.★ 26.3k GitHub stars