playwright

playwright is a skill for Claude Code, Codex from magnus919/agent-skills. It costs 148 tokens per session (2,939 once invoked), scanned C, original, MIT.

A browser automation toolkit for Playwright, a tool that controls real web browsers. It helps write end-to-end tests, browse websites without a visible window, collect data, and check basic accessibility.

In plain words
What is it for?
Use it to create and debug full user-flow tests, mock network responses, scrape web pages, run browser tests in parallel, and perform accessibility snapshot checks.
Why use it?
It removes repetitive browser work and makes tests less fragile when a website's internal structure changes. It also provides a repeatable way to test websites in continuous integration, where checks run automatically on code changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create and debug full user-flow tests, mock network responses, scrape web pages, run browser tests in parallel, and perform accessibility snapshot checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/playwright
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 magnus919/agent-skills --skill playwright
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin playwright/plugin install playwright after adding the marketplace above.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/magnus919/agent-skills/playwright/github.svg)](https://agentmods.dev/skills/magnus919/agent-skills/playwright)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/playwright"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/playwright/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

Your own site · 80×15
<a href="https://agentmods.dev/skills/magnus919/agent-skills/playwright"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/playwright.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 148 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,939 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00148 $0.02939
Opus 5 $0.00074 $0.01470
Sonnet 5 $0.00030 $0.00588
Haiku 4.5 $0.00015 $0.00294

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

Security

Grade C, and why

playwright scanned grade C with 1 finding 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 6d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (templates/accessibility.spec.ts, templates/example.spec.ts, templates/playwright.config.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

- Never scrape in violation of robots.txt, terms, or rate limits; never harvest credentials or personal data, and never extract auth/session storage into committed files.
playwright/SKILL.md · 158 lines

How it starts

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

Playwright Browser Automation

Use this skill to drive a real browser with Playwright: author end-to-end tests, keep selectors and tests robust, intercept and mock network traffic, run suites across parallel workers and in CI, scrape and extract data in headless mode, and check accessibility with snapshot scans. This is a tool skill for one named tool. Test strategy and framework selection belong to qa-methodology; frontend component and architecture design belong to frontend-engineering. This skill owns operating the Playwright tool itself.

Operating contract

  1. Read the suite before running. Inspect playwright.config.*, projects, baseURL, webServer, workers, retries, and reporters before running anything. Never assume the test command from the README.
  2. Locate by behavior, not layout. Prefer user-facing locators (getByRole, getByLabel, getByText) over CSS/XPath that encode markup. Tests coupled to user-visible behavior survive refactors; tests coupled to structure break on them.
  3. Mock at the boundary. Stub external HTTP at page.route() — never by patching in-page code. Mock the dependency under test's edges, never the code under test itself; a test that mocks what it claims to verify proves nothing.
  4. Parallelize deliberately. Playwright gives every test an isolated browser context. Tune workers and sharding to the machine and suite, and never let tests share mutable state through globals.
  5. Verify at the boundary. A green test is only as strong as its assertions. Assert on user-visible outcomes (visible text, URL, enabled/disabled state), not on implementation details.
  6. Keep evidence bounded. Capture traces, screenshots, and video on failure only; summarize JSON reports instead of dumping them; never paste full HTML dumps or session cookies into chat.

The pwrun script

scripts/pwrun is an agent-first smoke harness around a Playwright suite. doctor, inventory, and report work with no node or Playwright installed, so an agent can inspect a suite and triage a CI report anywhere.

Read the full file on GitHub · 158 lines

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. 6d ago First seen · 158 lines · 148 tokens per session scan C 7997f2c85777

Subscribe to this mod's changes

playwright is a skill published in the GitHub repository magnus919/agent-skills (76 stars, last pushed today), licensed MIT. It adds 148 tokens to every session and 2,939 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.