Back to Skills

Coverage

>-

$ npx promptcreek add coverage

Auto-detects your installed agents and installs the skill to each one.

What This Skill Does

This skill helps developers analyze test coverage gaps in their applications. It maps testable surfaces, identifies what's tested versus what's missing, and suggests a prioritized test plan to address gaps, focusing on areas with the highest business impact.

When to Use

  • Identify untested routes in a Next.js application.
  • Determine which components lack sufficient test coverage.
  • Prioritize testing efforts based on business criticality.
  • Generate a coverage matrix for a specific feature.
  • Suggest the number of tests needed for uncovered areas.
  • Recommend test templates for specific coverage gaps.

Key Features

Maps application surfaces including routes, components, and APIs.
Scans existing tests to determine coverage.
Generates a coverage matrix to visualize tested vs. untested areas.
Prioritizes gaps based on business impact (critical, high, medium, low).
Suggests a test plan with the number of tests needed.
Recommends specific test templates for each gap.

Installation

Run in your project directory:
$ npx promptcreek add coverage

Auto-detects your installed agents (Claude Code, Cursor, Codex, etc.) and installs the skill to each one.

View Full Skill Content

Analyze Test Coverage Gaps

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: Critical

  • /register (4 tests) — use auth/registration template — quick
  • /forgot-password (3 tests) — use auth/password-reset template — quick

Priority 2: High

  • /settings (4 tests) — use settings/ templates — medium
  • Dashboard error states (2 tests) — use dashboard/data-loading template — quick

6. 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
0Installs
0Views

Supported Agents

Claude CodeCursorCodexGemini CLIAiderWindsurfOpenClaw

Details

License
MIT
Source
seeded
Published
3/17/2026

Related Skills