/training:e2e-testingfrom training
Guides Playwright E2E test creation from planning through implementation, covering test plans, data seeding, Page Object Models, and test writing with human checkpoints.
Ships in training. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Before starting, read the project config file
.claude/testing/e2e-config.mdfor project-specific patterns, application context, POM rules, assertion conventions. If it does not exist, create it in Step 0 from theREFERENCE.mdtemplate in this skill's folder.
Do these before starting any test work:
browser_navigate
and browser_snapshot) are available. If they are not, ask the user
to enable the Playwright MCP server and stop.package.json lists @playwright/test
(1.59 or higher). If it does not, stop and ask the user to set up
Playwright. Do not install packages yourself.Never put passwords, tokens, or session cookies into the conversation.
Do not ask the user for credentials, and never type them into a form. If the user pastes one, do not use or repeat it, and tell them to rotate it.
If a page needs a login, ask the user to sign in in the Playwright MCP browser window and tell you when they are done. Do not take a snapshot or use any other tool until the user says sign-in is done. If no browser window is visible (headless or isolated MCP), stop and ask the user to set up a headed Playwright MCP.
Test code reads credentials from environment variables. Refer to them by name only.
Never read, print, or log env files, saved auth state, cookies, or
tokens. Do not run commands that print env values (printenv,
echo $VAR), and do not open traces, reports, or test-results/ files.
Use only these Playwright MCP tools: browser_navigate,
browser_navigate_back, browser_snapshot, browser_click,
browser_hover, browser_type, browser_fill_form,
browser_select_option, browser_press_key, browser_wait_for,
browser_handle_dialog, browser_tabs, browser_close, and
browser_generate_locator. Do not use any other MCP tool (for
example, evaluate, run code, network, console, cookie, storage,
screenshot, or file tools) or any other browser tool.
Before you open any project file (config, spec, POM, helper, fixture,
or setup file), check it for hardcoded secrets with this match-only
search. Files that only read process.env do not match.
grep -lEi -e "(password|passwd|secret|token|api[_-]?key|cookie|credential)[a-z_]*[\"']?[[:space:]]*[:=][[:space:]]*[\"'\`][^\"'\`\$]" -e "(bearer|basic)[[:space:]]+[A-Za-z0-9._~+/=-]{8,}" <file>
If the file matches, do not open it. Tell the user that it has a hardcoded secret and ask them to move it to an env var.
When you run tests, you may quote test names, pass or fail, and assertion or locator error messages. Before you quote output, remove any value that looks like a secret. If output shows a credential or token, do not repeat it, and tell the user to rotate it.
Tests on auth responses assert only presence or type (for example,
expect(typeof body.token).toBe("string")), never the value, so a
failed assertion cannot print a token.
Look for .claude/testing/e2e-config.md in the project.
[UPPER_SNAKE_CASE], skip this step.REFERENCE.md from this skill's folder to that path. Then enter Q&A mode before doing anything else.Before Q&A: offer to explore existing tests first.
Ask the user a single yes/no question:
"I can explore the existing test directory and
playwright.config.tsfirst to pre-fill answers from what already exists, then only ask you about anything I can't determine. Want me to do that, or would you rather answer every question manually?"
playwright.config.ts, e2e/, tests/e2e/, playwright/, tests/). Read the config, a sampling of existing specs, any global-setup / auth.setup.ts files, fixtures, POMs, and package.json scripts. Do not open .env files or saved auth state (for example, .auth/). When a setup file or fixture holds credentials, record only the env var names; never copy credential values. Build a draft answer for each placeholder below. Then run Q&A in review mode: present each pre-filled answer and ask the user to confirm, correct, or fill in TBD. Skip questions that are fully answered and confirmed.Q&A mode rules:
TBD for that placeholder and move on..claude/testing/e2e-config.md, replacing every matching [PLACEHOLDER] token. Suggest that the user commits the file with the tests.Questions to ask (each maps to placeholders in the config file):
[APP_NAME], [APP_DESCRIPTION][BASE_URL], [BASE_URL_ENV_VAR]playwright.config.ts and the test files glob? -> [PLAYWRIGHT_CONFIG_PATH], [TESTS_GLOB][FRAMEWORK_AND_VERSION], [DATABASE], [CSS_APPROACH], [SPA_OR_REACTIVITY_LAYER], [API_OR_BACKEND_TECH][AUTH_MECHANISM_DESCRIPTION][SIGN_IN_METHOD_AND_ENDPOINT], [SIGN_OUT_METHOD_AND_ENDPOINT][TEST_CREDENTIALS_LOCATION][AUTH_RATE_LIMITS_OR_NONE], [MFA_SSO_NOTES_OR_NONE]storageState, per-test login) -> [AUTH_SETUP_STRATEGY][ROUTE_LOGIN], [ROUTE_HOME], [ROUTE_RESOURCE], [PURPOSE][FRAMEWORK_QUIRKS_THAT_AFFECT_TESTS], [HOW_TO_WAIT_AFTER_NAVIGATION], [FORM_SUBMISSION_QUIRKS_CSRF_VALIDATION], [HOW_DOM_UPDATES_AFFECT_TIMING][CMD_RUN_TESTS], [CMD_RUN_HEADED], [CMD_RUN_UI], [CMD_RUN_DEBUG], [CMD_OPEN_REPORT]e2e, tests/e2e, playwright) -> [E2E_ROOT][ANYTHING_ELSE_FUTURE_TESTS_SHOULD_KNOW]After saving, continue with the workflow below.
Create Playwright end-to-end tests for a feature or workflow, from plan through passing tests. Follow this workflow step by step. Stop after each step and check in with the user before proceeding.
In the steps below, a placeholder such as [E2E_ROOT] means the value
saved in .claude/testing/e2e-config.md.
E2E Test Progress:
- [ ] Step 0: Project Configuration Q&A (skip if the config file has no placeholders)
- [ ] Step 1: Create the test plan
- [ ] Step 2: Seed test data (skip if not needed)
- [ ] Step 3: Create/update Page Object Models
- [ ] Step 4: Write the tests
Read and analyze the feature or workflow to be tested. Identify key interaction points, required test data, page objects, and test scenarios.
If the user provides specific test scenarios, use ONLY those. Do not invent additional scenarios.
Present the plan in chat using this structure:
# Test Plan for [Feature]
[Overview]
## Setup Required
- [Entity]: [Quantity], [Attributes], [Relationships]
## POM Modifications & Creations
- [Page Object]: [Changes or new methods needed]
## Test Cases to Implement
- **[Test Case]**: [Description]
- Steps: [Numbered steps]
- Expected Result: [Outcome]
Include exact data requirements — quantities, attributes, relationships. Use timestamps in test identifiers to avoid conflicts. Do NOT write the plan to a file. Document assumptions about existing system state.
-> STOP. Present the plan. Confirm scope, test cases, and data requirements with the user before proceeding.
Skip if the test plan requires no new data. Tell the user immediately and move to Step 3.
[E2E_ROOT]/lib/helpers and [E2E_ROOT]/lib/datafactory (or
the folders the project uses).-> STOP. Confirm data was created successfully or that this step was skipped. Share a summary of what was seeded.
browser_navigate, take a browser_snapshot, and verify elements
exist. Use browser_generate_locator if it is available (it needs
--caps=testing); if not, build the locator from the role and
accessible name in the snapshot. If locators need discovery, explore
the feature: snapshot before and after key interactions, test locator
reliability across multiple attempts.Locator priority: getByRole > getByLabel > getByTestId > CSS
(last resort). Never use auto-generated classes (e.g., css-1x2y3z).
Follow the Page Object Pattern in the config file for the exact POM template and rules.
-> STOP. Present the POM classes. Review locator strategies and method signatures with the user.
-> STOP. Share test results. Confirm the test passes and covers the intended scenario.
[PLACEHOLDER] tokensWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub devclarityai/devclarity-marketplace --plugin training9 skills in this plugin
/api-playwright-testingGuides the creation of Playwright API tests from exploration through implementation. Covers API discovery, test plan creation, helper/data factory development, and test writing with human checkpoints at each stage./context-coverageAudit how agent context (CLAUDE.md, AGENTS.md, GitHub Copilot instructions, Cursor/Windsurf rules, rules directories, skills) lines up with the code across a set of repositories and generate a self-contained HTML report. The report leads with a short list of specific "things to check" (context behind the code, thin coverage for the codebase, oversized files, no per-area context), then per-repo raw metrics and a folder tree comparing folder LOC to context coverage, and can show what changed since an earlier run. Use when the user wants to audit context coverage across repos, "which repos are missing CLAUDE.md", "which repos have no Copilot instructions", "where is our agent context thin or stale", "context coverage across my org / projects folder", "track context coverage week over week", or "/context-coverage". Works on a local folder of clones, a whole GitHub org via the gh CLI, or a single monorepo scoped to just the areas one team owns.Other plugins' skills for the same job