Source profileQuality 96/100

event4u-app/agent-config/src/skills/playwright-architect/SKILL.md

playwright-architect

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'.

Source repository stars
7
Declared platforms
0
Static risk flags
0
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

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…

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

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/playwright-architect"
Safe inspection promptEditorial

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

What the source asks the agent to do

  1. 01

    Procedure

    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:

    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: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…
  2. 02

    When to use

    A new Playwright suite is starting and the directory shape, fixture

    A new Playwright suite is starting and the directory shape, fixtureAn existing suite has flake 2 % runs, slow CI ( 10 min), or aA second app / surface (admin, mobile-web, embedded widget) needs
  3. 03

    1. Inspect the suite, pick the locator philosophy

    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:

    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:Mixing strategies inside one test file is the smell — pick one and fall back only with comment.
  4. 04

    2. Cut Page Object boundaries

    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…

    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…
  5. 05

    3. Compose fixtures, don't inherit

    Playwright fixtures stack via test.extend(). Three layers max:

    Playwright fixtures stack via test.extend(). Three layers max:Deeper stacks become un-debuggable; flatten by extracting helpers.

Permission review

Static risk signals and limitations

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

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score96/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars7SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
event4u-app/agent-config
Skill path
src/skills/playwright-architect/SKILL.md
Commit
0adf49a8ae84b0ff6e2de8759eea43257e020eff
License
MIT
Collected
2026-07-28
Default branch
main
View the original SKILL.md

playwright-architect

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-regression mechanics once the design is locked.

When to use

  • A new Playwright suite is starting and the directory shape, fixture hierarchy, and locator strategy are unsettled.
  • An existing suite has flake > 2 % runs, slow CI (> 10 min), or a god-test file mixing unrelated journeys.
  • A second app / surface (admin, mobile-web, embedded widget) needs to share fixtures with the main suite.
  • German triggers: "Playwright Setup planen", "Page Objects schneiden", "warum flaket der Test?".

Do NOT use when:

  • A single test fails and the question is the assertion or selector — route to playwright-testing.
  • The platform is mobile-native (Detox, Appium, Maestro) — route to mobile-e2e-strategy.
  • Unit / component tests are the question — Playwright is the wrong tool; route to the stack-specific testing skill.

Procedure

1. Inspect the suite, pick the locator philosophy

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:

StrategyWhen
getByRole + accessible nameDefault — couples tests to the user contract, not markup
data-testidLegacy markup, third-party widgets, hash-suffixed CSS modules
Text content (getByText)Static marketing pages, copy-stable surfaces
CSS / XPathLast resort — every use is a debt entry

Mixing strategies inside one test file is the smell — pick one and fall back only with comment.

2. Cut Page Object boundaries

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.

3. Compose fixtures, don't inherit

Playwright fixtures stack via test.extend(). Three layers max:

LayerOwns
BaseBrowser, context, storageState, network mocks
AuthLogged-in user states (admin, member, guest)
DomainPre-seeded entities for a journey

Deeper stacks become un-debuggable; flatten by extracting helpers.

4. Plan flake prevention before the first failure

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.

5. Split CI vs local execution

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.

Output format

Return:

  1. Locator + Page Object plan — chosen strategy, PO list with surface and action count, flow objects when ≥ 2 POs collaborate.
  2. Fixture composition — base / auth / domain layer with what each layer sets up.
  3. Parallelism + flake budget — worker count, shard strategy, isolation, target flake ceiling, CI-vs-local config delta.

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>

Gotcha

  • 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".
  • Storage-state reuse across workers requires cookie domain isolation; the same auth.json across two browsers in parallel shares a session and corrupts state.
  • Visual regression in CI requires identical fonts and renderer — pin the Docker image, never run visual tests against host Chromium.
  • One Page Object per URL looks clean but creates god-objects for SPA routes; cut by user surface, not by pathname.

Do NOT

  • Do NOT cite this skill alongside playwright-testing in the same step — they sit at different tiers; pick one per phase.
  • Do NOT design suites for component tests with this skill — Playwright Component Testing has different fixture rules; route there instead.
  • Do NOT promise zero flake; budget for ≤ 1 % and instrument the metric. Zero is a goal that disguises silent retries.
  • Do NOT push the architecture into the tracker as code AC — output is a design note for refinement, not implementation steps.

Alternatives

Compare before choosing