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 agentmods add skills/flasherses/claude-code-dotfiles/playwright-test-runnernpx skills add flasherses/claude-code-dotfiles --skill playwright-test-runnergit clone --depth 1 https://github.com/flasherses/claude-code-dotfilesWhat 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 | $0.00187 | $0.05554 |
| Opus 5 | $0.00093 | $0.02777 |
| Sonnet 5 | $0.00037 | $0.01111 |
| Haiku 4.5 | $0.00019 | $0.00555 |
Grade A, and why
playwright-test-runner scanned grade A 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 3d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s -o /dev/null -w "%{http_code}" {baseURL} How it starts
The opening of the file, as written. The whole thing — 471 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Playwright Test Runner
做什么:读取 test-case-writer 产出的用例文档,自动生成 Playwright 可执行 spec、运行测试、产出报告、执行闸门检查、回填自测清单。
为什么:研发不需要知道 test-case-writer、Playwright MCP、playwright-test-runner 三个东西怎么配合。说一句话(/test 驳回功能),AI 走完:出用例→出清单→出脚本→执行→报告→闸门→提测决策。
要不要做:先判断。项目没有 @playwright/test→引导 npm init playwright。只有用例文档但没开发完→只生成 spec 骨架。没有用例文档→提示先跑 test-case-writer。只需要跑已有测试→直接 npx playwright test,不需要本 skill。
适用判断
用户要做什么?
├─ 已有用例文档 + 开发完成 → 本 skill(生成 spec → 跑测试 → 出报告)
├─ 只有用例文档,还没开发 → 提示先开发,只生成 spec 骨架
├─ 没有用例文档 → 提示先运行 test-case-writer
├─ 只需要设计用例 → 不是本 skill,用 test-case-writer
└─ 只需要跑已有测试 → 不是本 skill,直接 npx playwright test
前置条件
- 项目已有
@playwright/test依赖 +playwright.config.ts - 存在测试用例文档(test-case-writer 产出,或用户提供)
- 被测功能已开发完成(至少页面/API 可达)
如果项目还没有 Playwright → 引导用户执行 npm init playwright。
完整流程
用户: "用 Playwright 验证一下" / "跑端到端测试"
↓
Step 0: 项目探测 → 读取 config / 嗅探 UI 框架 / 扫描已有 spec → 汇报
↓
Step 1: 确认范围 → 找用例文档 → 分拣 UI/API/Skip → 等用户确认
↓
Step 2: 生成 .spec.ts → 按项目风格 + UI 框架策略 → 自检
↓
Step 3: 执行测试 → 检查环境 → npx playwright test → 等待结果
↓
Step 4: 报告+研发自测闸门 → 解析结果 → Markdown 报告 + 三闸门 + 回填自测清单
↓
完成
Step 0: 项目探测(全自动)
探测 Playwright 项目的配置和使用模式。不假设任何默认值,全部从代码中读取。
0.1 检查 Playwright 依赖
检查 package.json → devDependencies 中是否有 @playwright/test
├─ 有 → 提取版本号,继续
└─ 无 → "这不是 Playwright 项目。要初始化吗?(npm init playwright)"
0.2 读取 playwright.config.ts
解析配置,提取以下字段(如有):
{
testDir, // spec 文件目录,默认 './tests'
testMatch, // 文件匹配模式,默认 '**/*.spec.ts'
baseURL, // use.baseURL
projects, // 浏览器列表
timeout, // 全局超时
reporter, // 报告器配置
use: {
screenshot, // 'on' | 'off' | 'on-first-retry'
video, // 'on' | 'off' | 'retain-on-failure'
storageState, // 全局 auth 状态文件
actionTimeout, // 操作超时
},
globalSetup, // 全局 setup 脚本
}
0.3 嗅探 UI 框架
从 package.json → dependencies 匹配已知框架。详见 references/ui-framework-adapters.md。
What ships with it
4 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.
- 3d ago First seen · 471 lines · 187 tokens per session scan A 2b9dab62b77f
playwright-test-runner is a skill published in the GitHub repository flasherses/claude-code-dotfiles (5 stars, last pushed 23d ago), licensed MIT. It adds 187 tokens to every session and 5,554 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
use-agent-browser-for-airi
Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…
e2e-deployment-skill
Use this deployment skill to verify shared skills load during Playwright startup.
launch
Launch Code OSS (VS Code from sources) into an isolated throwaway profile with unique debug ports so you can drive it with @playwright/cli AND attach a Node debugger via dap-cli in the same session. Use when working on VS Code itself and you want to interact with the running workbench, automate chat or UI flows, test…
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
actionbook-web-test
Run browser-based web tests against websites using Actionbook CLI. Activate when the user wants to test a website workflow, run smoke tests, verify a user flow, check if a web application works, run regression tests, or validate browser-based interactions. Supports test definition, execution, assertion, reporting, and…
web-preview
Flutter Web版をビルド → サーバー起動 → Playwright でアクセス確認 → URLをユーザーに案内する。.