playwright-test-runner

playwright-test-runner is a skill for Claude Code from flasherses/claude-code-dotfiles. It costs 187 tokens per session (5,554 once invoked), scanned A, original, MIT.

A workflow for creating and running Playwright browser tests. Playwright is a tool that checks websites or web APIs through automated browser actions and produces test reports.

In plain words
What is it for?
Use it when you have test-case documentation and a finished feature, to generate Playwright test files, run them, create a report, and complete the verification checklist.
Why use it?
It connects test cases with executable browser checks, so a completed feature can be verified and the results documented.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-code-dotfiles plugin — 3 skills, 4 commands, 5 agents, 1 plugin shipped together

Good fit Use it when you have test-case documentation and a finished feature, to generate Playwright test files, run them, create a report, and complete the verification checklist.

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

Made for: Claude Code.

Or install claude-code-dotfiles, the plugin that ships this one along with the rest of its 3 skills, 4 commands, 5 agents, 1 plugin.

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-test-runner

README.md
[![agentmods](https://agentmods.dev/badge/skills/flasherses/claude-code-dotfiles/playwright-test-runner/github.svg)](https://agentmods.dev/skills/flasherses/claude-code-dotfiles/playwright-test-runner)
Your own site
<a href="https://agentmods.dev/skills/flasherses/claude-code-dotfiles/playwright-test-runner"><img src="https://agentmods.dev/badge/skills/flasherses/claude-code-dotfiles/playwright-test-runner/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-test-runner

Your own site · 80×15
<a href="https://agentmods.dev/skills/flasherses/claude-code-dotfiles/playwright-test-runner"><img src="https://agentmods.dev/badge/skills/flasherses/claude-code-dotfiles/playwright-test-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 187 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,554 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00187 $0.05554
Opus 5.5 $0.00075 $0.02222
Sonnet 5.5 $0.00037 $0.01111
Haiku 4.5 $0.00019 $0.00555

Measured 2mo ago against content hash 2b9dab62b77f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 2mo 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}
skills/playwright-test-runner/SKILL.md · 471 lines

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

前置条件

  1. 项目已有 @playwright/test 依赖 + playwright.config.ts
  2. 存在测试用例文档(test-case-writer 产出,或用户提供)
  3. 被测功能已开发完成(至少页面/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。

Read the full file on GitHub · 471 lines

Files

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.

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. 2mo ago First seen · 471 lines · 187 tokens per session scan A 2b9dab62b77f

Subscribe to this mod's changes

playwright-test-runner is a skill published in the GitHub repository flasherses/claude-code-dotfiles (6 stars, last pushed 3mo ago), licensed MIT. It adds 187 tokens to every session and 5,554 once invoked, about $0.0007 per session on Opus 5.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.

Related

playwright-test-runner compared with skills from other repositories

playwright-test-runner next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
playwright-test-runnerflasherses/claude-code-dotfilesSkill63mo agoMITA187Claude Code
cua-driverdavidondrej/skillsSkill4.3ktodayMITA68Claude Code, Codex
create-verification-skillget-bb/bbSkill5.3ktodayMITA57Claude Code, Codex
browser-qahashgraph-online/awesome-codex-pluginsSkill1.6kyesterdayApache-2.0A58Claude Code, Codex
webapp-testinganthropics/skillsSkill192k5d agononeA35Claude Code
test-electron-appPostHog/posthog-fossSkill730todayMITA112Claude Code
smoke-testSkyvern-AI/skyvernSkill23ktodayAGPL-3.0A50Claude Code, Codex