# Playwright E2E Production Pack

> Eight agent skills and two scripts so your AI agent writes Playwright suites that stay green: locators, auth, fixtures, mocking, flakes, CI, visual, a11y.

Playwright E2E Production Pack is a paid AI agent skill on Agensi by Abdalkader Alhamoud, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $24 (one-time purchase)
- Creator: [Abdalkader Alhamoud](https://www.agensi.io/creators/abdalkaderdev)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.0
- Last updated: 2026-10-13
- Security: scan passed (2026-10-13); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/playwright-e2e-production-pack
- Tags: testing, devops, web-design, playwright, e2e, end-to-end-testing, test-automation, flaky-tests

## About this skill

Agents write Playwright tests that pass once. They get production wrong: `waitForTimeout(1000)` after a login click, `expect(await locator.count()).toBe(3)` that reads the table before it renders, an `expect(...).toHaveText()` without `await` that can never fail, `.first().click()` to silence a strict mode violation (and cancel the wrong order), a UI login in every `beforeEach`, parallel tests fighting over one account, `page.route('**/api/orders')` that silently misses `/api/orders?page=2`, HAR files committed with a live session cookie inside, retries that hide the same flaky tests for months, four shards with four separate reports, screenshot baselines from a laptop that fail on every CI run, and axe scans of a page whose dialog was never opened.

This pack gives the agent current rules, checked against the `@playwright/test` 1.64 type definitions, CLI help and docs source, and run in a real Playwright 1.64 suite:

- **playwright-e2e-production**: routing, pre-flight checklist, current versions, what changed from 1.57 to 1.64.
- **playwright-locators**: role, label and test-id locators, `filter`, `within()`, `visible()`, frames, shadow DOM, retrying assertions, `expect.poll`, `toPass`, aria snapshots.
- **playwright-auth-state**: setup projects, storageState, API login, roles, one account per worker, IndexedDB and sessionStorage tokens, passkeys, test locks.
- **playwright-fixtures**: test and worker fixtures, auto fixtures as global hooks, per-project options and the array-option trap, page objects, data fixtures that clean up, custom matchers that handle `.not`.
- **playwright-network-mocking**: fulfill, fetch-and-patch, error states, URL matching rules, handler order, HAR record and replay, WebSocket mocks, service workers, the clock API.
- **playwright-flake-triage**: trace modes and the trace CLI, retries, `retryStrategy: 'isolated'`, `failOnFlakyTests`, `--repeat-each`, `--shuffle`, a root-cause catalogue with the real error texts.
- **playwright-ci-sharding**: CI config, shard balancing, blob reports merged into HTML, JSON and annotations, GitHub Actions with current action versions, Docker image, GitLab.
- **playwright-visual-a11y**: screenshot baselines in the CI image, masks, thresholds, WebP, update modes; axe with WCAG 2.2 tags, fingerprinted known issues, keyboard and aria assertions, forced-colors emulation.

Two zero-dependency Node scripts: `lint-playwright-specs.mjs` flags sleeps, one-shot and unawaited assertions, unawaited actions, ElementHandles, selector-based page methods, `networkidle`, force and positional clicks, XPath and structural CSS; `triage-report.mjs` reads JSON reports from one or many runs (including merged shards and `--repeat-each`), groups attempts per test, labels each failure with a likely cause and fix, and lists the traces to open.

Works with Claude Code (skills folder or plugin), Codex, Gemini CLI and Cursor. Plain Agent Skills format.

Versions: `@playwright/test` 1.64 (Node 20+), Docker image `v1.64.0-noble`, `@axe-core/playwright` 4.13, GitHub Actions `checkout@v7` / `setup-node@v7` / `upload-artifact@v7` / `download-artifact@v8`. Reviewed after every Playwright minor release.

## Requires

- Playwright
- Node.js
- tsc

## Known limitations

Scripts need Node.js 20+. Targets @playwright/test 1.64.0. The lab suite ran on Chromium only; Firefox and WebKit notes come from the release notes. The CI workflows pass actionlint but were not run on GitHub or GitLab. Passkey, OPFS and service-worker routing notes come from the docs and type definitions.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Playwright E2E Production Pack skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Why not just ask my agent?

Agents write Playwright tests that pass once and flake later: fixed sleeps, assertions that read a value once, networkidle, positional clicks. The pack gives current 1.64 patterns that were run in a real suite, a spec linter that catches those mistakes, and a triage script that reads your reports and names the likely cause of each flake.

### Which version?

@playwright/test 1.64.0 (Node 20+), with the matching Docker image mcr.microsoft.com/playwright:v1.64.0-noble and @axe-core/playwright 4.13.0.

### What is in the zip?

One entry skill with seven guides (locators, auth state, fixtures, network mocking, flake triage, CI sharding, visual and accessibility) and two zero-dependency Node scripts: lint-playwright-specs.mjs and triage-report.mjs.

### Does it cover CI?

Yes. GitHub Actions and GitLab sharding, merge-reports into HTML, JSON and annotations, and running the setup project once per shard.

### Why do my screenshots differ on CI?

Fonts and rendering differ by OS. The visual guide shows generating baselines in the Playwright Docker image; in testing, a Windows render differed from the Linux baseline by 822 pixels.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
