playwright-pro
БесплатноЗапускает вложенные скриптыНе проверенEnd-to-end testing with Playwright: test generation, page objects, locator strategy, flaky- test diagnosis, visual regression, and CI integration. Use when…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
Playwright Pro
The agent writes and maintains end-to-end tests with Playwright that stay green for the right reasons. It can generate tests from user stories, implement the Page Object pattern for maintainability, apply the correct locator strategy for resilient tests, diagnose and fix flaky tests, migrate from Cypress or Selenium, integrate with CI/CD, run visual regression tests, and perform accessibility audits. The 10 golden rules in the core reference prevent most flaky and brittle tests.
Core Capabilities
- Resilient authoring —
getByRole/getByLabel/getByTextlocator priority, web-first auto-retrying assertions, and the 10 golden rules. - Page Object Model — centralize locators, expose user-intent methods, generate POM classes from HTML/selectors.
- Test generation — produce specs from user stories with happy-path and error-path coverage.
- Flaky-test diagnosis — trace analysis, headed/debug runs, race-condition and shared-state fixes.
- Migration — Cypress/Selenium → Playwright command mapping and auth-setup patterns.
- CI integration — GitHub Actions, sharding, conditional browser installs, trace/screenshot artifacts.
- Visual regression & accessibility —
toHaveScreenshotbaselines and Axe WCAG AA gates.
When to Use
- Writing or organizing E2E tests for web apps.
- Fixing flaky tests or diagnosing CI-only failures.
- Migrating a suite from Cypress or Selenium.
- Adding visual regression or WCAG accessibility gates.
- Setting up Playwright CI integration and reporting.
Clarify First
Before generating tests, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Task / sub-skill: init, generate, fix-flaky, migrate, or review (routes the entire workflow).
- User story or flow to cover: the happy + error paths the spec must assert (drives test generation).
- Locator surface: whether the app exposes roles/labels/
data-testid(sets locator strategy and POM resilience). - Source framework (if migrating): Cypress or Selenium (selects the command-mapping table).
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Sub-Skills
This skill uses compound sub-skill architecture. Each sub-skill in skills/ handles a specific workflow:
| Sub-Skill | File | Purpose |
|---|---|---|
| Init | skills/init.md |
Bootstrap Playwright in a project -- install, configure, create first test |
| Generate | skills/generate.md |
Generate test files from user stories or page descriptions |
| Fix | skills/fix.md |
Diagnose and fix failing or flaky tests using trace analysis |
| Migrate | skills/migrate.md |
Migrate from Cypress or Selenium to Playwright |
| Review | skills/review.md |
Audit test quality, coverage gaps, and flaky test indicators |
| Report | skills/report.md |
Generate execution reports from Playwright JSON output |
| Coverage | skills/coverage.md |
Map tests to user stories, identify coverage gaps |
| BrowserStack | skills/browserstack.md |
BrowserStack cloud integration for cross-browser testing |
| TestRail | skills/testrail.md |
TestRail integration for test case management |
Sub-skill flow: Init → Generate → Review → Fix (if needed); Coverage → Generate (fill gaps); Report → BrowserStack / TestRail.
Workflow
- Pick the sub-skill for the task (table above) and read it.
- Before writing, map what exists:
coverage_mapper.pyagainst a flows file shows which user flows have no spec. - Write or generate specs with role, label and text locators and web-first assertions;
test_generator.pyandpage_object_generator.pygive a starting skeleton, not finished tests. - Validation checkpoint:
test_analyzer.pyon the spec directory must exit 0 (no high-severity findings such aswaitForTimeoutorforce: true). - After CI runs, parse reports with
test_report_parser.pyand track flakiness across runs withflaky_detector.py; fix flaky tests by root cause, never by adding retries or sleeps. - Done when the critical flows are covered, the analyzer is clean, and the last ten CI runs show no flaky tests.
Quick Start
# from engineering/playwright-pro/
python3 scripts/test_analyzer.py assets/tests # exit 0: clean
python3 scripts/test_analyzer.py assets/flawed_tests # exit 1: waitForTimeout, nth-child CSS
python3 scripts/coverage_mapper.py --tests assets/tests --flows assets/sample_flows.json # 1 of 3 flows covered
python3 scripts/flaky_detector.py --results-dir assets/reports # checkout spec flaky in 2 of 3 runs
python3 scripts/test_report_parser.py assets/reports/run3.json --top-slow 3
python3 scripts/page_object_generator.py --html assets/sample_login.html --n
Установить playwright-pro в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл playwright-pro?
End-to-end testing with Playwright: test generation, page objects, locator strategy, flaky- test diagnosis, visual regression, and CI integration. Use when writing E2E tests, fixing flaky tests, or migrating from Cypress/Selenium.
Как установить скилл playwright-pro?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл playwright-pro запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic