Comprehensive reference guide for writing, debugging, and maintaining Playwright tests across all testing types and scenarios.
Works with
Covers 50+ testing patterns including E2E, component, API, GraphQL, visual regression, accessibility, security, mobile, and Electron app testing
Includes activity-based lookup tables for writing new tests, debugging failures, fixing flaky tests, and infrastructure setup
Provides decision trees for test type selection, architecture patterns (POM vs fixtures),
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionplaywright-best-practicesExecute the skills CLI command in your project's root directory to begin installation:
Fetches playwright-best-practices from currents-dev/playwright-best-practices-skill and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate playwright-best-practices. Access via /playwright-best-practices in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
181
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
181
stars
This skill provides comprehensive guidance for all aspects of Playwright test development, from writing new tests to debugging and maintaining existing test suites.
Consult these references based on what you're doing:
When to use: Creating new test files, writing test cases, implementing test scenarios
| Activity | Reference Files |
|---|---|
| Writing E2E tests | test-suite-structure.md, locators.md, assertions-waiting.md |
| Writing component tests | component-testing.md, test-suite-structure.md |
| Writing API tests | api-testing.md, test-suite-structure.md |
| Writing GraphQL tests | graphql-testing.md, api-testing.md |
| Writing visual regression tests | visual-regression.md, canvas-webgl.md |
| Structuring test code with POM | page-object-model.md, test-suite-structure.md |
| Setting up test data/fixtures | fixtures-hooks.md, test-data.md |
| Handling authentication | authentication.md, authentication-flows.md |
| Testing date/time features | clock-mocking.md |
| Testing file upload/download | file-operations.md, file-upload-download.md |
| Testing forms/validation | forms-validation.md |
| Testing drag and drop | drag-drop.md |
| Testing accessibility | accessibility.md |
| Testing security (XSS, CSRF) | security-testing.md |
| Using test annotations | annotations.md |
| Using test tags | test-tags.md |
| Testing iframes | iframes.md |
| Testing canvas/WebGL | canvas-webgl.md |
| Internationalization (i18n) | i18n.md |
| Testing Electron apps | electron.md |
| Testing browser extensions | browser-extensions.md |
When to use: Testing mobile devices, touch interactions, responsive layouts
| Activity | Reference Files |
|---|---|
| Device emulation | mobile-testing.md |
| Touch gestures (swipe, tap) | mobile-testing.md |
| Viewport/breakpoint testing | mobile-testing.md |
| Mobile-specific UI | mobile-testing.md, locators.md |
When to use: Testing WebSockets, geolocation, permissions, multi-tab flows
| Activity | Reference Files |
|---|---|
| WebSocket/real-time testing | websockets.md |
| Geolocation mocking | browser-apis.md |
| Permission handling | browser-apis.md |
| Clipboard testing | browser-apis.md |
| Camera/microphone mocking | browser-apis.md |
| Multi-tab/popup flows | multi-context.md |
| OAuth popup handling | third-party.md, multi-context.md |
When to use: Test failures, element not found, timeouts, unexpected behavior
| Activity | Reference Files |
|---|---|
| Debugging test failures | debugging.md, assertions-waiting.md |
| Fixing flaky tests | flaky-tests.md, debugging.md, assertions-waiting.md |
| Debugging flaky parallel runs | flaky-tests.md, performance.md, fixtures-hooks.md |
| Ensuring test isolation / avoiding state leak | flaky-tests.md, fixtures-hooks.md, performance.md |
| Fixing selector issues | locators.md, debugging.md |
| Investigating timeout issues | assertions-waiting.md, debugging.md |
| Using trace viewer | debugging.md |
| Debugging race conditions | flaky-tests.md, debugging.md, assertions-waiting.md |
| Debugging console/JS errors | console-errors.md, debugging.md |
When to use: Testing error states, offline mode, network failures, validation
| Activity | Reference Files |
|---|---|
| Error boundary testing | error-testing.md |
| Network failure simulation | error-testing.md, network-advanced.md |
| Offline mode testing | error-testing.md, service-workers.md |
| Service worker testing | service-workers.md |
| Loading state testing | error-testing.md |
| Form validation testing | error-testing.md |
When to use: Testing features involving multiple users, roles, or real-time collaboration
| Activity | Reference Files |
|---|---|
| Multiple users in one test | multi-user.md |
| Real-time collaboration | multi-user.md, websockets.md |
| Role-based access testing | multi-user.md |
| Concurrent action testing | multi-user.md |
When to use: Choosing test patterns, deciding between approaches, planning test architecture
| Activity | Reference Files |
|---|---|
| POM vs fixtures decision | pom-vs-fixtures.md |
| Test type selection | test-architecture.md |
| Mock vs real services | when-to-mock.md |
| Test suite structure | test-suite-structure.md |
When to use: Testing React, Angular, Vue, or Next.js applications
| Activity | Reference Files |
|---|---|
| Testing React apps | react.md |
| Testing Angular apps | angular.md |
| Testing Vue/Nuxt apps | vue.md |
| Testing Next.js apps | nextjs.md |
When to use: Improving existing tests, code review, reducing duplication
| Activity | Reference Files |
|---|---|
| Refactoring to Page Object Model | page-object-model.md, test-suite-structure.md |
| Improving test organization | test-suite-structure.md, page-object-model.md |
| Extracting common setup/teardown | fixtures-hooks.md |
| Replacing brittle selectors | locators.md |
| Removing explicit waits | assertions-waiting.md |
| Creating test data factories | test-data.md |
| Configuration setup | configuration.md |
When to use: Settin
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
jwynia/agent-skills
kadajett/agent-nestjs-skills
asyrafhussin/agent-skills
vercel-labs/next-skills
wispbit-ai/skills
ejirocodes/agent-skills
Solid pick for teams standardizing on skills: playwright-best-practices is focused, and the summary matches what you get after install.
Registry listing for playwright-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.
Keeps context tight: playwright-best-practices is the kind of skill you can hand to a new teammate without a long onboarding doc.
Registry listing for playwright-best-practices matched our evaluation — installs cleanly and behaves as described in the markdown.
playwright-best-practices reduced setup friction for our internal harness; good balance of opinion and flexibility.
playwright-best-practices has been reliable in day-to-day use. Documentation quality is above average for community skills.
playwright-best-practices fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
playwright-best-practices reduced setup friction for our internal harness; good balance of opinion and flexibility.
I recommend playwright-best-practices for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
playwright-best-practices is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 72