Best for
- A new Playwright suite is starting and the directory shape, fixture
- An existing suite has flake 2 % runs, slow CI ( 10 min), or a
- A second app / surface (admin, mobile-web, embedded widget) needs
event4u-app/agent-config/src/skills/playwright-architect/SKILL.md
Use when shaping a Playwright suite — locator strategy, Page Object boundaries, fixture composition, flake-prevention architecture, CI-vs-local split — even on 'design our E2E tests'.
Decision brief
Architectural lens above the existing tactical playwright-testing. Decides locator philosophy, Page Object boundaries, fixture composition, and the CI-vs-local split before the first test is written. The playwright-testing skill handles concrete assertions, selectors, and visual…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/playwright-architect"Inspect the Agent Skill "playwright-architect" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/playwright-architect/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Review existing tests for current locator patterns; the established strategy wins unless it is the "last resort" tier. One philosophy per suite, written into CONTRIBUTING-tests.md:
A new Playwright suite is starting and the directory shape, fixture
Review existing tests for current locator patterns; the established strategy wins unless it is the "last resort" tier. One philosophy per suite, written into CONTRIBUTING-tests.md:
A Page Object owns: (a) one URL or one logical surface (modal, drawer), (b) the locators on that surface, (c) the actions a user can perform there. It does NOT own assertions about other surfaces or test setup. Boundary rule: if two POs need to call each other, introduce a flow…
Playwright fixtures stack via test.extend(). Three layers max:
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 96/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Architectural lens above the existing tactical
playwright-testing. Decides locator philosophy, Page Object boundaries, fixture composition, and the CI-vs-local split before the first test is written. Theplaywright-testingskill handles concrete assertions, selectors, and visual-regression mechanics once the design is locked.
Do NOT use when:
playwright-testing.mobile-e2e-strategy.Review existing tests for current locator patterns; the established
strategy wins unless it is the "last resort" tier. One philosophy
per suite, written into CONTRIBUTING-tests.md:
| Strategy | When |
|---|---|
getByRole + accessible name | Default — couples tests to the user contract, not markup |
data-testid | Legacy markup, third-party widgets, hash-suffixed CSS modules |
Text content (getByText) | Static marketing pages, copy-stable surfaces |
| CSS / XPath | Last resort — every use is a debt entry |
Mixing strategies inside one test file is the smell — pick one and fall back only with comment.
A Page Object owns: (a) one URL or one logical surface (modal,
drawer), (b) the locators on that surface, (c) the actions a
user can perform there. It does NOT own assertions about other
surfaces or test setup. Boundary rule: if two POs need to call
each other, introduce a flow object (SignupFlow) above them.
Playwright fixtures stack via test.extend(). Three layers max:
| Layer | Owns |
|---|---|
| Base | Browser, context, storageState, network mocks |
| Auth | Logged-in user states (admin, member, guest) |
| Domain | Pre-seeded entities for a journey |
Deeper stacks become un-debuggable; flatten by extracting helpers.
Bake in: auto-retry on network idle, soft assertions for parallel
checks, deterministic seed data, time freezing (page.clock),
explicit expect.poll() for eventual consistency, no
waitForTimeout ever. If a test needs sleep, the fixture is
wrong.
Local: headed browser, single worker, slowMo enabled, video off,
trace-on-retry. CI: headless, sharded workers (2–8), trace-on-first-retry,
video-on-failure, Github reporter + HTML. Document both in
playwright.config.ts; do not let local config leak into CI.
Return:
Concrete shape:
Suite: <name>
Locator strategy: <getByRole | data-testid | text | mixed (justified)>
Page Objects: <list with surface owned + action count>
Flow objects: <list — only when ≥ 2 POs collaborate>
Fixture layers: base / auth / domain — each with what it sets up
Parallelism: <workers, shards, isolation strategy>
Flake budget: ≤ 1 % failure on green main; alert threshold
CI-vs-local: <key config delta, one bullet each>
page.waitForSelector is almost always wrong — expect(locator).toBeVisible()
has built-in retry. The former teaches devs to think "wait, then
assert" instead of "auto-retry assertion".auth.json across two browsers in parallel
shares a session and corrupts state.pathname.playwright-testing
in the same step — they sit at different tiers; pick one per phase.Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
event4u-app/agent-config
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
affaan-m/ECC
Design, implement, and refactor Ports & Adapters systems with clear domain boundaries, dependency inversion, and testable use-case orchestration across TypeScript, Java, Kotlin, and Go services.
event4u-app/agent-config
Use when writing Playwright E2E tests — browser automation, visual regression testing, Page Objects, fixtures, and reliable test patterns.