pw
What it does
This skill is a toolkit that routes browser testing requests to the right commands and templates. It is for developers and QA teams working with Playwright or other end-to-end browser tests.
When to use it
- βWhen you need to set up or write Playwright tests for a web app.
- βWhen you want to move tests from Cypress or Selenium into Playwright.
- βWhen you need to connect your browser tests with TestRail or BrowserStack.
Skill link
https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/playwright-pro/skills/pw/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHelp me with Playwright testing for my web app, from setup through the first tests.β
5 new skills a week. 1 minute to read.
How it works
The skill lists its commands, such as setup, generate, review and fix. It suggests a sequence for most projects, starting with setup, then generating and reviewing tests.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Playwright Pro
Production-grade Playwright testing toolkit for AI coding agents.
Available Commands
When installed as a Claude Code plugin, these are available as /pw: commands:
| Command | What it does |
|---|---|
/pw:pw-init |
Set up Playwright β detects framework, generates config, CI, first test |
/pw:generate <spec> |
Generate tests from user story, URL, or component |
/pw:pw-review |
Review tests for anti-patterns and coverage gaps |
/pw:fix <test> |
Diagnose and fix failing or flaky tests |
/pw:migrate |
Migrate from Cypress or Selenium to Playwright |
/pw:coverage |
Analyze what's tested vs. what's missing |
/pw:testrail |
Sync with TestRail β read cases, push results |
/pw:browserstack |
Run on BrowserStack, pull cross-browser reports |
/pw:report |
Generate test report in your preferred format |
Quick Start Workflow
The recommended sequence for most projects:
1. /pw:pw-init β scaffolds config, CI pipeline, and a first smoke test
2. /pw:generate β generates tests from your spec or URL
3. /pw:pw-review β validates quality and flags anti-patterns β always run after generate
4. /pw:fix <test> β diagnoses and repairs any failing/flaky tests β run when CI turns red
Validation checkpoints:
- After
/pw:generateβ always run/pw:pw-reviewbefore committing; it catches locator anti-patterns and missing assertions automatically. - After
/pw:fixβ re-run the full suite locally (npx playwright test) to confirm the fix doesn't introduce regressions. - After
/pw:migrateβ run/pw:coverageto confirm parity with the old suite before decommissioning Cypress/Selenium tests.
Example: Generate β Review β Fix
# 1. Generate tests from a user story
/pw:generate "As a user I can log in with email and password"
# Generated: tests/auth/login.spec.ts
# β Playwright Pro creates the file using the auth template.
# 2. Review the generated tests
/pw:pw-review tests/auth/login.spec.ts
# β Flags: one test used page.locator('input[type=password]') β suggests getByLabel('Password')
# β Fix applied automatically.
# 3. Run locally to confirm
npx playwright test tests/auth/login.spec.ts --headed
# 4. If a test is flaky in CI, diagnose it
/pw:fix tests/auth/login.spec.ts
# β Identifies missing web-first assertion; replaces waitForTimeout(2000) with expect(locator).toBeVisible()
Golden Rules
getByRole()over CSS/XPath β resilient to markup changes- Never
page.waitForTimeout()β use web-first assertions expect(locator)auto-retries;expect(await locator.textContent())does not- Isolate every test β no shared state between tests
baseURLin config β zero hardcoded URLs- Retries:
2in CI,0locally - Traces:
'on-first-retry'β rich debugging without slowdown - Fixtures over globals β
test.extend()for shared state - One behavior per test β multiple related assertions are fine
- Mock external services only β never mock your own app
Locator Priority
1. getByRole() β buttons, links, headings, form elements
2. getByLabel() β form fields with labels
3. getByText() β non-interactive text
4. getByPlaceholder() β inputs with placeholder
5. getByTestId() β when no semantic option exists
6. page.locator() β CSS/XPath as last resort
What's Included
- 9 skills with detailed step-by-step instructions
- 3 specialized agents: test-architect, test-debugger, migration-planner
- 55 test templates: auth, CRUD, checkout, search, forms, dashboard, settings, onboarding, notifications, API, accessibility
- 2 MCP servers (TypeScript): TestRail and BrowserStack integrations (optional β not auto-registered; see Integration Setup)
- Smart hooks: auto-validate test quality, auto-detect Playwright projects
- 6 reference docs: golden rules, locators, assertions, fixtures, pitfalls, flaky tests
- Migration guides: Cypress and Selenium mapping tables
Integration Setup
Not auto-registered (issue #978). The TestRail and BrowserStack MCP servers are no longer declared in the plugin's
.mcp.json(they failed to connect for every user β no bundlednode_modules). Exporting the env vars below is not enough:/pw:testrail//pw:browserstackfail with "tool not found" until you enable the server manually (cd integrations/<name>-mcp && npm install, then register it in your own user/project MCP config). See `CLAUDE.md
FAQ
What is the recommended order of steps?
Set up Playwright first, generate tests, review them before committing, and fix any failures when CI turns red.
Does it come with ready-made templates?
Yes. The skill mentions 55 templates covering patterns such as login, CRUD, checkout and search.
Does it need extra setup for TestRail or BrowserStack?
Yes. Those need their own environment settings and tool servers before they work.
Details
Original description by the author
Use for any Playwright or end-to-end browser testing work: writing tests, fixing flaky ones, migrating from Cypress or Selenium, CI setup, TestRail or BrowserStack. Routes to the matching /pw sub-skill and its 55 templates.
Popularity
- GitHub stars
- 29k
- Ranking position
- #9479
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-launcher-orchestrator
29kHelps your agent plan, build, test and schedule a Claude managed agent in your own account, step by step, starting from one clear goal.
grade-iterate
29kLets your agent grade a managed AI agent's work against a rubric and improve it in a fixed number of rounds, so it never loops forever.
interview
29kLets your agent interview you about an AI agent idea and turn your answers into a simple build plan before anything is launched.
run-without-you
29kHelps your agent set up a managed AI agent to run on a schedule or when an event happens, with the cron timing checked before launch.
Similar skills
test-driven-development
311kTeaches your agent to write a failing test first, watch it fail, then write the smallest code that passes, before building any feature or fix.
verification-before-completion
311kTeaches your agent to run real checks and read their output before claiming that a task, fix, or build is complete or passing.
migrate-to-shoehorn
310kReplaces risky type casts in your test files with the shoehorn library, so tests can use partial data and still pass type checks.