pw
O que ela faz
Esta skill é um kit de ferramentas que direciona pedidos de testes de navegador para os comandos e modelos certos. Ela é para desenvolvedores e equipes de QA que trabalham com Playwright ou outros testes de ponta a ponta no navegador.
Quando usar
- ✓Quando você precisa configurar ou escrever testes Playwright para um aplicativo web.
- ✓Quando você quer migrar testes do Cypress ou do Selenium para o Playwright.
- ✓Quando você precisa conectar seus testes de navegador ao TestRail ou ao BrowserStack.
Link da skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/playwright-pro/skills/pw/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Me ajude com os testes Playwright do meu aplicativo web, desde a configuração até os primeiros testes.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
A skill lista os seus comandos, como configurar, gerar, revisar e corrigir. Ela sugere uma sequência para a maioria dos projetos, começando pela configuração e depois gerando e revisando os testes.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
Playwright Pro
Production-grade Playwright testing toolkit for AI coding agents.
Available Commands
When installed as a Claude Code plugin, these are available as /pw: commands:
| Command | What it does |
|---|---|
/pw:pw-init |
Set up Playwright — detects framework, generates config, CI, first test |
/pw:generate <spec> |
Generate tests from user story, URL, or component |
/pw:pw-review |
Review tests for anti-patterns and coverage gaps |
/pw:fix <test> |
Diagnose and fix failing or flaky tests |
/pw:migrate |
Migrate from Cypress or Selenium to Playwright |
/pw:coverage |
Analyze what's tested vs. what's missing |
/pw:testrail |
Sync with TestRail — read cases, push results |
/pw:browserstack |
Run on BrowserStack, pull cross-browser reports |
/pw:report |
Generate test report in your preferred format |
Quick Start Workflow
The recommended sequence for most projects:
1. /pw:pw-init → scaffolds config, CI pipeline, and a first smoke test
2. /pw:generate → generates tests from your spec or URL
3. /pw:pw-review → validates quality and flags anti-patterns ← always run after generate
4. /pw:fix <test> → diagnoses and repairs any failing/flaky tests ← run when CI turns red
Validation checkpoints:
- After
/pw:generate— always run/pw:pw-reviewbefore committing; it catches locator anti-patterns and missing assertions automatically. - After
/pw:fix— re-run the full suite locally (npx playwright test) to confirm the fix doesn't introduce regressions. - After
/pw:migrate— run/pw:coverageto confirm parity with the old suite before decommissioning Cypress/Selenium tests.
Example: Generate → Review → Fix
# 1. Generate tests from a user story
/pw:generate "As a user I can log in with email and password"
# Generated: tests/auth/login.spec.ts
# → Playwright Pro creates the file using the auth template.
# 2. Review the generated tests
/pw:pw-review tests/auth/login.spec.ts
# → Flags: one test used page.locator('input[type=password]') — suggests getByLabel('Password')
# → Fix applied automatically.
# 3. Run locally to confirm
npx playwright test tests/auth/login.spec.ts --headed
# 4. If a test is flaky in CI, diagnose it
/pw:fix tests/auth/login.spec.ts
# → Identifies missing web-first assertion; replaces waitForTimeout(2000) with expect(locator).toBeVisible()
Golden Rules
getByRole()over CSS/XPath — resilient to markup changes- Never
page.waitForTimeout()— use web-first assertions expect(locator)auto-retries;expect(await locator.textContent())does not- Isolate every test — no shared state between tests
baseURLin config — zero hardcoded URLs- Retries:
2in CI,0locally - Traces:
'on-first-retry'— rich debugging without slowdown - Fixtures over globals —
test.extend()for shared state - One behavior per test — multiple related assertions are fine
- Mock external services only — never mock your own app
Locator Priority
1. getByRole() — buttons, links, headings, form elements
2. getByLabel() — form fields with labels
3. getByText() — non-interactive text
4. getByPlaceholder() — inputs with placeholder
5. getByTestId() — when no semantic option exists
6. page.locator() — CSS/XPath as last resort
What's Included
- 9 skills with detailed step-by-step instructions
- 3 specialized agents: test-architect, test-debugger, migration-planner
- 55 test templates: auth, CRUD, checkout, search, forms, dashboard, settings, onboarding, notifications, API, accessibility
- 2 MCP servers (TypeScript): TestRail and BrowserStack integrations (optional — not auto-registered; see Integration Setup)
- Smart hooks: auto-validate test quality, auto-detect Playwright projects
- 6 reference docs: golden rules, locators, assertions, fixtures, pitfalls, flaky tests
- Migration guides: Cypress and Selenium mapping tables
Integration Setup
Not auto-registered (issue #978). The TestRail and BrowserStack MCP servers are no longer declared in the plugin's
.mcp.json(they failed to connect for every user — no bundlednode_modules). Exporting the env vars below is not enough:/pw:testrail//pw:browserstackfail with "tool not found" until you enable the server manually (cd integrations/<name>-mcp && npm install, then register it in your own user/project MCP config). See `CLAUDE.md
Perguntas frequentes
Qual é a ordem recomendada dos passos?
Configure o Playwright primeiro, gere os testes, revise-os antes de fazer commit e corrija as falhas quando o CI ficar vermelho.
Ela vem com modelos prontos?
Sim. A skill menciona 55 modelos que cobrem padrões como login, CRUD, checkout e busca.
Precisa de configuração extra para o TestRail ou o BrowserStack?
Sim. Eles precisam das suas próprias configurações de ambiente e dos servidores de ferramentas antes de funcionar.
Detalhes
Descrição original do autor
Use for any Playwright or end-to-end browser testing work: writing tests, fixing flaky ones, migrating from Cypress or Selenium, CI setup, TestRail or BrowserStack. Routes to the matching /pw sub-skill and its 55 templates.
Popularidade
- Estrelas no GitHub
- 29 mil
- Posição no ranking
- #9479
- Licença
- MIT
- Atualizada em
- 02/11/2026
Comentários
- …
Mais skills deste repositório
agent-launcher-orchestrator
29 milAjuda seu agente a planejar, criar, testar e agendar um agente gerenciado do Claude na sua própria conta, passo a passo, a partir de um objetivo claro.
grade-iterate
29 milPermite que seu agente avalie o trabalho de um agente de IA gerenciado com base em uma rubrica e o melhore em um número fixo de rodadas, para que ele nunca entre em loop infinito.
interview
29 milPermite que seu agente entreviste você sobre uma ideia de agente de IA e transforme suas respostas em um plano de construção simples antes de qualquer lançamento.
run-without-you
29 milAjuda seu agente a configurar um agente gerenciado de IA para rodar em um agendamento ou quando um evento acontecer, com o horário do cron verificado antes do lançamento.
Skills parecidas
test-driven-development
311 milEnsina seu agente a escrever primeiro um teste que falha, ver a falha e depois escrever o menor código que passa, antes de criar qualquer funcionalidade ou correção.
verification-before-completion
311 milEnsina seu agente a rodar verificações reais e ler a saída antes de afirmar que uma tarefa, correção ou build está concluído ou passando.
migrate-to-shoehorn
310 milSubstitui conversões de tipo arriscadas nos seus arquivos de teste pela biblioteca shoehorn, para que os testes usem dados parciais e ainda passem na checagem de tipos.