Skip to main content
skill Claude Code

pw-review — Claude Code skill: what it does, how to install

pw-review audits Playwright tests for anti-patterns, coverage gaps, and weak practices. Use it for one test file, a directory, or the project testDir.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install pw@claude-code-skills
Open on GitHub

What pw-review does

pw-review reads playwright.config.ts, finds the test files in scope, and checks them against 20 anti-patterns. Critical checks include waitForTimeout(), non-web-first assertions, hardcoded URLs, weak selectors, missing await, shared mutable state, and test-order dependencies.

Each file receives a score from 1 to 10 with critical issues, warnings, suggestions, and possible fixes. A project-wide review can split files between sub-agents, aggregate the results, and point out coverage gaps. Related page objects and fixtures are also considered when one file is reviewed.

Install it when you need a structured Playwright test audit before making changes. For a quick check of a tiny file, the full report may be more than you need.

What it helps with

  • find waitForTimeout() in Playwright tests
  • check selectors and web-first assertions
  • catch missing await calls
  • identify gaps in test coverage
  • review every test file in a directory

Example prompts for the agent

  • Review the tests in `tests/auth.spec.ts` for quality.
  • Audit all Playwright tests in `tests/` and score each file.
  • Find critical anti-patterns and show corrected code.

How to install pw-review

1Plugin marketplace

/plugin marketplace add alirezarezvani/claude-skills
/plugin install pw@claude-code-skills

This installs the whole pw plugin with all its skills

2Skills CLI (Vercel)

npx skills add alirezarezvani/claude-skills --skill pw-review -a claude-code

3Manually: put the files in place

~/.claude/skills/pw-review/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pw-review/

From the same set349

The whole set →
engineering-skills Alireza Rezvani An engineering skill index for Claude Code that helps you select one specialist SKILL.md for the task at hand. It covers architecture, testing, DevOps, and data work. Claude Code 2,387installs finance-skills Alireza Rezvani Routes ambiguous finance prompts to the right bundled skill: financial-analyst, saas-metrics-coach, or month-end-close. Claude Code 2,312installs marketing-skills Alireza Rezvani A directory and router for marketing skills in Claude Code. It picks the right specialist skill for SEO, content, CRO, channels, and related tasks. Claude Code 2,264installs business-growth-skills Alireza Rezvani Routes growth and revenue prompts to the right specialized skill across customer success, sales engineering, RevOps, and proposals in Claude Code. Claude Code 2,189installs engineering-advanced-skills Alireza Rezvani An index of 37 engineering skills for architecture, automation, reliability, and platform work. Use it when a project needs task-specific engineering workflows. Claude Code 2,019installs product-skills Alireza Rezvani Product work orchestrator for Claude Code. Routes queries across 16 domain lanes and validates discovery trees with deterministic scripts. Claude Code 1,994installs pm-skills Alireza Rezvani Routes project-delivery requests across 8 PM sub-skills for Jira, Confluence, sprints, reporting, and team communication. Useful for controlled delivery work. Claude Code 1,975installs senior-backend Alireza Rezvani Scaffolds backend APIs, detects database bottlenecks, and runs load tests. Useful when designing Express routes, optimizing PostgreSQL, or preparing for production. Claude Code 1,674installs

Similar

agents-sdk official OpenAI Builds, runs, and tests OpenAI Agents SDK apps from Codex. Turns a prompt, repo, or session into a working agent with tools and eval tests. CX Codex GP ChatGPT 22installs agent-browser official Vercel Labs Automates browser actions via CLI, takes DOM snapshots, clicks elements, and verifies dev servers. Helps AI agents inspect web interfaces directly. CX Codex GP ChatGPT 20installs android-performance official OpenAI Captures Simpleperf CPU profiles, Perfetto traces, and gfxinfo metrics via adb. Helps diagnose jank and heavy functions in Android apps. CX Codex GP ChatGPT 19installs testing-data-visualizations official OpenAI This skill establishes test strategies for charts, dashboards, and diagrams. It separates unit, component, visual regression, and E2E coverage without brittle pixel snapshots. CX Codex GP ChatGPT 18installs agent-browser-verify official Vercel Labs Checks a dev server page in the browser for loading issues, console errors, and missing UI elements. Use it to verify a running project before moving on. CX Codex GP ChatGPT 14installs improve-codebase-architecture Matt Pocock This skill scans a codebase for architectural friction, then builds a visual HTML report with refactoring candidates. Use it before a deeper architecture review. Claude Code 1,163,035installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. Claude Code CX Codex Cursor +1 673,100installs tdd Matt Pocock Guides the red-green TDD loop: ensures tests are written first, keep them at public interfaces, and avoid coupling to implementation details. Claude Code 1,141,062installs

Questions about pw-review

How do I install pw-review in Claude Code?

Add the marketplace with /plugin marketplace add alirezarezvani/claude-skills, then install the plugin with /plugin install pw@claude-code-skills. You can also run npx skills add alirezarezvani/claude-skills --skill pw-review -a claude-code.

What does pw-review do?

The skill checks Playwright tests against 20 anti-patterns, scores each file from 1 to 10, and produces an actionable review. It also identifies missing coverage.

What does pw-review need to inspect a test project?

For a project review, it reads playwright.config.ts. You can pass a file path, a directory, or no argument to review the project's testDir.

Source text

SKILL.md · MIT
---
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`

## 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)

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor