playwright-best-practices
Skill0 starsChanged 4 months agoMITView on GitHub
Write, debug, and maintain Playwright tests — flaky tests, Page Object Model, locators/waits, fixtures, network mocking, auth, CI/CD. Covers E2E, component, API, visual, a11y, and extension testing.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- figueroaignacio/ignaciofigueroa.devtheir own version, first seen Nov 8, 2026
- ever-co/ever-workstheir own version, first seen Nov 8, 2026
- ever-works/ever-workstheir own version, first seen Nov 5, 2026
- lecluse-net/galaristheir own version, first seen Oct 30, 2026
- lcx9451/dsh-engineering-skill-packtheir own version, first seen Oct 25, 2026
- ldaume/agentic-engineering-harnesstheir own version, first seen Oct 20, 2026
Used with
Projects with it also use next-cache-components, multi-stage-dockerfile and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillnext-cache-components
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
Also in 4 projects that use this
GitHubSkillmulti-stage-dockerfile
Create optimized multi-stage Dockerfiles for any language or framework
Also in 3 projects that use this
VercelSkillnext-upgrade
Upgrade Next.js to the latest version following official migration guides and codemods
Also in 3 projects that use this
midudevSkilltailwind-css-patterns
Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing design systems, or optimizing CSS workflow.
Also in 3 projects that use this
xenitV1Skillnodejs-best-practices
Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.
Also in 3 projects that use this
SentrySkillnext-best-practices
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Also in 4 projects that use this
- +1 more from vercel-labs
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- sanity-io/sanity★ 6.4ksame name
- currents-dev/playwright-best-practices-skill★ 420same name
- tazo90/next-openapi-gen★ 196same name
- ever-co/ever-works★ 190same name
- ever-works/ever-works★ 190same name
- flpbalada/fb-skills★ 8same name
- figueroaignacio/ignaciofigueroa.dev★ 7same name
- lcx9451/dsh-engineering-skill-pack★ 3same name
- ldaume/agentic-engineering-harness★ 3same name
- dennisgr7/snob-cli★ 2same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository63 other files it gives its agents.
- .claude/skills/nestjs-best-practices/AGENTS.mdAGENTS.md
- accessibility-a11ySkill
- architecture-blueprint-generatorSkill
- backend-delivery-loopSkill
- backend-designSkill
- backend-dev-guidelinesSkill
- backend-testingSkill
- backend-to-frontend-handoff-docsSkill
- building-componentsSkill
- bullmq-specialistSkill
- canvas-designSkill
- code-patternsSkill
- components-composition-patternsSkill
- conventional-commitSkill
- core-web-vitalsSkill
- create-svgSkill
- css-architectureSkill
- cypress-authorSkill
- cypress-docsSkill
- cypress-explainSkill
- delivery-loop-retroSkill
- diagnoseSkill
- fastify-best-practicesSkill
- figma-code-connectSkill
- frontend-delivery-loopSkill
- frontend-fundamentalsSkill
- fullstack-delivery-loopSkill
- grill-meSkill
- hunt-race-conditionSkill
- impeccableSkill
- mermaid-diagramsSkill
- nestjs-best-practicesSkill
- nextjs-best-practicesSkill
- nextjs-performanceSkill
- nodejs-backend-patternsSkill
- owasp-security-reviewSkill
- performance-hunterSkill
- postgresql-code-reviewSkill
- postgresql-optimizationSkill
- postmanSkill
- prisma-postgresSkill
- pro-state-machineSkill
- race-conditionSkill
- react-best-practicesSkill
- react-performanceSkill
- react-querySkill
- redis-coreSkill
- redis-query-engineSkill
- redis-securitySkill
- refactorSkill
- review-panelSkill
- run-delivery-chainSkill
- spec-drivenSkill
- sql-optimizationSkill
- system-designSkill
- testing-strategySkill
- tune-skills-and-agentsSkill
- ui-ux-pro-maxSkill
- vercel-react-view-transitionsSkill
- viteSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 20 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 91
After writing or modifying tests: run npx playwright test --reporter=list.
“Common” is measured: kept by at least 6 in 10 of the 20 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Playwright Best Practices
Comprehensive guidance for Playwright test development — writing, debugging, and maintaining E2E, component, API, visual, accessibility, security, Electron, and extension tests. Every detail lives in the reference files below; this page only routes you to the right one.
References
Each file is loaded on demand — read one only when the task needs that depth (progressive disclosure).
core/ — the foundation every test relies on
core/test-suite-structure.md— organizing specs, suites, and API mocking baseline · read when scaffolding a new spec or structuring a suite.core/locators.md— stable, user-facing selectors (getByRole/getByLabel/getByText/data-testid) over brittle CSS/XPath · read when picking or fixing selectors.core/assertions-waiting.md— web-first assertions and auto-waiting instead of fixed timeouts · read when adding assertions, fixing timeouts, or removing explicit waits.core/page-object-model.md— POM structure and refactoring toward it · read when implementing or refactoring to Page Objects.core/fixtures-hooks.md— custom fixtures,beforeEach/afterEach, per-worker isolation · read when extracting setup/teardown or isolating data between workers.core/test-data.md— test-data factories and seeding · read when creating reusable test data.core/configuration.md—playwright.configsetup · read when configuring a project.core/annotations.md—skip/fixme/slow, conditional execution, test steps · read when annotating or grouping tests for reporting.core/test-tags.md—@smoke/@fast/@criticaltags and--grepfiltering · read when tagging or running a subset of tests.core/global-setup.md— global setup & teardown · read when sharing one-time setup across the run.core/projects-dependencies.md— projects and project dependencies · read when wiring multi-project or dependent setups.
testing-patterns/ — what kind of test you're writing
testing-patterns/component-testing.md— component tests · read when testing a component in isolation.testing-patterns/api-testing.md— API request testing · read when testing endpoints directly.testing-patterns/graphql-testing.md— GraphQL request/mocking · read when testing or mocking GraphQL.testing-patterns/visual-regression.md— screenshot/visual regression · read when adding visual snapshots.testing-patterns/canvas-webgl.md— canvas/WebGL/chart testing · read when asserting on canvas-rendered UI.testing-patterns/accessibility.md— axe-core a11y testing · read when testing accessibility.testing-patterns/security-testing.md— XSS/CSRF/auth security tests · read when testing security surfaces.testing-patterns/forms-validation.md— form and validation flows · read when testing forms.testing-patterns/drag-drop.md— drag-and-drop interactions · read when testing drag/drop.testing-patterns/file-operations.md+testing-patterns/file-upload-download.md— file upload/download · read when testing file I/O.testing-patterns/i18n.md— internationalization/locale testing · read when testing localized UI.testing-patterns/electron.md— Electron app testing · read when testing an Electron app.testing-patterns/browser-extensions.md— browser-extension testing · read when testing an extension.testing-patterns/performance-testing.md— performance budgets, Web Vitals, Lighthouse · read when asserting on performance.
advanced/ — complex flows, auth, and network
advanced/authentication.md+advanced/authentication-flows.md— auth setup and complex flows (MFA, reset) · read when handling login/auth state.advanced/network-advanced.md— network interception, mocking, HAR record/playback · read when mocking responses or intercepting requests.advanced/multi-context.md— multi-tab/popup and OAuth popup flows · read when testing multiple tabs/contexts.advanced/multi-user.md— multiple users, roles, real-time collaboration · read when testing multi-user/role scenarios.advanced/third-party.md— OAuth/SSO, payments, email/SMS verification · read when integrating third-party services.advanced/clock-mocking.md— date/time mocking · read when testing time-dependent behavior.advanced/mobile-testing.md— device emulation, touch gestures, viewport/breakpoints · read when testing mobile/responsive layouts.
browser-apis/ — browser capabilities
browser-apis/browser-apis.md— geolocation, permissions, clipboard, camera/microphone mocking · read when testing browser APIs.browser-apis/websockets.md— WebSocket/real-time testing · read when testing live connections.browser-apis/iframes.md— iframe testing · read when interacting with iframes.browser-apis/service-workers.md— service workers, PWA, offline-first · read when testing SW/PWA behavior.
debugging/ — when a test fails or flakes
debugging/debugging.md— trace viewer, error context, general debugging · read when investigating any failure.debugging/flaky-tests.md— flakiness, race conditions, isolation, state leaks, parallel-run flakiness · read when a test is flaky.debugging/console-errors.md— console/JS error monitoring, fail-on-console-error · read when watching console output.debugging/error-testing.md— error boundaries, network failures, offline, loading/validation states · read when testing error/edge cases.
architecture/ — choosing the right approach
architecture/pom-vs-fixtures.md— POM vs fixtures decision · read when deciding how to structure shared logic.architecture/test-architecture.md— test-type selection · read when planning what to test at which level.architecture/when-to-mock.md— mock vs real services · read when deciding to mock or hit the real thing.
frameworks/ — framework-specific guidance
frameworks/react.md·frameworks/angular.md·frameworks/vue.md·frameworks/nextjs.md— read the one matching the app under test.
infrastructure-ci-cd/ — running tests at scale
infrastructure-ci-cd/ci-cd.md— CI/CD pipeline setup · read when wiring tests into CI.infrastructure-ci-cd/github-actions.md·infrastructure-ci-cd/gitlab.md·infrastructure-ci-cd/other-providers.md— provider-specific CI config · read for your provider.infrastructure-ci-cd/docker.md— containerized runs · read when running in Docker.infrastructure-ci-cd/parallel-sharding.md— parallel execution and sharding · read when scaling out the run.infrastructure-ci-cd/performance.md— test-suite performance and worker isolation · read when speeding up the suite.infrastructure-ci-cd/test-coverage.md— coverage collection · read when measuring coverage.infrastructure-ci-cd/reporting.md— reporters and artifacts · read when configuring reports/artifacts.
Validation loop
After writing or modifying tests: run npx playwright test --reporter=list; on failure, inspect the trace (npx playwright show-trace), fix locators/waits/assertions, and re-run; only proceed when green; for critical tests, confirm stability with npx playwright test --repeat-each=5.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

