Agent skill

E2E Testing Claude Code

by PramodDutta in PramodDutta/qaskills

Make Claude Code write and maintain end-to-end tests like a senior SDET — Playwright and Cypress flows with stable locators, the Page Object Model, fixtures, reused auth state, network mocking, and…

MITAuto-check passedTesting & QA

Install E2E Testing Claude Code

skills CLI
$ npx skills add PramodDutta/qaskills --skill e2e-testing-claude-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PramodDutta/qaskills e2e-testing-claude-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PramodDutta/qaskills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/packs/qa-essentials/skills/e2e-testing-claude-code .claude/skills/e2e-testing-claude-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
e2e-testing-claude-code
GitHub stars
232
Token cost
~1.4k tokens
SKILL.md length
518 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Make Claude Code write and maintain end-to-end tests like a senior SDET — Playwright and Cypress flows with stable locators, the Page Object Model, fixtures, reused auth state, network mocking, and…

  • Works in 8 steps: pick what to E2E-test → framework → stable locators → …
  • Tasks that involve End-to-end testing
  • SKILL.md covers Core principles, Step 1 — pick what to E2E-test, Step 2 — framework and Step 3 — stable locators, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

E2E Testing Claude Code is an agent skill from PramodDutta/qaskills. Make Claude Code write and maintain end-to-end tests like a senior SDET — Playwright and Cypress flows with stable locators, the Page Object Model, fixtures, reused auth state, network mocking, and flake-free CI. Claude Code E2E testing, done right.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering End-to-end testing. It works with Cypress and Playwright. The repository describes itself as: QA Skills Directory QA Skills is a curated directory of testing-specific skills for AI coding agents (Claude Code, Cursor, Copilot, etc.). The licence is MIT.

When your agent uses it

  • Tasks that involve End-to-end testing

Example prompts

  • “/e2e-testing-claude-code”

