playwright
БесплатноБез исполняемых скриптовНе проверенPlaywright 浏览器与 E2E 测试。需要加跑调前端测试,或 runtime-verify 要验证 UI 流程时触发。
от WenJunDuan★ 187 звёзд на GitHubОб этом скилле
/playwright — Browser Runtime Tests
Core Rule
Use Playwright when the acceptance signal depends on a real browser: routing, forms, auth flows, rendering, navigation, API-backed UI state, responsive layouts, downloads/uploads, or regressions that unit tests cannot see.
This skill is the frontend/E2E test arm of athena-runtime-verify. It complements the enabled playwright-skill@anthropic-official plugin and gives Athena-specific evidence rules.
Official references:
- Playwright intro: https://playwright.dev/docs/intro
- Writing tests: https://playwright.dev/docs/writing-tests
- CLI: https://playwright.dev/docs/test-cli
- Codegen: https://playwright.dev/docs/codegen
- Trace viewer: https://playwright.dev/docs/trace-viewer
Workflow
Detect project setup before adding anything:
- Existing Playwright: inspect
playwright.config.*,tests/,e2e/,package.jsonscripts. - No Playwright: prefer adding
@playwright/testand a minimal config/test file that fits the repo. - If the repo already uses Cypress/Vitest browser mode/etc., avoid wholesale migration; add Playwright only if runtime verification needs real browser coverage.
- Existing Playwright: inspect
Start or reuse a deterministic app target:
- Prefer an existing dev/preview script from
package.json. - Use a fixed port when possible.
- Set
baseURLin config or pass it viaPLAYWRIGHT_BASE_URL. - Do not leave background servers running at the end of the task.
- Prefer an existing dev/preview script from
Write tests through user-visible behavior:
- Use role/text/test-id locators instead of brittle CSS/XPath.
- Use Playwright web-first assertions such as
await expect(locator).toBeVisible(). - Keep tests small: one critical flow or acceptance behavior per test.
- Cover at least normal, boundary, and failure/empty states when doing
runtime-verify.
Run and iterate:
- Main path:
npx playwright test. - Debug path:
npx playwright test --headed,npx playwright test --ui, ornpx playwright codegen <url>when exploring selectors. - Trace path:
npx playwright test --trace onthen inspect withnpx playwright show-trace <trace.zip>. - If browser binaries are missing, run
npx playwright installor the narrower browser install requested by the repo.
- Main path:
Record evidence:
- Include exact command, exit code, and the important pass/fail output.
- For
athena-runtime-verify, keep raw artifacts under.ai_state/.runtime/and append oneruntime-verify:summary line to the sprintlog.mdwith scenario, command, result, and artifact path. - If a test first fails and then passes after a fix, record both the failing symptom and the passing rerun.
Athena Integration
Feature: use when UI/API behavior is risky or user-visible.Refactor/System: use for browser-facing flows before review; this is part of runtime verification.Bugfix: use when the bug is reproducible in the browser, even though full runtime-verify is usually skipped.Hotfix/Quick: run only the smallest smoke path needed.
Resources
Read references/runtime-patterns.md when you need concrete command patterns, config snippets, or evidence table examples.
Установить playwright в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл playwright?
Playwright 浏览器与 E2E 测试。需要加跑调前端测试,或 runtime-verify 要验证 UI 流程时触发。
Как установить скилл playwright?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл playwright запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic