.claude/skills/test-coverage/SKILL.md
Test coverage metrics and registry system for this Next.js application. Covers FEATURE_REGISTRY, FLOW_REGISTRY, TAGS_REGISTRY, and coverage metrics interpretation. Use this skill when evaluating test coverage, identifying gaps, or planning testing priorities.
npx skillsauth add NextSpark-js/nextspark test-coverageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Understand and use the test coverage registry system.
The registries are files that document what exists in the system and its test coverage state.
| Registry | Contents | Location | |----------|----------|----------| | FEATURE_REGISTRY | System features | /devtools/features | | FLOW_REGISTRY | User flows | /devtools/flows | | TAGS_REGISTRY | Test tags | /devtools/tags | | COVERAGE_SUMMARY | Aggregated metrics | testing-registry.ts |
Lists all system features with coverage state:
FEATURE_REGISTRY = {
'checkout': {
name: 'Checkout',
description: 'Purchase process',
entities: ['orders', 'payments'],
tests: ['checkout.cy.ts'],
coverage: 'full' // full | partial | none
},
'inventory': {
name: 'Inventory Management',
description: 'Stock management',
entities: ['inventory', 'warehouses'],
tests: [],
coverage: 'none'
}
}
| Coverage | Meaning |
|----------|---------|
| full | Has tests covering main flows |
| partial | Has some tests but gaps exist |
| none | No documented tests |
Lists user flows with coverage state:
FLOW_REGISTRY = {
'login': {
name: 'User Login',
steps: ['Visit login', 'Enter credentials', 'Submit', 'Redirect'],
entities: ['users', 'sessions'],
tests: ['auth/login.cy.ts'],
coverage: 'full'
},
'returns': {
name: 'Process Returns',
steps: ['Find order', 'Request return', 'Approve', 'Refund'],
entities: ['orders', 'returns', 'payments'],
tests: [],
coverage: 'none'
}
}
A flow without coverage means no automated tests verify that user path end-to-end.
Lists all test tags with distribution:
TAGS_REGISTRY = {
'@smoke': { count: 15, files: ['login.cy.ts', 'products.cy.ts'] },
'@uat': { count: 52, files: [...] },
'@api': { count: 75, files: [...] },
'@entity-products': { count: 20, files: ['products.cy.ts'] }
}
| Tag | Purpose | Typical Count | |-----|---------|---------------| | @smoke | Critical quick tests | 10-20 | | @uat | User acceptance tests | 40-60% | | @api | API tests | 30-50% | | @entity-X | Per entity | Varies | | @flow-X | Per flow | Varies | | @critical | Business critical | 5-15 |
Aggregated coverage metrics:
COVERAGE_SUMMARY = {
features: {
total: 25,
covered: 20,
partial: 3,
none: 2,
percentage: 80
},
flows: {
total: 15,
covered: 10,
percentage: 67
},
entities: {
total: 12,
withApiTests: 12,
withUatTests: 10,
percentage: 100
}
}
| Type | What It Measures | Example | |------|------------------|---------| | Technical | If a test exists | "There are 5 tests for products" | | Functional | If test verifies correctly | "Tests validate business rules" |
Feature: Products
Tests: 10
Technical coverage: 100% ✓
But...
- Do tests verify validations?
- Do tests cover edge cases?
- Do tests check permissions?
Functional coverage: ??? (requires manual analysis)
IMPORTANT: Registry coverage metrics are TECHNICAL. They don't indicate test quality.
coverage: 'none'Metrics help identify areas without tests, but prioritization must consider:
| Factor | Who Evaluates | |--------|---------------| | Business criticality | QA + PM | | Bug history | QA | | Release proximity | QA + Dev | | Available resources | QA + Management |
## Coverage Status - Sprint 15
- Features covered: 80% (20/25)
- Flows covered: 67% (10/15)
- Critical gaps identified:
- Feature: inventory (no tests)
- Flow: returns (no tests)
/devtools/features/devtools/flows/devtools/tagsapps/dev/.nextspark/registries/testing-registry.ts| Command | Description |
|---------|-------------|
| /coverage:status | View overall status |
| /coverage:gaps | Identify gaps |
Not necessarily. 100% technical coverage means tests exist, not that they're good or complete.
Not necessarily. Some areas may not need automated tests, or may be covered by manual testing.
/coverage:gapsYOU decide how to interpret these metrics and what to prioritize based on business context.
development
Zod validation patterns for this Next.js application. Covers schema definition, API validation, form integration, error formatting, and type inference. Use this skill when implementing validation for APIs, forms, or entity schemas.
development
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
development
TanStack Query (React Query) patterns for data fetching in this Next.js application. Covers useQuery, useMutation, optimistic updates, cache invalidation, and anti-patterns. Use this skill when implementing data fetching or state management with server data.
development
Tailwind CSS theming system for this Next.js application. Covers CSS variables, semantic tokens, dark mode, buildSectionClasses, and theme build process. Use this skill when implementing UI styling or working with theme configurations.