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, taking screenshots and checking whether a bug fix works in the browser.

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/github.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/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-skill

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00050 $0.00975
Sonnet 5.5 $0.00025 $0.00488
Haiku 4.5 $0.00012 $0.00244

Measured 3mo ago against content hash 05be95db4bf8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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_navigate 到 runtime.baseURL + auth.selectors.loginPagePath 或 runtime.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_screenshot 的 filename 参数指定。
  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. 3mo 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 14d ago), licensed MIT. It adds 124 tokens to every session and 2,438 once invoked, about $0.0005 per session on Opus 5.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

playwright-skill compared with skills from other repositories

playwright-skill next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
playwright-skillwillnie9/agent-skillsSkill214d agoMITB124Claude Code, Codex
agent-browserpaperclipai/paperclipSkill119ktodayMITA40Claude Code, Codex
defuddleAgriciDaniel/claude-obsidianSkill17ktodayMITA61Claude Code
hive.browser-automationaden-hive/hiveSkill11k4d agoApache-2.0A142Claude Code, Codex
hive.linkedin-automationaden-hive/hiveSkill11k4d agoApache-2.0A99Claude Code, Codex
hive.x-automationaden-hive/hiveSkill11k4d agoApache-2.0A81Claude Code, Codex
hive.slack-notifications-setupaden-hive/hiveSkill11k4d agoApache-2.0A136Claude Code, Codex