Install this skill: copy and save to ~/.claude/skills/e2e-test-writer/SKILL.md

E2E Test Writer

Creates end-to-end tests for user flows using Playwright or Cypress, based on what's in the project.

5 min|Intermediate
BuildDeep WorkDeveloper
SKILL.md~/.claude/skills/e2e-test-writer/
---
name: e2e-test-writer
description: |
  Creates end-to-end tests for user flows using Playwright or Cypress.
  IMPORTANT: Activate this skill whenever the user asks to "write e2e tests",
  "add end-to-end tests", "test this flow", or "test this user journey".
  This skill MUST be used for all E2E test creation requests.
---

# E2E Test Writer

Creates end-to-end tests that simulate real user interactions. Tests complete user flows like sign-up, checkout, or form submission using whatever E2E 

Members Only

Become a member to access this content

Become a Member

Creates end-to-end tests that simulate real user interactions. Tests complete user flows like sign-up, checkout, or form submission using whatever E2E framework the project has.

Say any of these to activate this skill: - "write e2e tests for [flow]" - "add end-to-end tests" - "test this user flow" - "Use skill: e2e test writer"

1. Detect the E2E framework (Playwright, Cypress, or suggest Playwright if none exists) 2. Read existing E2E tests to match patterns, selectors, and helper utilities 3. Analyze the user flow: identify pages visited, actions taken, and expected outcomes 4. Generate the test file with proper setup (navigation, authentication if needed) 5. Use stable selectors (data-testid, role-based queries) over fragile CSS selectors 6. Add assertions for each critical step in the flow 7. Include cleanup logic if the test creates data (users, posts, orders) 8. Run the test in headed mode to verify it works correctly

  • Use data-testid attributes for reliable element selection
  • Test the critical path first, then add edge cases
  • Include proper wait conditions (do not use arbitrary sleep/timeouts)
  • Handle authentication state properly (seed a test user or use storage state)
  • Keep tests independent so they can run in any order
  • Best with: Claude Code CLI (can run tests and debug failures)
  • Also works: Cursor, Windsurf
  • Expects: A running application and an E2E framework (Playwright or Cypress)
  • E2E test file in the project's test directory
  • Page object or helper file if the project uses that pattern
  • Instructions for running the test
E2E Test Writer | Library | Modern Vibe Coding