/playwright-automation:analyze-test-codebasefrom playwright-automation
Scans and reports on an existing Playwright test codebase. This skill should be used to inspect the current Playwright setup before writing, reviewing, or fixing tests, and should be loaded early when working in a new project to understand existing patterns. Covers: Playwright config, page objects, fixtures, helpers, auth/globalSetup patterns, test conventions, and directory structure. Triggers: "understand", "check", "show me", "inspect", or "analyze" the current test setup, config, infrastructure, patterns, or conventions. In the full add-tests workflow, this skill serves as an early read-only analysis sub-step before planning detailed coverage or writing code. This skill examines existing files and outputs a structured report. It does NOT write or fix tests, install Playwright, or explore live websites — for live-site exploration, use `capture-feature-evidence` so evidence is captured in `docs/qa/exploration-report.md`.
Ships in playwright-automation. 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.
Scan and analyze an existing Playwright test codebase to understand its conventions, configuration, and patterns before writing new tests.
Locate Playwright configuration — search for playwright.config.ts, playwright.config.js, or playwright.config.mjs in the project root and common subdirectories.
Extract configuration details:
baseURL — the target application URLtestDir — where tests liveprojects — browser/device configurationsuse — default options (viewport, headless, trace, screenshot)webServer — if Playwright starts the appglobalSetup / globalTeardown — auth or data seeding scriptsreporter — configured reportersScan test directory structure:
Glob for **/*.spec.ts, **/*.test.ts, **/*.spec.js, **/*.test.js
.spec.ts vs .test.ts)Detect patterns in existing tests — read 2-3 representative test files and identify:
getByRole, getByTestId, CSS selectors, XPathwaitFor*, any waitForTimeout (flag these)test.stepstorageState, global setup, per-test logintest with custom fixturespage.route() usage, HAR recording (routeFromHAR), API interceptorstoHaveScreenshot(), toMatchSnapshot(), snapshot directories@axe-core/playwright usage, custom a11y assertionsretries count, trace settings (on-first-retry)fullyParallel, workers count, test isolation strategyCheck for supporting infrastructure:
fixtures/ or helpers/ directoriespages/ or pom/ (Page Object Model).env or .env.test files (test-specific environment configuration).github/workflows/, Jenkinsfile, etc.)package.json scripts for running tests*.har files or HAR directories (recorded API responses for mocking)__snapshots__, screenshots/) for visual regression baselinesdocker-compose for test environment setupGenerate report — output a structured summary:
## Test Codebase Analysis
### Framework
- **Playwright** version X.Y.Z
- Config: `playwright.config.ts`
- Test directory: `tests/`
### Conventions
- File naming: `*.spec.ts`
- Locator preference: getByRole > getByTestId
- Structure: describe blocks by feature
- Page Objects: Yes, in `tests/pages/`
- Custom fixtures: Yes, in `tests/fixtures/`
### Auth
- Method: storageState via global setup
- Auth file: `tests/.auth/user.json`
### Existing Coverage
- Total test files: N
- Feature areas covered: [list]
- Test count: ~N tests
### Network Mocking
- Method: page.route() / HAR / none
- Patterns: [list any existing mocking patterns]
### Visual Testing
- Enabled: Yes/No
- Tool: toHaveScreenshot() / third-party / none
- Baseline directory: [path if exists]
### Accessibility Testing
- Enabled: Yes/No
- Tool: @axe-core/playwright / custom assertions / none
### Cross-Browser & CI
- Browser projects: [list from config]
- Retries: N (CI) / N (local)
- Workers: N / fullyParallel: Yes/No
- CI platform: GitHub Actions / Jenkins / none detected
- Trace: [setting from config]
### Recommendations for New Tests
- Follow existing `*.spec.ts` naming
- Use page objects from `tests/pages/`
- Import test data from `tests/fixtures/testData.ts`
- Use `baseURL` for navigation (relative paths)
- Auth: reuse existing storageState setup
This skill only reads and reports on the codebase. For related tasks, use the appropriate skill:
| Task | Skill |
|---|---|
| Shared live-site exploration and evidence capture | capture-feature-evidence |
| Deciding what to test, coverage gaps, priorities | plan-test-coverage |
| Writing or modifying executable test code | write-test-code |
| Diagnosing flaky or failing tests | fix-flaky-tests |
/analyze-test-codebase
/analyze-test-codebase ./my-app
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lespaceman/athena-workflow-marketplace --plugin playwright-automation5 skills in this plugin
/add-playwright-testsTHE DEFAULT ENTRY POINT for the Playwright execution layer in the split testing suite. Use to add, create, or set up Playwright end-to-end tests for a feature, page, or application. It orchestrates the full Playwright workflow after shared exploration and planning: analyze the Playwright codebase, consume `docs/qa/feature-map.md`, `docs/qa/exploration-report.md`, `docs/qa/coverage-plan.md`, and `docs/qa/test-cases/*.md`, write production-grade test code, review it, and verify it with real execution. Delegates to `analyze-test-codebase`, `write-test-code`, `review-test-code`, and `fix-flaky-tests`, while relying on shared `map-feature-scope`, `capture-feature-evidence`, `plan-test-coverage`, `generate-test-cases`, and `review-test-cases`.
/fix-flaky-testsThis skill should be used when a Playwright test is failing, flaky, timing out, or behaving inconsistently. It provides structured root cause analysis for: stabilizing intermittent tests, debugging timeouts ("Test timeout of 30000ms exceeded"), fixing race conditions, investigating local-vs-CI divergence, running repeated stability checks (--repeat-each). IMPORTANT: If running tests with --repeat-each, --retries, or multiple times to check stability, STOP and load this skill first — it has structured root cause analysis that prevents brute-force approaches. Triggers: "stabilize", "intermittent", "flaky", "keeps failing", "fails in CI", "timeout on", "race condition", "run N times to check stability", "verify tests are stable". NOT for writing new tests (use write-test-code) or analyzing setup (use analyze-test-codebase).