Pw
Skill timdevai/proteus/skills/community/from-alireza/engineering-team/playwright-pro/skills/pw
Production-grade Playwright testing toolkit. Use when the user mentions Playwright tests, end-to-end testing, browser automation, fixing flaky tests, test migration, CI/CD testing, or test suites. Generate tests, fix flaky failures, migrate from Cypress/Selenium, sync with TestRail, run on BrowserStack. 55 templates, 3 agents, smart reporting.From its SKILL.md
npx -y skills add timdevai/proteus --skill pwAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.0 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
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:init | Set up Playwright — detects framework, generates config, CI, first test |
/pw:generate <spec> | Generate tests from user story, URL, or component |
/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:init → scaffolds config, CI pipeline, and a first smoke test
2. /pw:generate → generates tests from your spec or URL
3. /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: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: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
- 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
TestRail (Optional)
export TESTRAIL_URL="https://your-instance.testrail.io"
export TESTRAIL_USER="[email protected]"
export TESTRAIL_API_KEY="your-api-key"
BrowserStack (Optional)
export BROWSERSTACK_USERNAME="your-username"
export BROWSERSTACK_ACCESS_KEY="your-access-key"
Quick Reference
See reference/ directory for:
golden-rules.md— The 10 non-negotiable ruleslocators.md— Complete locator priority with cheat sheetassertions.md— Web-first assertions referencefixtures.md— Custom fixtures and storageState patternscommon-pitfalls.md— Top 10 mistakes and fixesflaky-tests.md— Diagnosis commands and quick fixes
See templates/README.md for the full template index.
What ships with it: 62 files
297.7 KB alongside SKILL.md
reference/
- assertions.md2.2 KB
- common-pitfalls.md3.1 KB
- fixtures.md3.1 KB
- flaky-tests.md1.5 KB
- golden-rules.md906 B
- locators.md2.1 KB
templates/
- accessibility/color-contrast.md5.5 KB
- accessibility/keyboard-navigation.md5.2 KB
- accessibility/screen-reader.md5.6 KB
- api/auth-headers.md4.7 KB
- api/error-responses.md5.4 KB
- api/graphql.md5.9 KB
- api/rate-limiting.md5.5 KB
- api/rest-crud.md5.0 KB
- auth/login.md4.6 KB
- auth/logout.md4.1 KB
- auth/mfa.md5.1 KB
- auth/password-reset.md5.7 KB
- auth/rbac.md4.7 KB
- auth/remember-me.md5.6 KB
- auth/session-timeout.md4.3 KB
- auth/sso.md4.5 KB
- checkout/add-to-cart.md4.1 KB
- checkout/apply-coupon.md5.0 KB
- checkout/order-confirm.md4.1 KB
- checkout/order-history.md4.6 KB
- checkout/payment.md5.4 KB
- checkout/update-quantity.md4.8 KB
- crud/bulk-operations.md5.2 KB
- crud/create.md4.7 KB
- crud/delete.md5.1 KB
- crud/read.md4.6 KB
- crud/soft-delete.md4.7 KB
- crud/update.md5.6 KB
- dashboard/chart-rendering.md4.9 KB
- dashboard/data-loading.md4.9 KB
- dashboard/date-range-filter.md5.5 KB
- dashboard/export.md5.7 KB
- dashboard/realtime-updates.md5.1 KB
- forms/autosave.md5.3 KB
22 more files not listed here. See all 62 in the repository.
Gives 0 of the 12 instructions most e2e browser skills give in ~1.2k tokens
Counted across 408 of the 410 authors here whose files we hold, read 2026-08-07
- Use page object model patternin 34 of 408, across 24 files
- Keep tests independentin 24 of 408, across 19 files
- Interact using refs from the latest snapshotin 24 of 408, across 12 files
- Snapshot to get element refsin 24 of 408, across 14 files
- Clean up test data after each testin 20 of 408, across 14 files
- Test user behavior not implementationin 19 of 408, across 13 files
- Wait for specific network conditionsin 18 of 408, across 8 files
- Quarantine flaky tests explicitlyin 18 of 408, across 9 files
- Re-snapshot after navigation or DOM changesin 17 of 408, across 10 files
- Detect running dev servers before writing test codein 17 of 408, across 7 files
- Use web-first assertionsin 17 of 408, across 14 files
- Ask the user which server to test if multiple are foundin 15 of 408, across 5 files
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.