agentleFS
paulingrampaulingram/claude-skills/skills/playwright-user-flows/SKILL.md

playwright-user-flows

Skill2 starsChanged 7 months agoMITView on GitHub

Use when authoring or running Playwright tests for a frontend feature, especially in Phase 5. Establish users and goals, enumerate every link, button, form input, modal, shortcut, drag target and conditional render plus its API contract, write journey tests asserting visible state. Rejects endpoint-only testing.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Know the user, know the goal: Before reading code, establish who the user base is and what each persona is trying to accomplish.

    line 11
  2. Distinctive:

    Run an automated coverage check across two layers — user-intent first, then mechanics.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Playwright User Flows — White-Box, Real-User

Frontend tests fail in production when they test what the developer remembered, not what the user can actually do — and what the user can actually do is shaped by who the user is and what they are trying to achieve, not just which elements the developer made interactive. This skill enforces four disciplines:

  1. Know the user, know the goal. Before reading code, establish who the user base is and what each persona is trying to accomplish. If the product docs / requirements / OpenSpec proposal do not make this clear, ask the user — do not guess.
  2. Read the code exhaustively. Enumerate every interactive element (link, button, form input of every type, modal trigger, drag target, keyboard shortcut, conditional render gate) and every API call the feature touches, from the actual source. No exceptions, no "the obvious ones".
  3. Test as the user, test the user's goals. Every test simulates a real human — page.click, page.fill, page.waitFor — and is named after a user achievement, not a widget. Tests are organized by user journey: the sequence a real user follows to accomplish a real goal. Direct API calls are never a substitute for user-flow tests.
  4. Test against the real backend, not fake data. For any feature that spans both a frontend and a backend, the user-flow tests MUST exercise the real running backend with real data flow front-to-back — the frontend's HTTP calls hit a real server, real DB / queue / cache, real responses. A Playwright test that clicks through the UI correctly but talks to a mocked backend (canned page.route happy-path responses, MSW handlers, an in-memory fake API server, or hardcoded response fixtures) has verified nothing about whether the two layers actually work together. This discipline is the DEFAULT — it applies unless the requirements explicitly authorize isolated / mock-backed testing for a named requirement. See Phase B → "Real backend by default".

Phase A — Examination (mandatory, before any test code)

STOP. Before acting under this section, Read skills/playwright-user-flows/references/phase-a-examination-mandatory-before-any-test-code.md and execute it in full. Do not work from memory.

For each feature/flow under test:

Phase B — Test authoring (informed by the inventory AND the user-journey map)

STOP. Before acting under this section, Read skills/playwright-user-flows/references/phase-b-test-authoring-informed-by-the-inventory-and-the-use.md and execute it in full. Do not work from memory.

Choose the venue before authoring against it (v3.66.0). Apply the verification-planning skill first: enumerate local run / dev environment / replay / seeded fixture / production for the claims these flows verify, prove which venue each depends on, and record the verification_plan. The real-backend rule below stands — for a both-layer feature the deployed dev environment IS the faithful venue for front-to-back claims, and the plan records why; the cheaper venues still settle first every claim they can (the handler logic locally, the failing input by replay, the empty-state by a seeded fixture), and a live environment the flows need is the run's to PROVIDE (references/local-dev-test-discipline.md), never a reason to wait.

Phase C — Coverage verification (before submitting tests)

STOP. Before acting under this section, Read skills/playwright-user-flows/references/phase-c-coverage-verification-before-submitting-tests.md and execute it in full. Do not work from memory.

Run an automated coverage check across two layers — user-intent first, then mechanics. User-intent gaps are blocking even if every mechanical gap is closed.

Anti-pattern rationalizations to reject

STOP. Before acting under this section, Read skills/playwright-user-flows/references/anti-pattern-rationalizations-to-reject.md and execute it in full. Do not work from memory.

Reference index

Each heavy section's full text lives in this skill's references/ folder behind the STOP pointer in its section; references/INDEX.md lists what to Read before each phase.

SectionReference fileLoaded
Phase A — Examination (mandatory, before any test code)skills/playwright-user-flows/references/phase-a-examination-mandatory-before-any-test-code.mdon demand
Phase B — Test authoring (informed by the inventory AND the user-journey map)skills/playwright-user-flows/references/phase-b-test-authoring-informed-by-the-inventory-and-the-use.mdon demand
Phase C — Coverage verification (before submitting tests)skills/playwright-user-flows/references/phase-c-coverage-verification-before-submitting-tests.mdon demand
Anti-pattern rationalizations to rejectskills/playwright-user-flows/references/anti-pattern-rationalizations-to-reject.mdon demand

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.