Skip to content

E2E Testing Patterns

Write reliable end-to-end browser tests with Playwright or Cypress and debug flaky ones

Repository
wshobson/agents
Stars
42,095
Licence
MIT
Files
2 files

What it does

When installed, the agent gets guidance on writing end-to-end tests that drive a real browser through your app's critical user journeys, such as login, signup, or checkout. It applies recommended practices like using stable data-testid selectors, keeping tests independent, avoiding fixed timeouts, and using page objects. It also knows how to debug failing tests with Playwright's headed mode, debug mode, trace viewer, and screenshots.

Great for

  • Developers setting up or improving Playwright or Cypress test suites
  • Teams trying to reduce flaky tests in CI pipelines
  • Engineers who want consistent E2E testing standards across a project

Skip it if

  • Teams that only need unit or API-level tests, since the skill says E2E tests should be kept few and focused (slow and costly otherwise)
  • Non-developers who want to test a website without writing code, because the output consists of test code and terminal commands that someone must run

Try asking

  • “Write Playwright tests for our signup and checkout flow using data-testid selectors”
  • “Our Cypress suite is flaky in CI, help me find and fix the waits and selectors causing it”
  • “Show me how to use the Playwright trace viewer to debug a failing test”
  • “Set up page objects and test independence for our existing E2E test suite”
Step-by-step guide: how to use E2E Testing PatternsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    e2e-testing-patterns.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip e2e-testing-patterns.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip e2e-testing-patterns.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Point the agent at your existing test files and config so it matches your current conventions rather than generic examples
  • Ask for a trace or headed run when a test fails, rather than guessing at a fix
  • Review generated tests before committing, since the skill itself does not run anything and cannot verify they pass against your app

What's inside

  • references/details.md
  • SKILL.md

Redistributed unmodified from wshobson/agents under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.