/otter:playwright-e2e-testingfrom otter
Structures Playwright E2E tests with a three-layer separation (Actions/Checks/Scenarios). Guides use of Playwright CLI for test authoring and Playwright MCP for exploratory automation.
Ships in otter. 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.
Standardized architecture and creation process for Playwright end-to-end tests. Enforces a three-layer separation (Actions / Checks / Scenarios), a mandatory 3-gate creation workflow, and consistent coding standards across all UI teams.
Use the right tool for each phase of the workflow:
| Phase | Tool | Why |
|---|---|---|
| Exploring the app (understanding UI, discovering selectors, navigating flows) | Playwright MCP | Designed for exploratory automation — headed mode, structured accessibility snapshots in context |
| Writing & running tests (authoring test code, debugging failures, CI) | Playwright CLI (@playwright/cli) | Designed for coding agents in large codebases — lower token cost, headless, concise output |
Use Playwright MCP tools when you need to:
Use the CLI when you need to:
playwright-cli open <url> --headed)playwright-cli snapshot)playwright-cli click <ref>, playwright-cli fill <ref> <text>)All E2E test code follows a strict separation of concerns:
| Layer | Directory | Contains | Rules |
|---|---|---|---|
| Actions | actions/<journey>-actions.ts | User interactions (clicks, types, navigations) | No assertions. No side effects beyond UI interaction. Reusable across scenarios. |
| Checks | checks/<journey>-checks.ts | Assertions (visibility, text, state) | No interactions. Pure verification. Composable. |
| Scenarios | scenarios/<feature>/ | Composers wiring actions + checks | Readable as Given-When-Then. One journey per scenario. |
Why this separation matters:
e2e-playwright/
├── actions/<journey>-actions.ts
├── checks/<journey>-checks.ts
├── scenarios/<feature>/
│ └── <name>.e2e.spec.ts
Before generating any scenario file, pass all 3 gates in order. Skipping any gate is a violation.
Present the following to the user for explicit approval:
Do NOT proceed without explicit user confirmation.
Search existing scenarios for overlap:
scenarios/, actions/, and checks/ for the primary action/feature keywordsshared_steps / max(existing_steps, new_steps) * 100Present the planned sequence of actions and checks to the user as a step-by-step flow (Given/When/Then). The user confirms it matches the expected behavior. Only after all 3 gates pass, generate files.
Action helpers: Page as first argument, wait for resulting UI state, return void, name describes user intent.
Check helpers: Page as first argument, expect() assertions only, name describes expected state.
Scenario composition: No raw Playwright calls — only action/check helpers. Comments mark Given/When/Then boundaries. One journey per file.
getByRole('button', { name: /submit/i }) (preferred)getByLabel('Email address') (form fields)getByTestId('item-0') (when no accessible role)getByText('Continue') (visible content)page.locator('.item') (avoid)Never use XPath, auto-generated class names, or DOM position without semantic meaning.
waitForLoadState('networkidle') or waitForURL()expect(element).toBeVisible() or toBeEnabled()waitForTimeout() with hardcoded valuesUse tags to categorize tests by kind for filtering:
test.describe('Feature Name @happy-path', () => {
test('should complete the main flow', async ({ page }) => { ... });
test('should display correctly @visual', async ({ page }) => { ... });
});
Common tags: @happy-path, @visual, @edge-case, @regression.
page.click() / page.fill() in scenario files (bypasses action layer)waitForTimeout() (slow, flaky)actions/ or checks/ directories before a second scenario needs them (premature abstraction — keep scenario-specific helpers as local functions in the spec file until reuse is needed)Halt and request user input if:
For detailed patterns, code examples, and advanced techniques:
references/coding-standards.md — Complete action, check, and scenario code examples with patternsreferences/creation-process.md — Detailed 3-gate process with deduplication scoring examplesreferences/accessibility.md — Accessibility testing coverage requirements and patternsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
11 skills in this plugin
/logic-component-shapeDecision tree for single component versus container/presenter, which componentStructure to generate, and which componentType to declare. Invoked by `logic-placement` and `logic-review`, not directly./logic-placementDecide where new logic belongs — component shape, logic layer, and store variant — when designing a component, service, or store in an Angular/Otter workspace. Use `logic-review` to assess existing code./logic-reviewReview existing components, services, or stores for misplaced logic — presenter leaks, componentType mismatches, wrong store variants. Use `logic-placement` when designing something new./logic-state-layerDecision tree for whether logic belongs in the component class, a service, or an NgRx store, including service scope and where API calls go. Invoked by `logic-placement` and `logic-review`, not directly./logic-store-typeDecision tree for which NgRx store variant to generate — entity or simple, sync or async. Invoked by `logic-placement` and `logic-review` once a store is justified, not directly; it does not decide whether a store is warranted./otter-mcp-setupThis skill should be used when the `@o3r/mcp` MCP server is not available and needs to be installed, or when the user asks to "install otter mcp", "setup otter mcp", or "configure otter mcp server".npx claudepluginhub amadeusitgroup/otter --plugin otterOther plugins' skills for the same job