coverage
alirezarezvani/claude-skills
Analyze test coverage gaps. Use when user says "test coverage", "what's not tested", "coverage gaps", "missing tests", "coverage report", or "what needs testing".
...Expand allAbout coverage
This skill analyzes test-coverage gaps in an application, focused on end-to-end/Playwright testing. It solves the problem of not knowing what is actually tested by mapping all testable surfaces (routes, components, API endpoints, and critical user flows) and comparing them against the tests that already exist, so teams can see where their coverage is thin.
The workflow uses an Explore subagent to catalog routes and pages (Next.js app directory, React Router, Vue Router, etc.), interactive components, and API endpoints, then scans existing `*.spec.ts`/`*.spec.js` files to determine which pages, components, and endpoints are exercised. It produces a coverage matrix table with covered/partial/missing status, prioritizes uncovered areas by business impact (critical, high, medium, low), and suggests a concrete test plan with the number of tests needed, a recommended template, and an effort estimate. It can optionally auto-generate tests for the top gaps by invoking a companion `/pw:generate` command.
It targets QA engineers and developers using Playwright who want a structured, prioritized view of coverage rather than a raw percentage. It reads source and test files and can trigger test generation, but its own analysis is read-only inspection of the codebase and produces reports and recommendations.
FAQ
What does this skill do?
It maps an application's routes, components, API endpoints, and user flows, compares them to existing tests, and produces a prioritized coverage matrix and test plan.
What testing framework is it built around?
Playwright end-to-end tests; it scans *.spec.ts / *.spec.js files and integrates with a companion /pw:generate command.
How does it prioritize gaps?
By business impact: critical areas like auth and payments first, then user-facing CRUD and navigation, then settings and edge cases, then low-value static pages.
Can it write the missing tests?
Optionally. After reporting gaps it can ask whether to generate tests for the top N gaps and invoke /pw:generate with a recommended template.
Does it modify code during analysis?
The coverage analysis itself is read-only; it inspects route definitions, components, and spec files. Test generation is a separate, opt-in step.
Map all testable surfaces in the application and identify what's tested vs. what's missing.
Steps
1. Map Application Surface
Use the Explore subagent to catalog:
Routes/Pages:
- Scan route definitions (Next.js
app/, React Router config, Vue Router, etc.) - List all user-facing pages with their paths
Components:
- Identify interactive components (forms, modals, dropdowns, tables)
- Note components with complex state logic
API Endpoints:
- Scan API route files or backend controllers
- List all endpoints with their methods
User Flows:
- Identify critical paths: auth, checkout, onboarding, core features
- Map multi-step workflows
2. Map Existing Tests
Scan all *.spec.ts / *.spec.js files:
- Extract which pages/routes are covered (by
page.goto()calls) - Extract which components are tested (by locator usage)
- Extract which API endpoints are mocked or hit
- Count tests per area
3. Generate Coverage Matrix
## Coverage Matrix| Area | Route | Tests | Status ||---|---|---|---|| Auth | /login | 5 | ✅ Covered || Auth | /register | 0 | ❌ Missing || Auth | /forgot-password | 0 | ❌ Missing || Dashboard | /dashboard | 3 | ⚠️ Partial (no error states) || Settings | /settings | 0 | ❌ Missing || Checkout | /checkout | 8 | ✅ Covered |4. Prioritize Gaps
Rank uncovered areas by business impact:
- Critical — auth, payment, core features → test first
- High — user-facing CRUD, search, navigation
- Medium — settings, preferences, edge cases
- Low — static pages, about, terms
5. Suggest Test Plan
For each gap, recommend:
- Number of tests needed
- Which template from
templates/to use - Estimated effort (quick/medium/complex)
## Recommended Test Plan### Priority 1: Critical1. /register (4 tests) — use auth/registration template — quick2. /forgot-password (3 tests) — use auth/password-reset template — quick### Priority 2: High3. /settings (4 tests) — use settings/ templates — medium4. Dashboard error states (2 tests) — use dashboard/data-loading template — quick6. Auto-Generate (Optional)
Ask user: "Generate tests for the top N gaps? [Yes/No/Pick specific]"
If yes, invoke /pw:generate for each gap with the recommended template.
Output
- Coverage matrix (table format)
- Coverage percentage estimate
- Prioritized gap list with effort estimates
- Option to auto-generate missing tests
Install coverage
Download and extract the skill files to your .claude/skills/ directory.
Download ZIPClone the repository and copy the skill files to your project.
git clone https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/playwright-pro/skills/coverage/SKILL.md # Copy SKILL.md to your .claude/skills/ directory
Copy





Home
