/ldaume-testing:playwright-best-practicesfrom ldaume-testing
Writes, reviews, and debugs Playwright tests with stable locators, fixtures, auth setup, API mocking, trace debugging, responsive checks, accessibility assertions, and CI reliability.
Ships in ldaume-testing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this for browser-level tests that should behave like a reliable user.
Before writing tests:
data-testid with getByTestId, never by role,
label, text, or CSS.goto into a navigation still in flight aborts it, and the failure is
intermittent, which in a release gate means the gate decides by coin toss.getByTestId only. A test id survives copy edits, translation, theme,
and layout changes; role, label, text, and CSS locators break on each.row-<id> for an
item in a list, account-menu, submit-order, error-banner. Describe the
purpose, not the position, style, or copy. Never div-3 or blue-button.nth unless testing ordered content explicitly; prefer an id that
carries the item's key.Locators no longer prove role or name, so check them on purpose:
@axe-core/playwright) over every reachable state: dialog,
toast, error, empty, loading.await expect(page.getByTestId('account-menu')).toHaveRole('button') and
toHaveAccessibleName(...). These are assertions, never locators.waitForTimeoutgoto immediately after a click that navigatesgetByRole, getByLabel, getByText, or CSS used as a locatorWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
2 skills in this plugin
Other plugins' skills for the same job
npx claudepluginhub ldaume/agentic-engineering-harness --plugin ldaume-testing