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.
npx skills add willnie9/agent-skills --skill playwright-skillgit clone --depth 1 https://github.com/willnie9/agent-skillsWrote 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.
[](https://agentmods.dev/skills/willnie9/agent-skills/playwright-skill)<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>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.
| Model | Per session | Once 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 |
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 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. 铁律(读到必须执行)
- 不写 spec 文件,不跑
playwright test。需要操作浏览器一律用 MCPbrowser_*工具。 - 所有项目相关参数从
config/playwright-skill.config.json读,不写死localhost:5173//login/欢迎回来等。 - 登录开关:
auth.required=true才走登录;false时跳过登录直接进站。 - 登录优先级:
- 先
browser_navigate到runtime.baseURL + auth.selectors.loginPagePath或runtime.homePath, browser_snapshot看当前 URL / DOM,命中runtime.loginUrlPatterns任一项 → 登录页。- 是登录页就读
config/credentials.local.json填账号密码,按selectors.submit点登录,处理orgSelectDialog,等successCheck.text出现。
- 先
- MCP 操作优先用 ref(snapshot 里的元素引用),而不是 selector。selector 是 fallback。
- 截图只能写
runtime/screenshots/,通过browser_take_screenshot的filename参数指定。 - 凭证文件
config/credentials.local.json随项目一起提交,字段{username, password}。 - 不修改项目根的任何文件(
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。
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.
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.
- 6d ago First seen · 204 lines · 124 tokens per session scan B 05be95db4bf8
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.
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…
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…
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…
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…
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.
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.