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.

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.

agentmods
npx agentmods add skills/notysoty/openagentskills/playwright-test-builder
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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00010 $0.00781
Sonnet 5 $0.00004 $0.00313
Haiku 4.5 $0.00002 $0.00156

Measured 6d ago against content hash 7ed8313d35b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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. 6d 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 22d ago), licensed MIT. It adds 21 tokens to every session and 1,563 once invoked, about $0.0001 per session on Opus 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

agent-browser

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

code-yeongyu/oh-my-openagent · 51 tokens

testing-e2e

End-to-end testing patterns with Playwright — page objects, AI agent testing, visual regression, accessibility testing with axe-core, and CI integration. Use when writing E2E tests, setting up Playwright, implementing visual regression, or testing accessibility.

yonatangross/orchestkit · 55 tokens

Axe-core Accessibility Testing

Accessibility testing skill using axe-core and Playwright for automated WCAG 2.1 compliance auditing, custom rules, and accessibility reporting.

PramodDutta/qaskills · 33 tokens

E2E Testing Patterns

Comprehensive end-to-end testing methodologies and best practices covering architecture, test design, data management, flakiness prevention, and cross-browser strategies.

PramodDutta/qaskills · 35 tokens

Laravel Dusk Testing

Expert-level Laravel Dusk browser testing skill for PHP/Laravel applications. Covers Chrome-based E2E testing, browser assertions, Page Objects, component testing, authentication helpers, and database integration.

PramodDutta/qaskills · 44 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