playwright-automation

playwright-automation is a skill for Claude Code, Codex from petrkindlmann/qa-skills. It costs 182 tokens per session (5,409 once invoked), scanned A, original, MIT.

A guide for writing browser tests with Playwright, a tool that automates real user actions in web browsers, using TypeScript. It covers reusable page structures, test setup, browser coverage, and running tests in CI.

In plain words
What is it for?
Use it to create or migrate end-to-end tests, organize page objects and fixtures, test Chromium, Firefox, and WebKit, and run suites in parallel or across CI workers.
Why use it?
Browser tests often become fragile when they depend on page structure, fixed delays, or poorly isolated setup. This helps make tests wait for meaningful conditions and use locators based on what users see.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions OpenCode.

Good fit Use it to create or migrate end-to-end tests, organize page objects and fixtures, test Chromium, Firefox, and WebKit, and run suites in parallel or across CI workers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/petrkindlmann/qa-skills/playwright-automation
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add petrkindlmann/qa-skills --skill playwright-automation
Clone the repo
git clone --depth 1 https://github.com/petrkindlmann/qa-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for playwright-automation

README.md
[![agentmods](https://agentmods.dev/badge/skills/petrkindlmann/qa-skills/playwright-automation/github.svg)](https://agentmods.dev/skills/petrkindlmann/qa-skills/playwright-automation)
Your own site
<a href="https://agentmods.dev/skills/petrkindlmann/qa-skills/playwright-automation"><img src="https://agentmods.dev/badge/skills/petrkindlmann/qa-skills/playwright-automation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for playwright-automation

Your own site · 80×15
<a href="https://agentmods.dev/skills/petrkindlmann/qa-skills/playwright-automation"><img src="https://agentmods.dev/badge/skills/petrkindlmann/qa-skills/playwright-automation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 182 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,409 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 23 May 2026
  • Snyk pass 23 May 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00182 $0.05409
Opus 5 $0.00091 $0.02704
Sonnet 5 $0.00036 $0.01082
Haiku 4.5 $0.00018 $0.00541

Measured 11d ago against content hash f2ece1d2ab09, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

playwright-automation scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/playwright-automation/SKILL.md · 461 lines

How it starts

The opening of the file, as written. The whole thing — 461 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Discovery Questions

Check .agents/qa-project-context.md first — if it exists, use it and skip any question answered there. Then ask only what's missing:

  1. TypeScript or JavaScript? TypeScript is strongly recommended — it catches locator and assertion mistakes at compile time, and every example here assumes it.
  2. Which browsers? Chromium for local dev; add Firefox and WebKit in CI. Mobile viewports are separate Playwright projects, not separate test files — they change the device descriptor.
  3. Existing suite or fresh start? Migrating from Cypress/Selenium, rewrite the flakiest tests first; never big-bang. Changes the sequencing entirely.
  4. Single site or multi-site? Multi-site needs shared fixtures and per-site config objects — see references/multi-site-architecture.md.

Core Principles

  1. User-facing locators first. getByRole > getByLabel > getByTestId > CSS (last resort). Locators must reflect what the user sees, not how the DOM is structured. See references/selector-strategies.md.
  2. Auto-waiting — NEVER use waitForTimeout. Every Playwright action and web-first assertion auto-waits. If you think you need a timeout, you need a better locator or assertion.
  3. Test isolation. Each test gets a fresh BrowserContext. Tests must never depend on other tests' state or execution order.
  4. Parallel by default, serial only when necessary. Use fullyParallel: true. Reserve test.describe.serial for flows that genuinely cannot be isolated (rare).
  5. Fixtures for setup, not hooks. Fixtures compose, provide type safety, and tear down automatically. Prefer them over beforeEach/afterEach for anything non-trivial. See references/fixtures-and-projects.md.

Read the full file on GitHub · 461 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 461 lines · 182 tokens per session scan A f2ece1d2ab09

Subscribe to this mod's changes

playwright-automation is a skill published in the GitHub repository petrkindlmann/qa-skills (118 stars, last pushed 3mo ago), licensed MIT. It adds 182 tokens to every session and 5,409 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

Console Error Hunter

Systematically detect, capture, and categorize browser console errors, warnings, and unhandled exceptions during automated test execution.

PramodDutta/qaskills · 26 tokens

playwright-e2e

Comprehensive end-to-end testing skill using Playwright for web applications, covering page objects, selectors, assertions, waits, fixtures, and test organization.

PramodDutta/qaskills · 36 tokens

Geb Testing

Browser automation testing with Geb framework for Groovy/JVM using jQuery-like content DSL, Page Object pattern, Spock integration, and WebDriver abstraction.

PramodDutta/qaskills · 34 tokens

e2e-testing-claude-code

Make Claude Code write and maintain end-to-end tests like a senior SDET — Playwright and Cypress flows with stable locators, the Page Object Model, fixtures, reused auth state, network mocking, and flake-free CI. Claude Code E2E testing, done right.

PramodDutta/qaskills · 65 tokens

Browser Agent QA Testing

Teach agents to use AI browser agents for exploratory and smoke QA with step budgets, evidence-based assertions, guardrails, and Playwright conversion.

PramodDutta/qaskills · 33 tokens

playwright-execute

Run Playwright tests or suites and upload the resulting report to Katalon True Platform. Use when you need to execute Playwright scripts, package scripts, spec files, projects, or suites, configure or verify @katalon/playwright-reporter, upload Playwright reports with Katalon CLI/reporter commands, and verify uploaded…

katalon-labs/true-skills · 122 tokens