Skip to content
Skills Library
Programming · Testing

write-e2e-tests

/write-e2e-tests

Use when the user wants browser UI e2e as a Playwright Test spec — converting a completed cuawright-web run, or unblocking a missing Playwright toolchain or cuawright-web run first. Not for API-level end-to-end tests.

Licence
MIT
Last repository change
27.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
6
Scripts
1
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/scan-secrets.sh

What it does and when to use it

Use when the user wants browser UI e2e as a Playwright Test spec — converting a completed cuawright-web run, or unblocking a missing Playwright toolchain or cuawright-web run first. Not for API-level end-to-end tests.

Original author description

Use when the user wants browser UI e2e as a Playwright Test spec — converting a completed cuawright-web run, or unblocking a missing Playwright toolchain or cuawright-web run first. Not for API-level end-to-end tests.

How it works

  1. Scope
  2. Workflow
Original SKILL.md headings · 78 lines, 560 words
SKILL.md preview
---
name: write-e2e-tests
description: >-
  Use when the user wants browser UI e2e as a Playwright Test spec —
  converting a completed cuawright-web run, or unblocking a missing
  Playwright toolchain or cuawright-web run first. Not for API-level end-to-end
  tests.
license: MIT
metadata:
  capabilities: shell, network, installs-tools, browser, runs-repo-commands
---

# Write E2E Tests

Turns a browser UI flow into a checked-in Playwright Test spec.
[CUAWright](https://github.com/microsoft/CUAWright) is the exploration engine:
it produces `plan.md` and `final_script.py`. This skill unblocks a missing
toolchain or run after confirmation, then converts.

## Scope

The output is always a Playwright Test spec — no per-project detection of
another framework, no cross-framework translation. An existing Cypress or
Selenium suite stays; confirm before adding Playwright beside it.

## Workflow

1. **Inventory.** In the target project, mark each of these present or
   absent: a JS package manifest and its package manager; `@playwright/test`
   and `playwright.config`; the cuawright-web skill; a qualifying run; another
   e2e stack (Cypress, Selenium); existing CI files; cuawright-web artifact
   paths git still tracks. CUAWright is present when the session's
   skill list names `cuawright-web` (or legacy `webwright`), bare or
   plugin-prefixed. Leave this step when every item is marked.
   No package manifest — stop and report.

2. **Toolchain.** If Playwright, browsers, or cuawright-web are missing, confirm
   once for those items and follow
   [references/setup.md](references/setup.md). Another e2e stack without
   Playwright — confirm adding Playwright beside it.

3. **Find a qualifying run.** Search `outputs/`, `final_runs/`, and any
   path the user named for `plan.md` plus `final_script.py` whose
   Critical Points are all checked. Found — show the path and reuse it
   unless the user asks to re-run. Otherwise go to *explore*.

4. **Explore.** Confirm on its own before driving the real site. If the
   user has not named the flow, ask. Invoke the `cuawright-web` skill and
   run it to Done. Leave this step when cuawright-web reports Done and a
   qualifying run from step 3 is on disk. Reading source is not
   Explore. Convert is the next step. Exploration stays in cuawright-web.

5. **Repo — gitignore.** Propose `.gitignore` rules when unignored
   cuawright-web artifacts exist (`outputs/`, `final_runs/`, screenshots/logs)
   or this run just scaffolded Playwright (`test-results/`,
   `playwright-report/`). Write only after confirmation. Add rules only;
   do not `git rm --cached` already-tracked files.

6. **Convert.** Start only when step 3's `plan.md` and `final_script.py`
   exist; missing — return to Explore. How to handle a scan hit is in
   [references/security.md](references/security.md).
   - **Scan input.** Run `scripts/scan-secrets.sh` on `final_script.py`.
     Non-zero exit: follow that doc. A visual read of the script is not
     a scan. Draft only after the scan exits 0, or after every hit has a
     confirmed `process.env` mapping.
   - **Map and draft.** Map each Critical Point in `plan.md` one-to-one to an
     `expect()` assertion; that mapping is the whole of the conversion.
     Use `final_script.py` for selectors and action order only. Write
     credential fields as `process.env` names; leave selectors and
     non-credential fixtures as literals.
   - **Scan output.** Run `scripts/scan-secrets.sh` on the drafted spec
     before writing it. Non-zero exit: follow that doc. Write only a spec
     the script accepts.
   Place the spec in the project's existing e2e test directory (its
   Playwright config's `testDir`, or the project's established
   convention), named after the flow being converted.

7. **Validate.** Run all three gates, in order:
   - **Run** — execute the generated spec once; it passes.
   - **Stable** — re-run it 3 consecutive times; all 3 pass.
   - **Discoverable** — the project's test-run command finds the new spec
     file. A remote pipeline is not required.
   On failure, attempt an automatic fix and re-validate, up to 2 attempts.
   Still failing after that — stop and report. Hand back only a spec that
   has passed all three gates.

8. **Repo — CI.** After Validate, follow
   [references/ci.md](references/ci.md). Write only after confirmation.
Files in this package (6)
  • SKILL.md 4 KB
  • skill.oms.sig 13 KB
  • references/ci.md 2 KB
  • references/security.md 1 KB
  • references/setup.md 2 KB
  • scripts/scan-secrets.sh 3 KB

Versions

RepositoryScoreLicence
This page · akunzai/agent-skills90MIT
zjunlp/skills100MIT

Database snapshot: 13.11.2026 · package version f7c7f74454a2 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100cuawright-web
    Solve a user-specified web task code-as-action style by driving a local Playwright browser through one bash command at a time, saving screenshots and an action log into `final_runs/run_<id>/`, and visually verifying the result. Use when the user asks to automate a web task…
  • 95playwright-test
    Creates Playwright browser-based end-to-end tests for Next.js pages covering complete user journeys from start to finish. Use when the user asks to "write Playwright tests", "create e2e tests", "write integration tests", "test in the browser", or mentions end-to-end testing,…
  • 100e2e-playwright-testing
    End-to-end testing with Playwright for web applications. Use when writing E2E tests, browser automation, form submission testing, or user flow testing. Triggers on "playwright", "e2e test", "browser test", "end-to-end", "form flow testing", or test files in tests/e2e/.
  • 100playwright-test-writer
    Write or extend Playwright end-to-end tests for a web page or feature. Use when the user asks to add, write, improve or fix Playwright, e2e or browser tests.
  • 95memstack-development-webapp-testing
    Use when the user says 'write browser tests', 'test this page', 'playwright test', 'e2e test', 'end to end test', 'browser test', 'test the UI', or needs Playwright-based browser testing for a web application. Do NOT use for unit tests, API tests, or non-browser testing.
  • 100playwright-test
    Creates browser-based end-to-end tests for a Go web application (templ + htmx) with Playwright for Go, covering complete user journeys from start to finish. The tests are Go tests behind the `e2e` build tag and run with `go test`. Use when the user asks to "write Playwright…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.