mcpField
P
playwright-skill

playwright-skill

github.com/zebbernTesting & quality4.7k41 installsUpdated 1d ago
Repository

About playwright-skill

playwright-skill is a reference skill for writing and debugging Playwright tests, aimed at developers working with browser automation. Its guides cover test design, CI, framework recipes, and CLI browser workflows, with examples in TypeScript and JavaScript.

Key features

  1. 0150+ Playwright reference guides
  2. 02Selectors, assertions, fixtures, and test structure
  3. 03Network mocking, auth, and API testing
  4. 04CI, debugging, and test artifacts
  5. 05Framework and migration recipes
  6. 06CLI browser automation guidance

Use cases

  1. 01Designing resilient browser tests
  2. 02Diagnosing flaky or failing tests
  3. 03Setting up Playwright tests in CI
  4. 04Using Playwright CLI for browser workflows

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/zebbern/claude-code-guide --skill playwright-skill

After installing, type/playwright-skillin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

ci/
ci-github-actions.md
ci-gitlab.md
ci-other.md
docker-and-containers.md
global-setup-teardown.md
parallel-and-sharding.md
projects-and-dependencies.md
reporting-and-artifacts.md
test-coverage.md
core/
accessibility.md
angular.md
api-testing.md
assertions-and-waiting.md
auth-flows.md
authentication.md
browser-apis.md
browser-extensions.md
canvas-and-webgl.md
clock-and-time-mocking.md
common-pitfalls.md
component-testing.md
configuration.md
crud-testing.md
debugging.md
drag-and-drop.md
electron-testing.md
error-and-edge-cases.md
error-index.md
file-operations.md
file-upload-download.md

Details

From the project README

Playwright Skill

Opinionated, production-tested Playwright guidance — every pattern includes when (and when not) to use it.

50+ reference guides covering the full Playwright surface: selectors, assertions, fixtures, page objects, network mocking, auth, visual regression, accessibility, API testing, CI/CD, debugging, and more — with TypeScript and JavaScript examples throughout.

Golden Rules

  1. getByRole() over CSS/XPath — resilient to markup changes, mirrors how users see the page
  2. Never page.waitForTimeout() — use expect(locator).toBeVisible() or page.waitForURL()
  3. Web-first assertions — expect(locator) auto-retries; expect(await locator.textContent()) does not
  4. Isolate every test — no shared state, no execution-order dependencies
  5. baseURL in config — zero hardcoded URLs in tests
  6. Retries: 2 in CI, 0 locally — surface flakiness where it matters
  7. Traces: 'on-first-retry' — rich debugging artifacts without CI slowdown
  8. Fixtures over globals — share state via test.extend(), not module-level variables
  9. One behavior per test — multiple related expect() calls are fine
  10. Mock external services only — never mock your own app; mock third-party APIs, payment gateways, email

Guide Index

Writing Tests
What you're doingGuideDeep dive
Choosing selectorslocators.mdlocator-strategy.md
Assertions & waitingassertions-and-waiting.md
Organizing test suitestest-organization.mdtest-architecture.md
Playwright configconfiguration.md
Page objectspage-object-model.mdpom-vs-fixtures-vs-helpers.md
Fixtures & hooksfixtures-and-hooks.md
Test datatest-data-management.md
Auth & loginauthentication.mdauth-flows.md
API testing (REST/GraphQL)api-testing.md
Visual regressionvisual-regression.md
Accessibilityaccessibility.md
Mobile & responsivemobile-and-responsive.md
Component testingcomponent-testing.md
Network mockingnetwork-mocking.mdwhen-to-mock.md
Forms & validationforms-and-validation.md
File uploads/downloadsfile-operations.mdfile-upload-download.md
Error & edge caseserror-and-edge-cases.md
CRUD flowscrud-testing.md
Drag and dropdrag-and-drop.md
Search & filter UIsearch-and-filter.md
Debugging & Fixing
ProblemGuide
General debugging workflowdebugging.md
Specific error messageerror-index.md
Flaky / intermittent testsflaky-tests.md
Common beginner mistakescommon-pitfalls.md
Framework Recipes
FrameworkGuide
Next.js (App Router + Pages Router)nextjs.md
React (CRA, Vite)react.md
Vue 3 / Nuxtvue.md
Angularangular.md
Migration Guides
FromGuide
Cypressfrom-cypress.md
Selenium / WebDriverfrom-selenium.md
Architecture Decisions
QuestionGuide
Which locator strategy?locator-strategy.md
E2E vs component vs API?test-architecture.md
Mock vs real services?when-to-mock.md
POM vs fixtures vs helpers?pom-vs-fixtures-vs-helpers.md
CI/CD & Infrastructure
TopicGuide
GitHub Actionsci-github-actions.md
GitLab CIci-gitlab.md
CircleCI / Azure DevOps / Jenkinsci-other.md
Parallel execution & shardingparallel-and-sharding.md
Docker & containersdocker-and-containers.md
Reports & artifactsreporting-and-artifacts.md
Code coveragetest-coverage.md
Global setup/teardownglobal-setup-teardown.md
Multi-project configprojects-and-dependencies.md
Specialized Topics
TopicGuide
Multi-user & collaborationmulti-user-and-collaboration.md
WebSockets & real-timewebsockets-and-realtime.md
Browser APIs (geo, clipboard, permissions)browser-apis.md
iframes & Shadow DOMiframes-and-shadow-dom.md
Canvas & WebGLcanvas-and-webgl.md
Service workers & PWAservice-workers-and-pwa.md
Electron appselectron-testing.md
Browser extensionsbrowser-extensions.md
Security testingsecurity-testing.md
Performance & benchmarksperformance-testing.md
i18n & localizationi18n-and-localization.md
Multi-tab & popupsmulti-context-and-popups.md
Clock & time mockingclock-and-time-mocking.md
Third-party integrationsthird-party-integrations.md
CLI Browser Automation
What you're doingGuide
CLI browser interactionplaywright-cli/SKILL.md
Core commands (open, click, fill, navigate)core-commands.md
Network mocking & interceptionrequest-mocking.md
Running custom Playwright coderunning-custom-code.md
Multi-session browser managementsession-management.md
Cookies, localStorage, auth statestorage-and-auth.md
Test code generation from CLItest-generation.md
Tracing and debuggingtracing-and-debugging.md
Screenshots, video, PDFscreenshots-and-media.md
Device & environment emulationdevice-emulation.md
Complex multi-step workflowsadvanced-workflows.md

Language Note

All guides include TypeScript and JavaScript examples. When the project uses .js files or has no tsconfig.json, examples are adapted to plain JavaScript.

Comments

Markdown supported