Adds Playwright-based E2E testing to web projects with a `make e2e` command. Creates config, spec files, and Make targets for headless Chromium verification.
Ships in harus-skills. 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.
Read when SKILL.md points to them.
State the behavior as a Playwright spec, run it headless through the project's make e2e, and keep the spec as the project's regression check.
Keep everything in source: settings in playwright.config.ts, checks and probes in spec files, setup and runs behind Make targets. Do not verify with one-off commands or logic typed on a command line; anything worth running belongs in one of those files, where the next person or agent can rerun it.
The practices below follow Playwright's best practices; the deliberate departures are listed under Limits.
A project fits when it serves its web UI from a dev or preview server that starts without interaction, on local or fixture data. Headless Chromium needs no display: it runs over plain SSH on a Mac with no console session. A desktop or mobile shell (Tauri, Compose, Android) is out of scope, though its web frontend alone may fit.
@playwright/test as a dev dependency with the project's package manager, so its lockfile pins the version. Each Playwright version needs its own Chromium build; choose a version another project already uses to skip a download.assets/: playwright.config.ts next to the web app's package.json, e2e/smoke.spec.ts and e2e/probe.spec.ts into its e2e/, and e2e.mk next to the project's Makefile.EDIT: the dev command and its port in the config, and in the smoke spec the first route and a landmark it must show.Makefile, set E2E_DIR to the web app's directory and add include e2e.mk. It defines e2e, e2e-probe and e2e-install.make e2e-install once, then make e2e.test-results/ and playwright-report/ to the web app's .gitignore.make e2e in the project's own instructions, so an agent finds it without this skill.When the app needs more than one server, seeded data, or checks after the run, give the lifecycle to a project script that starts everything, exports E2E_BASE_URL, and runs the checks; the config then starts no server of its own. felicia's admin E2E harness works this way.
In CI, run make e2e-install E2E_INSTALL_FLAGS=--with-deps and then make e2e with CI set. The config then forbids a committed test.only, retries failures twice but fails the run on a test that only passed on retry, and uses one worker.
Run make e2e-probe ROUTE=/path before writing a spec for a page you have not seen. The probe renders the route through the same config and server as the checks, waits until the page shows visible text (a client-rendered app paints after the load event), prints its title, URL, console errors and ARIA snapshot, and saves a full-page probe.png under test-results/. A page that stays blank fails the probe, with its screenshot kept. The snapshot lists the page's roles and accessible names: write locators from it rather than from guesses. Read the screenshot back for anything visual. To see something the probe does not capture, extend probe.spec.ts rather than running a one-off script.
getByRole), then by label for form fields (getByLabel), by text for non-interactive content (getByText), and by test id only as a fallback (getByTestId). Never use CSS or XPath selectors.await expect(locator).toBeVisible(), toHaveText, toHaveURL. Never expect(await locator.isVisible()).toBe(true), fixed sleeps, or networkidle waits, which Playwright discourages for tests.toMatchAriaSnapshot rather than a pixel comparison.beforeEach or a fixture, never from another test's leftovers. Fake third-party services with page.route, so a check does not depend on someone else's server. For an app behind a login, a setup project signs in once and saves storageState for the others.make e2e. While iterating, filter with ARGS='-g "<test name>"', rerun only failures with ARGS=--last-failed, or only changed specs with ARGS=--only-changed.test-results/: error-context.md, the test-failed-1.png screenshot and trace.zip. The error context and the screenshot are enough without a display; the trace viewer needs one.list reporter and retain-on-failure traces replace Playwright's html and on-first-retry defaults, because an agent reads the terminal and local runs do not retry.timeout, expect.timeout, webServer.timeout) rather than a shell timeout: macOS has none unless GNU coreutils supplies gtimeout.webServer or the project's script start the app on its own port. The config refuses a port already in use, so it never tests a server someone else is running.make e2e-install, then make e2e.playwright init-agents, 1.56+) automate that loop but add an MCP server; this skill does not need them.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/harus-skills:playwright-verifyfrom harus-skills
npx claudepluginhub azusachino/harus-skills --plugin harus-skills3 skills in this plugin