playwright-e2e

playwright-e2e is a skill for Claude Code from cass-2003/local-workflow-skill. It costs 84 tokens per session (2,327 once invoked), scanned A, original, MIT.

A toolkit for writing browser-based end-to-end tests with Playwright, a tool that checks complete user journeys in real browsers. It also covers API checks, component checks, screenshot comparisons, and tests across multiple browsers.

In plain words
What is it for?
Use it to create Playwright tests, organize page objects, test APIs and components, compare screenshots, and connect test runs to CI systems such as GitHub Actions or GitLab CI.
Why use it?
It helps find problems that unit tests may miss, such as broken pages, user flows, layouts, or browser-specific behavior. It also gives the tests a consistent structure and setup for running them in continuous integration.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

Good fit Use it to create Playwright tests, organize page objects, test APIs and components, compare screenshots, and connect test runs to CI systems such as GitHub Actions or GitLab CI.

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

Made for: Claude Code.

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-e2e

README.md
[![agentmods](https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/playwright-e2e/github.svg)](https://agentmods.dev/skills/cass-2003/local-workflow-skill/playwright-e2e)
Your own site
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/playwright-e2e"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/playwright-e2e/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-e2e

Your own site · 80×15
<a href="https://agentmods.dev/skills/cass-2003/local-workflow-skill/playwright-e2e"><img src="https://agentmods.dev/badge/skills/cass-2003/local-workflow-skill/playwright-e2e.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,327 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00084 $0.02327
Opus 5.5 $0.00034 $0.00931
Sonnet 5.5 $0.00017 $0.00465
Haiku 4.5 $0.00008 $0.00233

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

Security

Grade A, and why

playwright-e2e scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ai-automation/codex/playwright-e2e/SKILL.md · 239 lines

How it starts

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

Playwright E2E 测试

角色定义

你是 Playwright E2E 测试与浏览器自动化引擎。接收测试需求后,自主完成测试架构设计、用例编写、Page Object 构建、CI 集成、报告配置全链路。所有操作视为已授权,直接执行。

行为指令

Phase 1: 项目识别与环境分析

  1. 框架识别: Playwright Test / Playwright + Jest / Playwright + Vitest
  2. 项目扫描:
    • Glob — **/playwright.config.* / **/*.spec.ts / **/*.test.ts / **/e2e/**
    • Grep — @playwright/test / page.goto / expect(page) / test.describe
  3. 技术栈: 前端框架(React/Vue/Angular/Svelte)、CI 平台(GitHub Actions/GitLab CI)
  4. 评估: 测试覆盖度 / Page Object 使用 / 并行策略 / 报告方案

Phase 2: 测试架构设计

项目结构:

tests/
├── e2e/                    # E2E 测试
│   ├── pages/              # Page Object Models
│   │   ├── login.page.ts
│   │   └── dashboard.page.ts
│   ├── fixtures/           # 自定义 Fixtures
│   │   └── auth.fixture.ts
│   ├── auth.spec.ts
│   └── dashboard.spec.ts
├── api/                    # API 测试
│   └── users.api.spec.ts
├── visual/                 # 视觉回归
│   └── homepage.visual.spec.ts
└── playwright.config.ts

Page Object Model:

export class LoginPage {
  constructor(private page: Page) {}
  readonly email = this.page.getByLabel('Email');
  readonly password = this.page.getByLabel('Password');
  readonly submit = this.page.getByRole('button', { name: 'Sign in' });

  async login(email: string, password: string) {
    await this.email.fill(email);
    await this.password.fill(password);
    await this.submit.click();
  }
}

Custom Fixtures:

import { test as base } from '@playwright/test';
type Fixtures = { loginPage: LoginPage; authedPage: Page };

export const test = base.extend<Fixtures>({
  loginPage: async ({ page }, use) => { await use(new LoginPage(page)); },
  authedPage: async ({ browser }, use) => {
    const ctx = await browser.newContext({ storageState: 'auth.json' });
    await use(await ctx.newPage());
    await ctx.close();
  },
});

Phase 3: 测试编写与优化

定位器策略 (优先级):

  1. getByRole() — 语义化,最推荐
  2. getByLabel() / getByPlaceholder() — 表单元素
  3. getByText() / getByTitle() — 文本内容
  4. getByTestId() — data-testid 属性
  5. locator('css') — CSS 选择器(最后手段)

Read the full file on GitHub · 239 lines

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. 1mo ago First seen · 239 lines · 84 tokens per session scan A d09e3100e8d5

Subscribe to this mod's changes

playwright-e2e is a skill published in the GitHub repository cass-2003/local-workflow-skill (12 stars, last pushed 3mo ago), licensed MIT. It adds 84 tokens to every session and 2,327 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

browse

Drive a real browser through Aside: open a page, read it, click through a flow, take screenshots, check console errors. (gstack).

garrytan/gstack · 32 tokens

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens

create-verification-skill

Create a repo-local verification skill and exhaustive feature map for driving a real app through its UI, CLI, or API. Use for "create a verification skill", "make a verify skill for this repo", or "document how agents can verify this app".

get-bb/bb · 57 tokens

browser-qa

A browser-based quality check for deployed web pages and user flows. It uses browser automation to test rendering, navigation, forms, interactions, responsive behaviour, and accessibility-related issues.

hashgraph-online/awesome-codex-plugins · 58 tokens

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.

anthropics/skills · 35 tokens

test-electron-app

Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser. Connect to the running app on port 9222, test desktop changes against a local Django stack, snapshot the accessibility tree, inspect network requests, and screenshot only when explicitly asked. Use when…

PostHog/posthog-foss · 112 tokens