e2e-testing
Skill13 starsChanged 2 months agoMITView on GitHub
Plans, generates, runs, and heals end-to-end tests using Playwright Test Agents (Planner, Generator, Healer) and the official `@playwright/mcp` server. Drives a spec-first feature-flow loop, proposes `data-testid` source diffs only when accessibility-tree locators fail, and stays token-aware via snapshot mode and `--last-failed` reruns. Use when adding E2E coverage, verifying a user journey, hardening a flaky flow, or wiring Playwright MCP into a repo. Triggers on "test this flow", "add e2e", "verify the user journey", "write e2e test", "feature test", "playwright agents", "/e2e-testing".
48 other projects use a version of this.
Adopted by
Most recently taken up by
- Lukk17/agent-standardstheir own version, first seen Oct 5, 2026
- CrowdStrike/foundry-skillstheir own version, first seen Oct 1, 2026
- philtzjp/skillstheir own version, first seen Sep 30, 2026
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Sep 28, 2026
- HACK-WU/skillstheir own version, first seen Sep 23, 2026
- lintangknitto/agent-skillstheir own version, first seen Sep 23, 2026
Used with
Projects with it also use swift-protocol-di-testing, content-hash-cache-pattern and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
InfopibeSkillswift-protocol-di-testing
Protocol-based dependency injection for testable Swift code — mock file system, network, and external APIs using focused protocols and Swift Testing.
Also in 8 projects that use this
InfopibeSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 8 projects that use this
saxon-ySkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 7 projects that use this
- +9 more from Infopibe
Other versions48 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 48
- xu-xiang/everything-claude-code-zh★ 2ksame name
- nodetool-ai/nodetool★ 551same name
- ai-dashboad/flutter-skill★ 384same name
- loulanyue/awesome-claude-notes★ 272same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- cohen-liel/hivemind★ 110same name
- Jamkris/everything-gemini-code★ 87same name
- JasonxzWen/harness-hub★ 71same name
- nahid-sparktales/agent-dispatcher★ 59same name
38 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository53 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- skills/workflow/autonomous-workflow/CLAUDE.mdCLAUDE.md
- holistic-analysisSkill
- ideateSkill
- interviewSkill
- playwright-trace-analyzerSkill
- profile-optimizerSkill
- rum-trackingSkill
- screen-recorderSkill
- video-analyserSkill
- create-skillSkill
- docsSkill
- handoffSkill
- optimize-claude-mdSkill
- persistent-memorySkill
- changelogSkill
- ci-auto-fixSkill
- create-prSkill
- github-actions-authorSkill
- resolve-conflictsSkill
- animations-nativeSkill
- animationsSkill
- behavioral-designSkill
- chartingSkill
- storybookSkill
- uxSkill
- visual-designSkill
- ai-engineeringSkill
- code-qualitySkill
- confidenceSkill
- criticalSkill
- dxSkill
- eval-iterateSkill
- jev-assertSkill
- measurableSkill
- observe-runSkill
- optimize-approachSkill
- polishSkill
- pr-reviewSkill
- review-branchSkill
- review-loopSkill
- severitySkill
- tddSkill
- test-provenance-guardSkill
- verify-behaviorSkill
- e2e-pr-stabilizerSkill
- e2e-testing-mobileSkill
- ui-verifySkill
- autonomous-workflowSkill
- aw-create-planSkill
- aw-create-walkthroughSkill
- fix-bugSkill
- implement-suggestionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 8 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 23 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 56
Do not reach for this skill when:
- Distinctive: line 68
Before any agent loop, verify the repo is wired for Playwright Test Agents.
- Distinctive: line 71
Run these checks (read-only):
- Very specific: line 116
Run the Generator on specs/<flow>.md.
- Very specific: line 118
Run the Planner against the live app to draft specs/<flow>.md.
- Very specific: line 121
Use the Markdown template in templates/spec.md.
- Very specific: line 133
When the Healer cannot find a stable locator at rungs 1–2, propose a source diff that adds data-testid to the component, and offer the diff …
- Very specific: line 143
Do not enable --caps=vision unless an explicit pixel-level concern exists.
- Very specific: line 149
Run only the changed spec on iteration: npx playwright test --last-failed.
- Distinctive: line 150
Run the Healer only on failure, not on every save.
- Distinctive: line 158
After the Generator produces a test:
- Distinctive: line 160
Run the test once against the live app.
- Distinctive: line 168
If the heal loop fails to converge:
- Distinctive: line 171
If confidence is below 90%, escalate to the user with the trace, the spec, and the proposed locator changes — do not keep healing blindly.
“Common” is measured: kept by at least 6 in 10 of the 23 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
E2E Testing
Drive end-to-end tests through Playwright's MCP-backed Test Agents — Planner, Generator, Healer — released in Playwright 1.56 (Oct 2025). The user writes (or approves) a Markdown feature spec; agents generate the test, run it against a real browser via the accessibility tree, and self-heal when locators drift.
This
SKILL.mdis a thin index. Decision rules live inrules/*.mdand load on demand. Worked references (agent reference, MCP tool catalog, pyramid math) live inreferences/*.md. Literal boilerplate the skill emits lives intemplates/*.md. Do not preload everything — load only what the current phase asks for.
When to use
Reach for this skill when any of the following is true:
- A feature has user-facing flow that integration tests cannot fully cover.
- A bug repros only through real navigation (multi-page, auth, real network).
- A flake needs a Healer pass instead of a manual locator hunt.
- The repo has no
@playwright/mcpwiring yet and needs Phase 0 setup.
Do not reach for this skill when:
- A unit or component test would catch the same bug — defer to
tddand the layer rule inrules/layer-decision.md. - The change is a pure refactor with no behavioural surface.
- You are adding test infrastructure unrelated to a real flow.
Phase 0 — Preflight (mandatory gate)
Before any agent loop, verify the repo is wired for Playwright Test Agents. Halt and ask the user before installing anything.
Run these checks (read-only):
# 1. Playwright + MCP server installed?
jq '.devDependencies | keys[]' package.json | grep -E '@playwright/(test|mcp)'
# 2. Test-agent artefacts present?
ls specs/ tests/seed.spec.ts playwright.config.ts 2>/dev/nullDecision table:
| State | Action |
| Both deps present + artefacts exist | Proceed to Phase 1. |
| Deps missing | Halt. Print install plan, ask permission before running. |
| Deps present, artefacts missing | Halt. Print npx playwright init-agents --loop=claude, ask first. |
Playwright present but version < 1.56 | Halt. Test Agents require 1.56+. Ask permission to upgrade. |
Print the exact commands; do not run them silently.
The install plan template is in templates/install-plan.md.
Phase 1 — Spec-first feature flow
The agent loop is spec → generate → run → heal.
The spec is human-readable Markdown, not code.
Full rules: rules/spec-first-flow.md.
specs/<flow>.md ─┐
├─→ Generator ─→ tests/<flow>.spec.ts ─→ run ─→ pass?
│ │ no
│ ▼
└──────────────────── Healer ←────────────── failing test
│
▼
patched test or `data-testid` proposalTwo entry points:
- Spec already drafted by the user.
Skip the Planner.
Run the Generator on
specs/<flow>.md. - App exists, no spec yet.
Run the Planner against the live app to draft
specs/<flow>.md. User reviews the Markdown plan before generation.
Use the Markdown template in templates/spec.md.
Locator ladder (when generating or healing)
The Generator and the Healer both walk the accessibility tree. Pick locators in this order — never skip a rung:
getByRole('button', { name: 'Save' })— accessibility-tree native.getByLabel,getByPlaceholder,getByText— user-facing strings.getByTestId('save-draft')— escape hatch only.
data-testid is a source change, not a test workaround.
When the Healer cannot find a stable locator at rungs 1–2, propose a source
diff that adds data-testid to the component, and offer the diff for user
approval before patching the test.
Full rules and decision criteria: rules/locator-strategy.md.
Phase 2 — Token-aware execution
Playwright MCP defaults to snapshot mode (accessibility tree, text-only).
Do not enable --caps=vision unless an explicit pixel-level concern exists.
Full rules: rules/token-budget.md.
Defaults the skill prescribes:
- Snapshot mode (no vision) for all agent calls.
- Run only the changed spec on iteration:
npx playwright test --last-failed. - Run the Healer only on failure, not on every save.
- Reuse
storageStatefromtests/seed.spec.tsto skip auth on every run. - Cap the heal loop at three attempts per failing test before escalating.
Phase 3 — Verification
After the Generator produces a test:
- Run the test once against the live app. It must pass on first run, or the Healer must converge in ≤ 3 attempts.
- Invoke
test-provenance-guardon the generated file to ensure the test imports production code instead of a private re-implementation. - Open
playwright.config.tsand confirmtrace: 'on-first-retry'is set so a future failure produces a trace bundle.
If the heal loop fails to converge:
- Invoke
confidence(analysis)on the test failure. - If confidence is below 90%, escalate to the user with the trace, the spec, and the proposed locator changes — do not keep healing blindly.
Decision flow at a glance
| Signal | Do |
| Bug fixable by a unit or component test | Use tdd, not this skill. |
| Multi-page user flow, auth, or real network involved | Spec-first feature flow (Phase 1). |
| Flaky existing test | Healer pass only; do not rewrite without spec context. |
| Locator unstable, no stable role / label | Propose data-testid diff (rule: locator-strategy). |
| Repo missing Playwright or MCP | Phase 0 halt + ask permission. |
| Heal loop > 3 attempts | Stop, run confidence(analysis), escalate. |
| Test passes on first run, never seen failing | Run test-provenance-guard before declaring done. |
Composes with
tdd— owns the unit and component layers. This skill defers to it for anything below E2E.test-provenance-guard— runs after Generator output to catch tests-by-construction.confidence— gate when the heal loop fails.holistic-analysis— if a flow is failing for reasons no test rewrite can fix, step back instead of patching.playwright-trace-analyzer— consume the trace produced by a failed test on retry.
References
references/playwright-agents.md— Planner / Generator / Healer reference, inputs, outputs, invocation.references/mcp-tool-catalog.md— the@playwright/mcptool surface, grouped by category.references/pyramid-2026.md— testing pyramid math in 2026, with the AI-generation caveat.
Templates
templates/spec.md— feature-flow Markdown spec.templates/seed.spec.ts— auth and storage bootstrap, producesstorageState.templates/playwright.config.ts— opinionated config: snapshot mode, traces on first retry, projects per browser, parallel CI defaults.templates/install-plan.md— Phase 0 halt message with the exact commands to install Playwright + MCP.
Anti-patterns (one-liner — full list in rules/anti-patterns.md)
- Writing E2E for logic a unit test catches.
- Running the Healer on every save.
- Patching the test with brittle CSS selectors instead of proposing a
data-testiddiff. - Enabling
--caps=visionwithout a pixel-level requirement. - Ignoring Healer suggestions and keeping a
.skip()in CI. - Generating tests against a stub server, not the real app.
Definition of done
- Phase 0 preflight passed or installs were user-approved.
specs/<flow>.mdexists and the user reviewed it.tests/<flow>.spec.tspasses against the live app.test-provenance-guardreports no violations on the new test.playwright.config.tshastrace: 'on-first-retry'.- If a
data-testidwas added, it is in the source diff and committed.
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.

