playwright-skill

playwright-skill is a skill for Claude Code, Codex from willnie9/agent-skills. It costs 124 tokens per session (2,438 once invoked), scanned B, original, MIT.

A project-specific guide for controlling a website through a browser tool. It supplies the site address, login details and interaction instructions, while the agent performs actions such as opening pages, clicking elements and taking screenshots.

In plain words
What is it for?
Opening and inspecting pages, signing in when required, clicking through a site, taking screenshots and checking whether a bug fix works in the browser.
Why use it?
It avoids hard-coding one project's URLs, login fields and other settings into browser tasks. It also keeps browser actions separate from test files and test-running tools.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Opening and inspecting pages, signing in when required, clicking through a site…

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/willnie9/agent-skills/playwright-skill.svg)](https://agentmods.dev/skills/willnie9/agent-skills/playwright-skill)
Your own site
<a href="https://agentmods.dev/skills/willnie9/agent-skills/playwright-skill"><img src="https://agentmods.dev/badge/skills/willnie9/agent-skills/playwright-skill.svg" alt="Measured on agentmods" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,438 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00124 $0.02438
Opus 5 $0.00062 $0.01219
Sonnet 5 $0.00025 $0.00488
Haiku 4.5 $0.00012 $0.00244

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

Security

Grade B, and why

playwright-skill scanned grade B 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.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 .claude/skills/playwright-skill/config/credentials.local.json
playwright-skill/SKILL.md · 204 lines

How it starts

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

Playwright Skill · MCP-first 浏览器操作 playbook

0. 设计转向(v8 vs v7)

v7 是个完整的 Playwright test runner(flows/ playwright.config.ts package.json node_modules),写 spec 文件、跑 npx playwright test、拿 exit code。

v8 砍掉这一切。skill 只剩两样:

  • config/ — 项目适配层(baseURL / 登录 selector / 凭证)
  • SKILL.md — 给 Claude 看的操作 playbook

实际开浏览器是用 MCP playwright 工具(mcp__playwright__browser_*),由对话里的 Claude 边看 browser_snapshot 边操作。截图落 runtime/screenshots/

1. 铁律(读到必须执行)

  1. 不写 spec 文件,不跑 playwright test。需要操作浏览器一律用 MCP browser_* 工具。
  2. 所有项目相关参数从 config/playwright-skill.config.json,不写死 localhost:5173 / /login / 欢迎回来 等。
  3. 登录开关:auth.required=true 才走登录;false 时跳过登录直接进站。
  4. 登录优先级:
    • browser_navigateruntime.baseURL + auth.selectors.loginPagePathruntime.homePath,
    • browser_snapshot 看当前 URL / DOM,命中 runtime.loginUrlPatterns 任一项 → 登录页。
    • 是登录页就读 config/credentials.local.json 填账号密码,按 selectors.submit 点登录,处理 orgSelectDialog,等 successCheck.text 出现。
  5. MCP 操作优先用 ref(snapshot 里的元素引用),而不是 selector。selector 是 fallback。
  6. 截图只能写 runtime/screenshots/,通过 browser_take_screenshotfilename 参数指定。
  7. 凭证文件 config/credentials.local.json 随项目一起提交,字段 {username, password}
  8. 不修改项目根的任何文件(tests/ package.json 等本 skill 都不碰)。

2. 目录结构

.claude/skills/playwright-skill/
├── SKILL.md                                       本文件
│
├── config/                                        项目适配层
│   ├── playwright-skill.config.schema.json          配置合同
│   ├── playwright-skill.config.example.json         示例(commit)
│   ├── playwright-skill.config.json                 实际生效(随项目 commit,首跑从 example 复制)
│   ├── credentials.local.example.json               凭证示例(commit)
│   └── credentials.local.json                       实际凭证(随项目 commit)
│
└── runtime/                                       ⚠️ gitignore — 临时产物
    └── screenshots/                                 MCP 截图落这

lib/、无 flows/、无 playwright.config.ts、无 node_modules、无 package.json

Read the full file on GitHub · 204 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. 6d ago First seen · 204 lines · 124 tokens per session scan B 05be95db4bf8

Subscribe to this mod's changes

playwright-skill is a skill published in the GitHub repository willnie9/agent-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 124 tokens to every session and 2,438 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). 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

hive.browser-automation

Required before any hive-browser CLI command. The browser is driven from the terminal by running hive-browser ... --json via terminalexec — not via MCP tools. Teaches the browser lifecycle rules (the bridge attaches to the USER'S running Chrome — never kill or launch browser processes; timeouts are transport issues…

aden-hive/hive · 142 tokens

hive.linkedin-automation

Read before automating LinkedIn with browser tools. LinkedIn combines shadow DOM (#interop-outlet), strict Trusted Types CSP that silently drops innerHTML, Lexical composer, native beforeunload dialogs that hang the bridge, and aggressive spam filters — each has bitten us at least once. Verified flows for profile…

aden-hive/hive · 99 tokens

hive.x-automation

Read before automating X / Twitter with browser tools. Verified flows for post, reply, delete, search-and-engage, plus the Draft.js compose quirks that silently disable the send button. Includes the daily-reply and job-market-reply playbooks. Requires hive.browser-automation for the underlying screenshot + coordinate…

aden-hive/hive · 81 tokens

hive.slack-notifications-setup

Set up a Slack notification channel (Sentinel) for a colony by driving the browser — reuse or create the "Hive Sentinel" Slack app from a JSON manifest, install it, capture the bot + app tokens, create/select the channel via the Slack API, and turn Sentinel on so the colony can ping the user on Slack and accept…

aden-hive/hive · 136 tokens

browser-edge-cases

SOP for debugging browser automation failures on complex websites. Use when browser tools fail on specific sites like LinkedIn, Twitter/X, SPAs, or sites with Shadow DOM.

aden-hive/hive · 40 tokens

defuddle

Plan and, with explicit network consent, use an optional external Defuddle cleaner to extract article-like HTTPS pages as Markdown. Use for defuddle, clean this URL, strip page clutter, readable Markdown from a web page, or preparing a web source for later wiki ingestion.

AgriciDaniel/claude-obsidian · 57 tokens