playwright

A set of instructions for controlling a real web browser to inspect pages, click elements, fill forms, take screenshots, and compare rendered results.

In plain words
What is it for?
Use it for browser-based testing, visual checks, form entry, page interaction, screenshot comparisons, and debugging live pages. It is not intended for writing test code.
Why use it?
It provides a repeatable way to check what a website actually displays and how it behaves, rather than relying only on source code.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/stuartshields/claude-setup/playwright
Any agent
npx skills add stuartshields/claude-setup --skill playwright
Clone the repo
git clone --depth 1 https://github.com/stuartshields/claude-setup

Made for: Claude Code, Codex.

Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,114 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.01114
Opus 5 $0.00013 $0.00557
Sonnet 5 $0.00005 $0.00223
Haiku 4.5 $0.00003 $0.00111

Measured 2d ago against content hash 0dc235cce5aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

playwright 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 2d 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/SKILL.md · 81 lines

How it starts

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

Skill: playwright

When to Use

Use this skill for browser automation tasks: visual testing, page interaction, form filling, screenshot comparison, and debugging rendered pages. Invoke with /playwright [URL] to navigate to a specific page, or /playwright to start without a URL.

Use $ARGUMENTS as the URL to navigate to. If empty, ask the user what page to work with.

Do NOT use this skill for writing test files or test code. This is for live browser interaction via MCP tools.

Snapshot First, Screenshot Second

The Playwright MCP provides two ways to see page state. Use the right one:

  • browser_snapshot - Returns the accessibility tree. Use this for planning actions, finding interactive elements, and understanding page structure. Fast, deterministic, token-efficient. Always start here.
  • browser_take_screenshot - Returns a visual image. Use this for visual verification, layout debugging, comparing against Figma designs, and documentation. You cannot perform actions based on screenshots alone. Use browser_snapshot for that.

Default workflow:

  1. browser_snapshot to understand what's on the page
  2. Perform actions (browser_click, browser_type, browser_fill_form, etc.)
  3. browser_snapshot again to verify the action worked
  4. browser_take_screenshot only when visual verification is needed

Visual Verification with Figma

When comparing implementation against Figma designs:

  1. Call get_screenshot from the Figma MCP for the design reference
  2. Navigate to the implementation with browser_navigate
  3. Match viewport dimensions to the Figma frame with browser_resize
  4. Call browser_take_screenshot to capture the current state
  5. Compare the two images. If they don't match, identify the specific deltas and fix them
  6. Repeat until visual parity is achieved

Don't declare "looks good" after a single screenshot. Compare carefully. If you can't tell, use browser_evaluate to measure computed styles and compare against the Figma spec values.

Read the full file on GitHub · 81 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. 2d ago First seen · 81 lines · 26 tokens per session scan A 0dc235cce5aa

Subscribe to this mod's changes

playwright is a skill published in the GitHub repository stuartshields/claude-setup (2 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 1,114 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction using playwright-cli. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, extract information from web pages, mock network requests, manage browser…

zebbern/claude-code-guide · 67 tokens

browser-automation

../../../engineering/skills/browser-automation/SKILL.md.

alirezarezvani/claude-skills · 0 tokens

playwright-skill

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, fixtures, POM, network mocking, auth flows, debugging, CI/CD (GitHub Actions, GitLab, CircleCI, Azure, Jenkins), framework recipes (React, Next.js, Vue, Angular), and migration guides from…

zebbern/claude-code-guide · 87 tokens

playwright-core

Battle-tested Playwright patterns for E2E, API, component, visual, accessibility, and security testing. Covers locators, assertions, fixtures, network mocking, auth flows, debugging, and framework recipes for React, Next.js, Vue, and Angular. TypeScript and JavaScript.

zebbern/claude-code-guide · 62 tokens

playwright-pom

Page Object Model patterns for Playwright — when to use POM, how to structure page objects, and when fixtures or helpers are a better fit.

zebbern/claude-code-guide · 35 tokens

playwright-migration

Step-by-step migration guides for moving to Playwright from Cypress or Selenium/WebDriver — command mappings, architecture changes, and incremental adoption strategies.

zebbern/claude-code-guide · 33 tokens