Playwright best practices
An agent skill that teaches AI agents to write, debug and maintain Playwright tests the way an experienced Playwright engineer would
Without guidance, agents write Playwright tests from generic patterns: waitForTimeout calls, brittle CSS selectors, and retries that hide real bugs. This agent skill gives them Playwright practice instead: locators, web-first assertions, debugging flaky tests, CI setup and more.
npx skills add https://github.com/currents-dev/playwright-best-practices-skillThe source is on GitHub. It works in Claude Code, Cursor, VS Code, Gemini CLI and other agents that read skills. The agent loads it when a task involves Playwright; you do not need to name it.
What it covers
Writing tests
E2E, component, API, visual regression and accessibility tests
Fixing tests
Flaky tests, timeouts in CI, debugging failures
Browser features
File uploads, OAuth popups, multi-tab flows, iframes, service workers, WebSockets
Devices and locales
Mobile layouts, touch gestures, geolocation, i18n and RTL
Test structure
Page Object Model, fixtures, global setup and teardown
CI and scale
Projects, dependencies, parallel runs and sharding
Other apps
Electron apps and browser extensions
Example prompts:
"Fix this flaky login test."
"Add a test for the checkout flow."
"Mock the payment gateway in tests."
"Set up sharding for our test suite in CI."
Last updated
Was this helpful?