madappgang/claude-code/test-coverage
Claude Code and agent skill by madappgang/claude-code
- community
Checking that the SKILL.md file is still in the repository.
On-demand test coverage analysis. Use when identifying untested code, finding test gaps, measuring coverage metrics, or improving test quality. Trigger keywords - "test coverage", "coverage report", "untested code", "test gaps", "missing tests", "coverage metrics".
Install
npx vskill@latest install madappgang/claude-code/test-coverageSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Test Coverage Skill
Overview
The test-coverage skill provides comprehensive on-demand test coverage analysis for your codebase. It identifies untested code paths, measures coverage metrics, finds test gaps, evaluates test quality, and provides actionable recommendations for improving test coverage across all supported technology stacks.
When to Use:
- Measuring current test coverage
- Identifying untested critical code paths
- Finding gaps before deployment
- Improving test suite quality
- Compliance requirements (80% coverage)
- Refactoring with confidence
- Onboarding new team members
Technology Coverage:
- React/TypeScript/JavaScript (Jest, Vitest, React Testing Library)
- Go (go test with coverage)
- Rust (cargo test with tarpaulin)
- Python (pytest with coverage.py)
- Full-stack applications
Coverage Metrics
1. Line Coverage
Definition: Percentage of executable lines that are executed by tests.
Example:
Interpretation:
- 100%: All lines executed (ideal for critical code)
- 80-99%: Good coverage, some edge cases missed
- 60-79%: Moderate, needs improvement
- <60%: Poor, significant gaps
2. Branch Coverage
Definition: Percentage of decision branches (if/else, switch, ternary) that are tested.
Example:
Why Important: Higher than line coverage, catches edge cases.
3. Function Coverage
Definition: Percentage of functions that are called at least once in tests.
Example:
Red Flag: Exported functions with 0% coverage.
4. Statement Coverage
Definition: Percentage of statements executed (similar to line coverage but more granular).
Difference from Line Coverage:
Use Case: More precise for minified or compact code.
Gap Analysis
Identifying Untested Code
Priority Levels:
CRITICAL (Must Test):
- Authentication and authorization logic
- Payment processing
- Data validation
- Security checks
- Error handling
- Database transactions
HIGH (Should Test):
- Business logic
- API endpoints
- Data transformations
- State management
- Integration points
MEDIUM (Nice to Test):
- Utility functions
- Formatters
- Constants
- Simple getters/setters
LOW (Optional):
- Type definitions
- Configuration files
- Mock data
Gap Report Format
// CRITICAL: No tests for password reset flow async resetPassword(email: string): Promise<void> { const user = await this.userRepo.findByEmail(email); if (!user) { throw new NotFoundError('User not found'); // UNTESTED } const token = generateResetToken(); // UNTESTED await this.emailService.sendResetEmail( // UNTESTED user.email, token ); }
// CRITICAL: No tests for token expiry validateResetToken(token: string): boolean { const decoded = jwt.verify(token, SECRET); if (Date.now() > decoded.exp) { // UNTESTED return false; } return true; }
async processPayment(order: Order): Promise<PaymentResult> { try { const charge = await stripe.charges.create({ // TESTED amount: order.total, currency: 'usd', source: order.paymentToken });
if (charge.status === 'failed') { // UNTESTED await this.handleFailedPayment(order); // UNTESTED throw new PaymentError('Payment failed'); }
await this.fulfillOrder(order); // TESTED return { success: true, chargeId: charge.id }; } catch (error) { if (error.code === 'card_declined') { // UNTESTED await this.notifyCardDeclined(order); // UNTESTED } throw error; // UNTESTED } }
validateUserData(data: UserInput): ValidationResult { const errors: string[] = [];
if (!data.email || !data.email.includes('@')) { // Partially tested errors.push('Invalid email'); }
if (data.password.length < 8) { // UNTESTED errors.push('Password too short'); }
if (!/[A-Z]/.test(data.password)) { // UNTESTED errors.push('Password needs uppercase'); }
if (!/[0-9]/.test(data.password)) { // UNTESTED errors.push('Password needs number'); }
return { valid: errors.length === 0, errors }; }
async getUser(req: Request, res: Response) { try { const user = await this.userService.getById(req.params.id); res.json(user); // TESTED } catch (error) { if (error instanceof NotFoundError) { // UNTESTED res.status(404).json({ error: 'Not found' }); } else if (error instanceof ValidationError) { // UNTESTED res.status(400).json({ error: error.message }); } else { res.status(500).json({ error: 'Server error' }); // UNTESTED } } }
Module Coverage Breakdown:
├── src/auth/ 34% (CRITICAL - needs work) ├── src/payments/ 41% (CRITICAL - needs work) ├── src/users/ 62% (below target) ├── src/api/handlers/ 59% (below target) ├── src/services/ 72% (above target ✓) ├── src/utils/ 84% (good ✓) ├── src/database/ 91% (excellent ✓) └── src/components/ 77% (good ✓)
Overall: 68% Target: 80% Gap: -12%
// BAD: No assertion test('creates user', async () => { await createUser({ name: 'John' }); });
// GOOD: Verify behavior test('creates user', async () => { const user = await createUser({ name: 'John' }); expect(user.id).toBeDefined(); expect(user.name).toBe('John'); });
// BAD: Always passes test('validates email', () => { const result = validateEmail('test@example.com'); expect(result).toBeTruthy(); // Any truthy value passes });
// GOOD: Specific assertion test('validates email', () => { expect(validateEmail('test@example.com')).toBe(true); expect(validateEmail('invalid')).toBe(false); });
// BAD: Mocks everything, tests nothing jest.mock('../UserService');
// GOOD: Mock only external dependencies jest.mock('../EmailService'); // UserService tested with real implementation
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/dev/skills/test-coverage/SKILL.md
Popularity
- Repository stars
- 274
- Repository forks
- 32
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 7 May 2026, 6 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/madappgang/claude-code/test-coverage)