playwright-frontend

playwright-frontend is a skill for Claude Code, Codex from testdino-hq/playwright-skill. It costs 92 tokens per session (623 once invoked), scanned A, original, MIT.

A frontend guide for making web-interface elements easy for tests and coding agents to find reliably. It explains accessible markup and when to add stable data-test identifiers, with examples for common frontend frameworks.

In plain words
What is it for?
Use it while building React, Vue, Angular, or Svelte interfaces to choose semantic elements, accessible names, locator methods, and stable identifiers for dynamic or custom controls.
Why use it?
Automation becomes fragile when it relies on changing text, unclear roles, or randomly named selectors. This guide helps developers expose durable ways to locate controls without adding unnecessary test identifiers.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it while building React, Vue, Angular, or Svelte interfaces to choose semantic elements, accessible names, locator methods, and stable identifiers for dynamic or custom controls.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/testdino-hq/playwright-skill/frontend"><img src="https://agentmods.dev/badge/skills/testdino-hq/playwright-skill/frontend.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 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.00092 $0.00623
Opus 5.5 $0.00037 $0.00249
Sonnet 5.5 $0.00018 $0.00125
Haiku 4.5 $0.00009 $0.00062

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

Security

Grade A, and why

playwright-frontend 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 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.

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.

frontend/SKILL.md · 36 lines

How it starts

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

Playwright Frontend (Authoring Locatable Markup)

Audience: frontend engineers writing the app — the counterpart to the test-author guides in core/. Your job here is to expose a small, stable, machine-readable contract on the DOM so tests and AI agents can locate elements deterministically, without flakiness.

A data-testid is a public API for your UI's automation layer: once a test or agent depends on it, renaming it is a breaking change. Build accessible markup first, then add deliberate, well-named, unique, stable test IDs where automation needs a durable handle.

Guide Index

Topic Guide
data-testid conventions (when, naming, uniqueness, stability) data-testid-conventions.md
Framework patterns (React, Vue, Angular, Svelte) + centralizing IDs + production stripping examples.md

Golden Rules

  1. Semantic HTML first — give elements a real role/label/accessible name so getByRole/getByLabel work; then add test IDs.
  2. Add data-testid only where role, label and text fall short — no-role custom widgets, scope containers, list rows, and dynamic or localized regions. A control getByRole already finds uniquely needs none.
  3. Name for global uniqueness — feature-component-element[-variant], kebab-case.
  4. In lists, suffix with a stable domain key, never the array index — user-row-${user.id} ✅ / user-row-${index} ❌.
  5. Decouple the value from text, locale, styling, and DOM position — those change; the test ID must not.
  6. Standardize on one attribute — data-testid is Playwright's default testIdAttribute; don't mix data-test/data-qa.

Read the full file on GitHub · 36 lines

Files

What ships with it

2 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. 3d ago First seen · 36 lines · 92 tokens per session scan A c3c4196766d8

Subscribe to this mod's changes

playwright-frontend is a skill published in the GitHub repository testdino-hq/playwright-skill (395 stars, last pushed 4d ago), licensed MIT. It adds 92 tokens to every session and 623 once invoked, about $0.0004 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-10-13.