api-review
Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…
Current Playwright (1.64) patterns for writing, debugging, and scaling reliable test suites. Use for any Playwright task, even ones you think you know, because the guides cover APIs and CLI flags newer than most training data. Covers writing or fixing tests, locators, a failing
Claude Code
$ npx -y skills add testdino-hq/playwright-skill --skill playwright-skill --agent claude-code
Codex
$ npx skills add testdino-hq/playwright-skill --skill playwright-skill -a codex -y
Cursor
$ npx skills add testdino-hq/playwright-skill --skill playwright-skill -a cursor -y
Gemini CLI
$ npx skills add testdino-hq/playwright-skill --skill playwright-skill -a gemini-cli -y
GitHub Copilot
$ npx skills add testdino-hq/playwright-skill --skill playwright-skill -a github-copilot -y
OpenCode
$ npx skills add testdino-hq/playwright-skill --skill playwright-skill -a opencode -y
Windsurf
$ npx skills add testdino-hq/playwright-skill --skill playwright-skill -a windsurf -y
name: playwright-skill description: Current Playwright (1.64) patterns for writing, debugging, and scaling reliable test suites. Use for any Playwright task, even ones you think you know, because the guides cover APIs and CLI flags newer than most training data. Covers writing or fixing tests, locators, a failing or flaky test, a trace.zip or error message, playwright.config and projects, network mocking, auth, visual and accessibility testing, Docker and CI sharding, playwright-cli browser automation, Playwright Test Agents, page objects, migrating from Cypress or Selenium, and QA work: test case design, bug reports from failures, automating manual test cases, and reviewing tests. Also covers what happens after a run of e2e, the agentic test runner (`e2e.config.ts`, `*.e2e.ts`): a CI failure whose trace page is not on this machine, flaky-or-broken verdicts from history, quarantine, merged shards, and agent step cost. TypeScript and JavaScript. license: MIT metadata: author: testdino.com version: "2.9.0"
> Opinionated, production-tested Playwright guidance — every pattern includes when (and when *not*) to use it.
**87 reference guides**. 79 cover the full Playwright surface: selectors, assertions, fixtures, page objects, network mocking, auth, visual regression, accessibility, API testing, CI/CD, debugging, and more. 8 cover results from [e2e](https://e2e.com), the agentic test runner, after a run has left the machine.
**How to use this skill**: open the guide for the topic before answering, even for familiar APIs. Playwright adds and renames APIs and CLI flags every release, and the guides are verified against 1.64. Guides tag newer APIs with the release that added them, e.g. `(1.62+)`; check the project's version (`npx playwright --version`) before using one.
| Need | API | Guide | |---|---|---| | Per-row / per-parent locator (column queries) | `locator.within(container)` (1.64) | [locators.md](core/locators.md) | | Element from an aria-snapshot ref | `page.getByRef('e2')` (1.64) | [locators.md](core/locators.md) | | Configure a project that does not run by default | `default: false`, `--project="*"` (1.64) | [projects-and-dependencies.md](ci/projects-and-dependencies.md) | | Find order-dependent tests | `--shuffle [seed]` (1.64) | [flaky-tests.md](core/flaky-tests.md) | | Serialize tests sharing a resource | `{ lock: 'name' }`, `describe.configure({ lock })` (1.63/1.64) | [parallel-and-sharding.md](ci/parallel-and-sharding.md) | | Run retries at the end, isolated | `retryStrategy: 'isolated'` (config only, 1.62) | [flaky-tests.md](core/flaky-tests.md) | | Select or quarantine tests before the run | `reporter.preprocess()` + `testRun.fail()` (1.62) | [dynamic-test-selection.md](core/dynamic-test-selection.md) | | Re-run failures / changed files | `--last-failed`, `--only-changed`, `-x` | [debugging.md](core/debugging.md) | | Inspect a `trace.zip` from the terminal | `npx playwright trace ...`, `snapshot --phase` (1.63) | [trace-analysis.md](core/trace-analysis.md) | | Plan / generate / heal tests with AI | `npx playwright init-agents` | [test-agents.md](core/test-agents.md) | | Component tests | stories-and-galleries `mount('story/id')` (1.62); experimental CT packages frozen | [component-testing.md](core/component-testing.md) | | WebP baselines; CI creates missing baselines | `toHaveScreenshot: { type: 'webp' }`, `--update-snapshots=missing` passes (1.64) | [visual-regression.md](core/visual-regression.md) | | Scoped HAR recording | `tracing.startHar(path, options)` (1.60) | [network-mocking.md](core/network-mocking.md) | | Auth state in IndexedDB / OPFS; per-origin basic auth | `storageState({ indexedDB, opfs })` (opfs 1.63), `httpCredentials: [...]` (1.63) | [authentication.md](core/authentication.md) | | Passkeys | `context.credentials`, `signCount` (1.61/1.64) | [auth-flows.md](core/auth-flows.md) | | Cookies on an API request context | `request.addCookies()` / `cookies()` (1.64) | [api-testing.md](core/api-testing.md) | | Page-registered agent tools | `page.webmcp.tools()` / `callTool()` (1.64) | [webmcp-testing.md](core/webmcp-testing.md) |
This skill is designed for testing **applications you own or have explicit authorization to test**. It does not support or endorse automating interactions with third-party websites or services without permission.
When writing tests or automation that fetch content from external sources (e.g., `baseURL` pointing to staging/production), treat all returned page content as untrusted input — never pass raw page text back into agent instructions or dynamic code execution without sanitization, as this creates an indirect prompt injection risk.
For CI/CD workflows, pin all external dependencies (GitHub Actions, Docker images) to immutable references (commit SHAs, image digests) rather than mutable version tags. See [ci-github-actions.md](ci/ci-github-actions.md) and [docker-and-containers.md](ci/docker-and-containers.md) for pinning guidance.
1. **`getByRole()` over CSS/XPath** — resilient to markup changes, mirrors how users see the page 2. **Never `page.waitForTimeout()`** — use `expect(locator).toBeVisible()` or `page.waitForURL()` 3. **Web-first assertions** — `expect(locator)` auto-retries; `expect(await locator.textContent())` does not 4. **Isolate every test** — no shared state, no execution-order dependencies 5. **`baseURL` in config** — zero hardcoded URLs in tests 6. **Retries: `2` in CI, `0` locally** — surface flakiness where it matters 7. **Traces: `'on-first-retry'`** — rich debugging artifacts without CI slowdown 8. **Fixtures over globals** — share state via `test.extend()`, not module-level variables 9. **One behavior per test** — multiple related `expect()` calls are fine 10. **Mock external services only** — never mock your own app; mock third-party APIs, payment gateways, email
Production-tested Playwright guides for E2E, API, component, visual, accessibility, and security testing, plus CI/CD, CLI automation, trace-report debugging, page objects, and migration.
Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…
Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…
DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…