Requirements

  • Node.js

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. pick what to E2E-test
  2. framework
  3. stable locators
  4. Page Object Model
  5. auth state reuse (don't log in every test)
  6. network mocking for determinism
  7. kill flake
  8. CI

What it can do on your machine

Read from SKILL.md and the folder at commit 1d2a092. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

E2E Testing Claude Code loads about 1.4k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 518 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PramodDutta/qaskills at commit 1d2a092, republished under its MIT licence (© PramodDutta). 518 words, ~1,426 tokens.

Download SKILL.mdSave it as .claude/skills/e2e-testing-claude-code/SKILL.md (or your agent's skills folder).
name
e2e-testing-claude-code
description
Make Claude Code write and maintain end-to-end tests like a senior SDET — Playwright and Cypress flows with stable locators, the Page Object Model, fixtures, reused auth state, network mocking, and flake-free CI. Claude Code E2E testing, done right.
license
MIT
metadata.author
qaskills
metadata.version
1.0.0
metadata.source
https://qaskills.sh/skills/qaskills/e2e-testing-claude-code

E2E Testing Skill for Claude Code

You are a senior SDET working inside Claude Code. When the user asks you to add, write, or fix end-to-end (E2E) tests, follow this skill. E2E tests drive a real browser through real user journeys — they are the most valuable tests when reliable and the most damaging when flaky. Your job is to produce E2E tests the team trusts.

Core principles

  1. Test journeys, not pages. An E2E test should follow a complete user goal (sign up → add to cart → check out), asserting the outcomes a user would notice.
  2. Few, high-value, rock-solid. Cover the handful of revenue/critical paths well. Push field-level and edge-case checks down to unit/integration tests.
  3. Deterministic. No fixed sleeps, no dependence on prod data, no test order coupling.
  4. Stable locators only. The #1 cause of E2E flake is brittle selectors.

Step 1 — pick what to E2E-test

Choose journeys by business risk: authentication, checkout/payment, onboarding, search→result, the core "job to be done" of the app. If asked to "add E2E tests" broadly, list the critical journeys first and confirm priority rather than testing every page.

Step 2 — framework

Default to Playwright for new work (auto-waiting, cross-browser, traces, parallelism). Use Cypress if the repo already standardizes on it. Detect the existing setup before adding anything; never introduce a second E2E framework.

Step 3 — stable locators

Preference order: role/label/text → data-testid → CSS as a last resort. Never use auto-generated class names, deep CSS chains, or nth-child position.

ts
// Good
await page.getByRole('textbox', { name: 'Email' }).fill('user@test.dev');
await page.getByRole('button', { name: 'Continue' }).click();

// Bad — brittle
await page.locator('.MuiBox-root > div:nth-child(3) input').fill('user@test.dev');

If the app lacks stable hooks, add data-testid attributes to the app code as part of the work.

Step 4 — Page Object Model

Keep selectors and actions in page objects; keep assertions in tests. This isolates UI churn to one file and makes tests read like prose.

ts
// pages/LoginPage.ts
export class LoginPage {
  constructor(private page: Page) {}
  async login(email: string, password: string) {
    await this.page.getByLabel('Email').fill(email);
    await this.page.getByLabel('Password').fill(password);
    await this.page.getByRole('button', { name: 'Sign in' }).click();
  }
}

Step 5 — auth state reuse (don't log in every test)

Log in once in global setup, save storageState, and reuse it. This cuts runtime and removes a huge source of flake.

ts
// global-setup.ts
const page = await browser.newPage();
await new LoginPage(page).login(process.env.E2E_USER!, process.env.E2E_PASS!);
await page.context().storageState({ path: 'storage/auth.json' });

// playwright.config.ts → use: { storageState: 'storage/auth.json' }
Show full SKILL.md (195 more words)Show less

Step 6 — network mocking for determinism

Mock third-party/unstable calls so tests don't fail on someone else's outage; let core API calls hit a seeded test backend.

ts
await page.route('**/api/flags', (route) =>
  route.fulfill({ json: { newCheckout: true } }),
);

Step 7 — kill flake

  • Replace every waitForTimeout with a web-first assertion (await expect(locator).toBeVisible()).
  • Each test seeds and cleans its own data; randomize test order in CI to expose coupling.
  • Freeze time/animations where they cause races; disable CSS animations in test config.
  • If a test can't be made stable and blocks the build, quarantine and track it — don't let it flap.

Step 8 — CI

Run E2E on PRs (or on merge if slow), shard across workers for speed, cache browser binaries, and upload the Playwright trace + screenshots + video on failure so failures are debuggable from the CI artifact alone.

yaml
- run: npx playwright test --shard=${{ matrix.shard }}/4
- if: failure()
  uses: actions/upload-artifact@v4
  with: { name: trace, path: test-results/ }

Worked example

ts
import { test, expect } from '@playwright/test';
import { LoginPage } from './pages/LoginPage';

test('returning user completes checkout', async ({ page }) => {
  await page.goto('/');
  await new LoginPage(page).login(process.env.E2E_USER!, process.env.E2E_PASS!);

  await page.getByRole('link', { name: 'Widget Pro' }).click();
  await page.getByRole('button', { name: 'Add to cart' }).click();
  await expect(page.getByTestId('cart-count')).toHaveText('1');

  await page.getByRole('link', { name: 'Checkout' }).click();
  await page.getByRole('button', { name: 'Place order' }).click();
  await expect(page.getByRole('heading', { name: 'Thank you' })).toBeVisible();
});

Stable role locators, reused auth, web-first assertions, a real revenue journey, concrete post-conditions — that is a trustworthy E2E test.

Self-review checklist

  • Follows a complete user journey, not a single widget.
  • Only stable locators (role/label/testid); no positional CSS.
  • No waitForTimeout; uses web-first assertions.
  • Reuses auth state; seeds/cleans its own data; passes in random order.
  • Trace/screenshots uploaded on CI failure.
  • Actually fails when the journey breaks (verify by breaking it once).

© PramodDutta, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in packs/qa-essentials/skills/e2e-testing-claude-code of PramodDutta/qaskills.

Open the folder on GitHubat commit 1d2a092

Compare with similar skills

E2E Testing Claude Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

E2E Testing Claude Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
E2E Testing Claude Code this skillPramodDutta/qaskills232—~1.4kAutomated safety check: PassMIT
Cypress To Scout Migrationelastic/kibana21k—~3.8kAutomated safety check: PassCustom licence
E2E Testing Patternstry-works/role-model11814 repos~990Automated safety check: PassCustom licence
Playwright Testingchongdashu/vibejam-starter-pack149—~2.1kAutomated safety check: PassNone
Open BrowserJasonHonKL/Openbrowser114—~1.6kAutomated safety check: PassMIT
Create a Verification Skillcursor/plugins10k8 repos~1.5kAutomated safety check: PassNone

Similar skills

  • Official

    Migrate Kibana Cypress E2E tests (.cy.ts) to Scout (Playwright).

    21k GitHub stars~3.8k tokensUpdated today
    Testing & QAAuto-check passed
  • E2E Testing Patterns

    try-works/role-model

    Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment.

    118 GitHub starsUsed in 14 repos~990 tokens
    Testing & QAAuto-check passed
  • Playwright Testing

    chongdashu/vibejam-starter-pack

    Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.

    149 GitHub stars~2.1k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Open Browser

    JasonHonKL/Openbrowser

    A skill your agent uses whenever the task involves browsing web pages, extracting page content, clicking forms, or completing web workflows.

    114 GitHub stars~1.6k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Official

    Generates a project-local skill that launches your app, exercises a feature the way a user would and captures evidence, for web, CLI, API or desktop projects.

    10k GitHub starsUsed in 8 repos~1.5k tokens
    Testing & QAAuto-check passed
  • Bmad Testarch Framework

    bmad-code-org/bmad-method-test-architecture-enterprise

    Initialize test framework with Playwright or Cypress. An agent skill from bmad-code-org/bmad-method-test-architecture-enterprise.

    104 GitHub starsUsed in 3 repos~1.2k tokens
    Testing & QAAuto-check passed

More from PramodDutta/qaskills

All 11 skills in this repo
  • Add Seed Skills

    PramodDutta/qaskills

    A skill your agent uses when adding or editing QA skills in seed-skills/ or getting them onto the live qaskills.sh catalog, e.g.

    232 GitHub stars~1.4k tokensUpdated 4 days ago
    Auto-check: notes
  • Publish SEO Batch

    PramodDutta/qaskills

    A skill your agent uses when publishing SEO blog articles to qaskills.sh, e.g.

    232 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed
  • Ship Prod

    PramodDutta/qaskills

    A skill your agent uses when deploying qaskills.sh to production, verifying whether a deploy landed, or when a push to main did not show up on the live site, e.g.

    232 GitHub stars~1k tokensUpdated 4 days ago
    Auto-check passed
  • API Testing REST

    PramodDutta/qaskills

    Comprehensive RESTful API testing patterns covering HTTP methods, status codes, request/response validation, authentication, error handling, and contract testing.

    232 GitHub stars~4.9k tokensUpdated 4 days ago
    Auto-check passed
  • Claude Code QA

    PramodDutta/qaskills

    The complete QA skill for Claude Code — turn Claude into an expert QA engineer that picks the right test type, writes reliable Playwright, Cypress, and pytest tests, eliminates flaky tests, enforces…

    232 GitHub stars~2.3k tokensUpdated 4 days ago
    Auto-check passed
  • Cypress E2E

    PramodDutta/qaskills

    End-to-end testing skill using Cypress for web applications, covering custom commands, network intercepts, fixtures, cy.session, and component testing patterns.

    232 GitHub stars~3.4k tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about E2E Testing Claude Code

What does E2E Testing Claude Code do?

Make Claude Code write and maintain end-to-end tests like a senior SDET — Playwright and Cypress flows with stable locators, the Page Object Model, fixtures, reused auth state, network mocking, and…. E2E Testing Claude Code is an agent skill from PramodDutta/qaskills. Make Claude Code write and maintain end-to-end tests like a senior SDET — Playwright and Cypress flows with stable locators, the Page Object Model, fixtures, reused auth state, network mocking, and flake-free CI.

When should I use E2E Testing Claude Code?

E2E Testing Claude Code fits situations like: tasks that involve End-to-end testing.

How do I install E2E Testing Claude Code in Claude Code?

Run `npx skills add PramodDutta/qaskills --skill e2e-testing-claude-code -a claude-code`. Or copy the skill folder (packs/qa-essentials/skills/e2e-testing-claude-code in PramodDutta/qaskills) into .claude/skills/e2e-testing-claude-code in your project. Claude Code loads it when a task matches its description.

How do I install E2E Testing Claude Code in Codex?

Run `npx skills add PramodDutta/qaskills --skill e2e-testing-claude-code -a codex`. Or copy the skill folder (packs/qa-essentials/skills/e2e-testing-claude-code in PramodDutta/qaskills) into .agents/skills/e2e-testing-claude-code in your project. Codex loads it when a task matches its description.

Can I use E2E Testing Claude Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PramodDutta/qaskills --skill e2e-testing-claude-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/e2e-testing-claude-code, .gemini/skills/e2e-testing-claude-code, .github/skills/e2e-testing-claude-code and .opencode/skills/e2e-testing-claude-code in your project.

What does E2E Testing Claude Code need to run?

SKILL.md names no scripts, command-line tools or credentials: E2E Testing Claude Code is instructions for the agent only. Our summary lists: Node.js.

Does E2E Testing Claude Code access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is E2E Testing Claude Code safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does E2E Testing Claude Code use?

E2E Testing Claude Code is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does E2E Testing Claude Code use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to E2E Testing Claude Code?

Skills that share tags, products or a category with E2E Testing Claude Code: Cypress To Scout Migration (elastic/kibana, 21k stars), E2E Testing Patterns (try-works/role-model, 118 stars), Playwright Testing (chongdashu/vibejam-starter-pack, 149 stars) and Open Browser (JasonHonKL/Openbrowser, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains E2E Testing Claude Code?

PramodDutta (a GitHub user) maintains it in PramodDutta/qaskills, which has 232 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 4, 2026.

Source: PramodDutta/qaskills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.