playwright-best-practices

Match Playwright tasks to best-practice guidance for TypeScript testing.

350|63|Updated Jan 27, 2026
One-click install
npx skills add https://github.com/currents-dev/playwright-best-practices-skill --skill playwright-best-practices-currents-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-best-practices
Source: https://github.com/currents-dev/playwright-best-practices-skill/tree/main
Command: npx skills add https://github.com/currents-dev/playwright-best-practices-skill --skill playwright-best-practices-currents-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing, debugging, and maintaining Playwright tests across E2E, component, API, and other test types can be complex and brittle without a centralized guidance system. This skill provides comprehensive, activity-based guidance to help you apply Playwright best practices in TypeScript projects, reducing guesswork and speeding up delivery.

Core Features & Use Cases

  • Activity-based guidance that maps your current task to focused references (debugging, flaky tests, test organization, locators, assertions & waiting, Page Object Model, fixtures & hooks).
  • Specialized coverage for accessibility, mobile testing, API testing, visual regression, iFrames, security, i18n, Electron, and browser extensions, with concrete examples and decision trees.
  • Guidance for structuring tests, configuring CI/CD, optimizing performance, mocking APIs, time/clock mocking, and security considerations, all tailored to Playwright in TypeScript.

Quick Start

Describe your task (e.g., fix a flaky login test) and the AI will load the relevant Playwright best-practices guidance for your current activity.

Frequently Asked Questions about playwright-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix flaky Playwright tests in a TypeScript project?

Fix flaky Playwright tests by applying targeted debugging guidance that maps your failing activity to specific best practices for assertions, waiting, and locators to reduce test brittleness.

What is the best way to organize Playwright E2E and component tests?

Organize Playwright tests by following test-organization guidance utilizing the Page Object Model, fixtures, and hooks to structure E2E and component tests, ensuring maintainable and scalable test suites.

Does this Playwright guidance cover API testing and visual regression?

Yes, this Playwright guidance covers API testing, visual regression, accessibility, mobile testing, iFrames, security, i18n, and Electron by providing concrete examples and decision trees for each specialized test type.

How do I configure CI/CD pipelines for running Playwright tests?

Configure CI/CD pipelines for Playwright tests by applying dedicated CI configuration and performance tuning guidance to ensure optimized execution and reliable integration within your TypeScript project workflows.

When should I use the Page Object Model versus fixtures and hooks in Playwright?

Choose between the Page Object Model and Playwright fixtures and hooks by evaluating activity-based guidance that maps your test structuring and refactoring tasks to the appropriate pattern for optimal maintainability.