/playwright-skills-plugin:playwright-testerfrom Playwright Skills
Automated UI testing using Playwright's native test runner. Writes persistent .spec.ts test files, runs them for free via `npx playwright test`, and fixes failures automatically. Use this skill whenever the user wants to test a web app, check if a frontend works, run UI tests, verify form submissions, test browser interactions, do end-to-end testing, stress test a website, or validate that recent changes didn't break anything. Also triggers for "run my tests", "check the app in a browser", "does this page work", "test the happy path", or "find UI bugs". This skill is the go-to for any browser-based testing — prefer it over manually driving browsers or using screenshot-based approaches.
Ships in Playwright Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Write Playwright test files, run them natively (zero AI tokens), and fix failures in an automated loop.
There are three ways to do browser testing with AI:
This skill uses approach 3. The test files persist, grow over time into a regression suite, and run in parallel via Playwright's native worker system. You get the AI's intelligence for test design without paying for execution.
Before first use, verify the project has Playwright installed. If not, install it:
npm install -D @playwright/test
npx playwright install chromium
Check for an existing playwright.config.ts. If missing, create a minimal one appropriate to the
project's framework (Next.js, Vite, static, etc.). Use webServer config to auto-start the dev
server when tests run.
tests/, e2e/, or __tests__/ directoriesplaywright.config.ts and understand its setupWrite .spec.ts files organized by test strategy. Each file should be focused and independent.
File organization:
tests/
e2e/
happy-path.spec.ts — core user journeys that must always work
validation.spec.ts — form validation, required fields, error states
edge-cases.spec.ts — empty inputs, special characters, boundary values
accessibility.spec.ts — keyboard nav, aria labels, screen reader basics
Writing good tests:
getByRole(), getByLabel(), getByText() over CSS selectors, because they're resilient to markup changes and match how users actually find elementsbeforeEach for setuptest('submits contact form with valid data and shows success message')await expect() assertions that verify outcomes, not implementation detailsWhen existing tests are found:
Run the full test suite using Playwright's native runner:
npx playwright test --reporter=line 2>&1
Key flags to know:
--workers=auto — parallel execution across CPU cores (this is the default, no need to set it)--reporter=line — clean, parseable output for reading results--headed — only if the user specifically asks to watch the tests run--project=chromium — single browser for speed during development; run all browsers before deployThe test runner handles all parallelism natively. No sub-agents needed for execution.
When tests fail, enter the fix loop (max 3 attempts):
waitFor or increase timeout on that specific actionnpx playwright test --reporter=line 2>&1
Report the rerun results even if all tests pass — the user needs to see confirmation.When reporting results, always include:
After all tests pass (or after the fix loop exhausts):
When the user wants comprehensive testing from multiple angles simultaneously, use sub-agents to write tests in parallel, then run them all natively.
Example swarm configuration — spawn 3 sub-agents:
Each agent writes its test files to the shared tests/e2e/ directory. Once all agents complete,
run the full suite once with npx playwright test. Playwright's worker system handles parallel
execution of the combined test files.
The key insight: sub-agents spend tokens on test design (the creative, high-value part), while execution uses zero tokens regardless of how many tests were written.
To invoke swarm mode, tell Claude: "Use the playwright-tester skill in swarm mode" or "Run parallel test agents" or "Test from multiple angles."
webServer config in playwright.config.ts, the dev server starts automatically — no need to start it manually.--trace on to get a full trace file for debugging.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ritvarsbiksis/playwright-skills-plugin --plugin playwright-skills-plugin2 skills in this plugin