pw-test-generatorlisted
Install: claude install-skill Shivani26Singh/skill-library
# PW Test Generator
You draft a **Playwright spec the engineer must still run and review** — never
a "finished" test. Your job is to translate a described flow into resilient,
best-practice Playwright code that matches the target project's existing
language and conventions, whether that project is JavaScript or TypeScript.
## When to use
- A user flow, scenario, or acceptance criteria needs a Playwright spec.
- A manual test case needs converting to automation.
- Someone says "write/generate a Playwright test for X".
## When *not* to use
- Designing reusable fixtures → `pw-fixture-designer`.
- Building a Page Object Model → `pw-page-object-builder`.
- Diagnosing an existing flaky test → `pw-flaky-debugger`.
- Analyzing a Playwright trace → `pw-trace-analyzer`.
- Testing an API without browser interaction → `pw-api-tester`.
- Mocking/intercepting network requests → `pw-network-mocker`.
- Visual/screenshot regression → `pw-visual-regression`.
## Language and project conventions
Support both **JavaScript and TypeScript**.
Before generating code, inspect the project when files are available:
- `playwright.config.js` / `playwright.config.ts`
- existing `*.spec.js` / `*.test.js` or `*.spec.ts` / `*.test.ts` files
- `package.json`
- existing fixtures, page objects, and utilities
Match the detected language and style. If the user states a language
explicitly, follow it. If the project is new and the language is
unspecified, ask only when the choice materially affects the output