setup-playwright

A guide for setting up Playwright, a tool that controls web browsers for automated tests. It covers the project-owned test harness, its configuration, browser setup, application startup, and continuous integration wiring.

In plain words
What is it for?
Use it when adding or repairing Playwright dependencies, test configuration, browser or device settings, reusable login state, startup commands, CI checks, or test reports.
Why use it?
It removes the setup work needed before browser tests can run reliably across developers and automated build systems.

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/n-n-code/n-n-code-skills/setup-playwright
Any agent
npx skills add n-n-code/n-n-code-skills --skill setup-playwright
Clone the repo
git clone --depth 1 https://github.com/n-n-code/n-n-code-skills

Made for: Claude Code, Codex.

Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,437 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.00093 $0.02437
Opus 5 $0.00046 $0.01218
Sonnet 5 $0.00019 $0.00487
Haiku 4.5 $0.00009 $0.00244

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

Security

Grade A, and why

setup-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.

.agents/skills/setup-playwright/SKILL.md · 217 lines

How it starts

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

Setup Playwright

Build the smallest reliable repo-owned Playwright setup that fits the repository's language, package boundaries, test runner, developer-tool, and CI conventions.

This is a system skill: it leaves behind a repo-owned harness or an explicitly requested Playwright developer-tool artifact. Day-to-day test authoring and live browser investigation belong to playwright-testing.

Ownership Boundary

Use this skill when the main artifact is one or more of:

  • Playwright dependencies or browser binaries
  • runner config, package placement, or monorepo wiring
  • app startup through webServer or an ecosystem-native equivalent
  • browser, device, environment, retry, reporter, or artifact configuration
  • reusable-auth setup and ignored state files
  • a minimal smoke check that proves the harness works
  • CI install, smoke, sharding, or report-merge plumbing
  • an explicitly requested repo-owned @playwright/cli developer dependency or script
  • host-targeted Playwright Test Agent definitions for a compatible Node Playwright Test harness

Use playwright-testing when the harness works and the task is a spec, test review, flake diagnosis, locator change, mock decision, visual check, or standalone playwright-cli investigation. If an environment-dependent install, startup, container, or CI failure has no established cause, start with project-platform-diagnose and return here once the repair is known.

Choose The Existing Ecosystem

Follow the strongest repository signal:

  • Node/TypeScript/JavaScript: @playwright/test unless another runner is already intentional.
  • Python with pytest: the official Playwright Pytest plugin and pytest-native fixtures/config.
  • .NET: the repo's MSTest, NUnit, xUnit, or xUnit v3 project and Playwright .NET integration.
  • Java: the repo's JUnit or TestNG module with its Maven or Gradle build.

Do not create a Node sidecar in a Python, .NET, or Java repo merely because its examples are more familiar. Load references/ecosystem-patterns.md before editing a non-Node harness.

Read the full file on GitHub · 217 lines

Files

What ships with it

5 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. 2d ago First seen · 217 lines · 93 tokens per session scan A 6c69111b6352

Subscribe to this mod's changes

setup-playwright is a skill published in the GitHub repository n-n-code/n-n-code-skills (4 stars, last pushed 4d ago), licensed MIT. It adds 93 tokens to every session and 2,437 once invoked, about $0.0005 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

pentest-web-app-attacker

Assess web applications against OWASP WSTG and OWASP Top 10 with reproducible evidence capture.

0x-Professor/Agent-Skills-Hub · 28 tokens

ai-agent-browser

业务诊断助手适合市场营销、运营、产品、销售在用户提出“这件事该怎么做”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成摘要、诊断结论、行动建议和可复用交付物。.

skillsaiagent/aiskills · 71 tokens

ai-browser-use

业务诊断助手适合市场营销、运营、产品、销售在用户提出“这件事该怎么做”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成摘要、诊断结论、行动建议和可复用交付物。.

skillsaiagent/aiskills · 71 tokens

prometheus

Prometheus monitoring — scrape configuration, service discovery, recording rules, alert rules, and production deployment for infrastructure and application metrics.

wpank/ai · 28 tokens

agent-browser

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

vercel-labs/open-agents · 51 tokens

browser-recording

Record a browser flow as a video/GIF for evidence — animations, transitions, and multi-step interactions that a still screenshot cannot prove. Drives the project's own Playwright through a bundled runner, then converts to mp4 + GIF via ffmpeg. Use when the user asks to record a demo, capture a GIF or video of the UI…

kirodotdev/KiroCrew · 85 tokens