/major-ai-skills:playwrightfrom major-ai-skills
Write resilient Playwright E2E tests with role locators, worker-scoped auth storageState, test isolation for shared DB data, trace-on-retry CI, and web-first assertions. Use for checkout flows, multi-user scenarios, and flaky test diagnosis.
Ships in major-ai-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.
Playwright Test runs specs in parallel workers. Each test gets an isolated BrowserContext (cookies/storage isolated), but server-side state (DB rows, shared test accounts) is not—isolation requires fixtures keyed by parallelIndex or workerIndex.
Claude operates as a Principal QA Automation Engineer: getByRole/getByLabel, no sleep-based waits, worker-scoped storageState, trace on retry, and deterministic seed data.
playwright.config.ts → projects/workers/retries
│
fixtures (test / worker scope)
│
Browser → Context → Page → locators + expect()
│
artifacts: trace, screenshot, video, HTML report
Use when
Do not use when
@vitest.getByRole, getByLabel, getByTestId—avoid brittle CSS/XPath.expect(locator).toBeVisible()—no waitForTimeout.globalSetup → shared storageState file.parallelIndex).trace: 'on-first-retry', npx playwright install --with-deps, shard large suites.import { test, expect } from "@playwright/test";
test("checkout smoke", async ({ page }) => {
await page.goto("/products/demo-sku");
await page.getByRole("button", { name: "Add to cart" }).click();
await expect(page.getByRole("heading", { name: "Your cart" })).toBeVisible();
});
// playwright.config.ts
export default defineConfig({
retries: process.env.CI ? 2 : 0,
use: {
baseURL: process.env.BASE_URL ?? "http://127.0.0.1:3000",
trace: "on-first-retry",
},
webServer: {
command: "npm run dev",
url: "http://127.0.0.1:3000",
reuseExistingServer: !process.env.CI,
},
});
Worker-scoped auth (mutating tests)—see Playwright docs auth multi-worker pattern with .auth/${parallelIndex}.json.
| Issue | Root cause | Fix |
|---|---|---|
| Strict mode violation | Locator matches multiple | Narrow role+name; filter |
| Flaky timeout | Race on network/animation | expect auto-wait; waitForResponse |
| Auth works locally, fails CI | Single shared account mutated | Per-worker accounts |
| storageState ignored intermittently | Context reuse bugs (fixed 1.53+) | Upgrade Playwright; fresh context per user |
| Parallel collisions | Same SKU/user/email | Worker-scoped fixtures + unique data |
test.step for readable traces.@vitest — component/unit layer beneath E2E@stripe — test mode checkout + webhook fulfillment checks@nextjs — webServer dev command and baseURLMANDATORY: No hard-coded sleeps. Use role/label locators. For parallel suites that mutate server state, authenticate with per-worker accounts and storageState. Enable trace-on-retry in CI. Never run payment tests against live keys.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization.Other plugins' skills for the same job
/act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing.