SKILL·C6DEE0

playwright-frontend

testdino-hq
Updated 2 days ago
392
61
392
View on GitHub
Testingreactaitestingdesigndata

About

This skill guides frontend developers on writing UI components that are reliably locatable by tests and AI agents. It covers the official Playwright locator priority, emphasizes semantic markup, and provides framework-specific rules for adding stable `data-testid` attributes. Use it when authoring or reviewing components to create a durable automation contract for your UI.

Quick Install

Claude Code

Recommended
Primary
npx skills add testdino-hq/playwright-skill -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/testdino-hq/playwright-skill
Git CloneAlternative
git clone https://github.com/testdino-hq/playwright-skill.git ~/.claude/skills/playwright-frontend

Copy and paste this command in Claude Code to install this skill

Documentation

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

TopicGuide
data-testid conventions (when, naming, uniqueness, stability)data-testid-conventions.md
Framework patterns (React, Vue, Angular, Svelte) + centralizing IDs + production strippingexamples.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.

Related

GitHub Repository

testdino-hq/playwright-skill
Path: frontend
0
aiai-skillsantigravity-skillsclaude-skillscodex-skillscursor-skills
FAQ

Frequently asked questions

What is the playwright-frontend skill?

playwright-frontend is a Claude Skill by testdino-hq. Skills package instructions and resources that Claude loads on demand, so Claude can perform playwright-frontend-related tasks without extra prompting.

How do I install playwright-frontend?

Use the install commands on this page: add playwright-frontend to Claude Code as a plugin, or clone its repository into your skills directory, then restart Claude so it picks up the skill.

What category does playwright-frontend belong to?

playwright-frontend is in the Testing category, tagged react, ai, testing, design, and data.

Is playwright-frontend free to use?

Yes. playwright-frontend is listed on AIMCP and free to install.

Related Skills

evaluating-llms-harness
Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill
cloudflare-cron-triggers
Testing

This skill provides comprehensive knowledge for implementing Cloudflare Cron Triggers to schedule Workers using cron expressions. It covers setting up periodic tasks, maintenance jobs, and automated workflows while handling common issues like invalid cron expressions and timezone problems. Developers can use it for configuring scheduled handlers, testing cron triggers, and integrating with Workflows and Green Compute.

View skill
webapp-testing
Testing

This Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.

View skill
finishing-a-development-branch
Testing

This skill helps developers complete finished work by verifying tests pass and then presenting structured integration options. It guides the workflow for merging, creating PRs, or cleaning up branches after implementation is done. Use it when your code is ready and tested to systematically finalize the development process.

View skill