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.
In this repository64 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- api-design-from-frontendSkill
- architect-team-pipelineSkill
- bug-fix-pipelineSkill
- cartographer-teamSkill
- claude-design-importSkill
- claude-md-efficiencySkill
- closeoutSkill
- common-pipeline-conventionsSkill
- contract-first-parallelismSkill
- coverage-mappingSkill
- ct6-agent-coreSkill
- data-annotationsSkill
- data-dictionarySkill
- data-engineering-explorationSkill
- data-eng-pipelineSkill
- data-lineage-mappingSkill
- delivery-manifestSkill
- design-fidelity-mappingSkill
- dev-api-integration-testingSkill
- diagnostic-research-teamSkill
- documentation-currencySkill
- domain-research-teamSkill
- dynamic-value-discoverySkill
- editability-completenessSkill
- email-testingSkill
- endpoint-trace-mappingSkill
- expensive-verification-debuggingSkill
- frontend-route-mappingSkill
- helpdeskSkill
- intake-and-mappingSkill
- interaction-completenessSkill
- interaction-intuitionSkill
- interactive-mockup-discoverySkill
- intuition-map-lifecycleSkill
- mcp-output-contract-designSkill
- mempalace-integrationSkill
- mini-architect-team-pipelineSkill
- page-publishingSkill
- phenotype-absorptionSkill
- phenotypesSkill
- playwright-suite-builderSkill
- project-homepageSkill
- project-principlesSkill
- proposal-refinerSkill
- readme-stylingSkill
- reuse-first-designSkill
- root-cause-test-failuresSkill
- structure-optimizationSkill
- team-spawning-and-review-gatesSkill
- test-prod-safety-classifierSkill
- test-run-monitorSkill
- token-compressionSkill
- ux-test-builderSkill
- verification-planningSkill
- verified-agent-outputSkill
- The first 60 shown.
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
- Distinctive: line 11
Know the user, know the goal: Before reading code, establish who the user base is and what each persona is trying to accomplish.
- Distinctive: line 32
Run an automated coverage check across two layers — user-intent first, then mechanics.
≈ “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.
Files
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:
- 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.
- 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".
- 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. - 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.routehappy-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.mdand 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.mdand 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.mdand 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.mdand 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.
| Section | Reference file | Loaded |
Phase A — Examination (mandatory, before any test code) | skills/playwright-user-flows/references/phase-a-examination-mandatory-before-any-test-code.md | on 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.md | on demand |
Phase C — Coverage verification (before submitting tests) | skills/playwright-user-flows/references/phase-c-coverage-verification-before-submitting-tests.md | on demand |
Anti-pattern rationalizations to reject | skills/playwright-user-flows/references/anti-pattern-rationalizations-to-reject.md | on demand |
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
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.

