Playwright Test Builder

Playwright Test Builder is a skill for Claude Code, Codex from Notysoty/openagentskills. It costs 21 tokens per session (1,563 once invoked), scanned A, original, MIT.

A writing aid for creating Playwright end-to-end tests, which check a complete web user journey in a browser.

In plain words
What is it for?
Use it to turn page descriptions and user-flow steps into runnable tests with assertions, browser setup, and cleanup.
Why use it?
It reduces the boilerplate and fragile selectors involved in testing flows such as login, checkout, and form submission.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for cline. Also seen: mentions Claude Code; mentions Codex; built for cline.

Good fit Use it to turn page descriptions and user-flow steps into runnable tests with assertions, browser setup, and cleanup.

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

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 Test Builder

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/notysoty/openagentskills/playwright-test-builder"><img src="https://agentmods.dev/badge/skills/notysoty/openagentskills/playwright-test-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,563 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.00021 $0.01563
Opus 5.5 $0.00008 $0.00625
Sonnet 5.5 $0.00004 $0.00313
Haiku 4.5 $0.00002 $0.00156

Measured 1mo ago against content hash 7ed8313d35b5, 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 Builder 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/playwright-test-builder/SKILL.md · 142 lines

How it starts

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

Playwright Test Builder

What this skill does

This skill directs the agent to write well-structured Playwright end-to-end tests for a given user flow or page. It produces tests with proper locator strategies (preferring accessible selectors over brittle CSS), meaningful assertions at every step, correct async/await handling, and solid setup/teardown. The output is ready to drop into a tests/ folder and run immediately.

Use this when you want reliable E2E coverage for critical user journeys — login, checkout, form submission, navigation flows — without writing boilerplate from scratch.

How to use

Claude Code / Cline

Copy this file to .agents/skills/playwright-test-builder/SKILL.md in your project root.

Then describe the flow you want tested and ask:

  • "Use the Playwright Test Builder skill to write E2E tests for the login flow."
  • "Write Playwright tests for the checkout process using the Playwright Test Builder skill."

Provide the page URL (or a description of the UI), the steps in the flow, and any known selectors or data-testid values if you have them.

Cursor

Add the "Prompt / Instructions" section below to your .cursorrules file. Then describe the flow to test in the chat.

Codex

Paste the relevant HTML or React component code alongside the flow description and the instructions below. Seeing the actual markup helps Codex pick the most stable locators.

The Prompt / Instructions for the Agent

When asked to write Playwright tests, follow these steps:

  1. Understand the flow. Ask for (or infer from context):

    • The URL or page being tested
    • The steps a user takes (click X, fill Y, expect Z)
    • Any test data needed (usernames, passwords, form values)
    • Whether authentication is required before the test
  2. Choose locators in this priority order (most stable first):

    • getByRole() with accessible name — best for buttons, links, inputs, headings
    • getByLabel() — for form fields with associated labels
    • getByText() — for elements identified by their visible text
    • getByPlaceholder() — for inputs with placeholder text
    • getByTestId() — when data-testid attributes are present
    • CSS selectors — only as a last resort; avoid if any stable alternative exists
    • Never use XPath unless absolutely necessary

Read the full file on GitHub · 142 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 · 142 lines · 21 tokens per session scan A 7ed8313d35b5

Subscribe to this mod's changes

Playwright Test Builder is a skill published in the GitHub repository Notysoty/openagentskills (9 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 1,563 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

aif-web-testing

Test web apps with Playwright, Vitest and k6: E2E, unit, integration, load, security, visual and a11y.

ainative-build/skills · 36 tokens

e2e-testing

Use when writing or stabilizing Playwright tests that drive a real browser through multi-step journeys — durable locators, web-first assertions, storageState auth, trace/retries, and flakes that only bite in CI. NOT in-process component tests (that is testing-web), NOT WCAG auditing (that is accessibility), NOT the…

ericrisco/rsc-harness · 79 tokens

debugging

Playwright test debugging conventions for the scaffold — reading failure messages, classifying failure modes (TimeoutError, ZodError, strict-mode violation, locator not found, network errors, schema drift), the playwright.config.ts capture defaults (trace on-first-retry, screenshot only-on-failure, video…

idavidov13/agentic-playwright · 179 tokens

api-testing

API testing patterns for Playwright -- apiRequest fixture usage, Zod response schema creation and validation, test.step wrapping for multi-call tests, per-field negative/validation testing, path parameter fuzzing, and helper fixtures for shared setup/teardown. Use when writing or updating API test specs, adding tests…

idavidov13/agentic-playwright · 132 tokens

data-strategy

Test data strategy for the Playwright scaffold — Faker + Zod factories for dynamic happy-path data, static TS files (.ts with as const exports — never .json) for domain-specific curated invalid sets, and the universal type-mismatch arrays in test-data/static/util/invalid-values.ts. Use when creating or editing a data…

idavidov13/agentic-playwright · 160 tokens

helpers

Plain utility function conventions for the Playwright scaffold — app-specific helpers in helpers/{area}/ (authentication bootstrap, storage-state creation, data seeding) and generic utilities in helpers/util/ (date formatting, string manipulation, parsing). Use when adding a reusable function that does NOT need the…

idavidov13/agentic-playwright · 152 tokens