Back to Skills

test-coverage

verified

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".

View on GitHub

Marketplace

mag-claude-plugins

MadAppGang/claude-code

Plugin

dev

development

Repository
Verified Org

MadAppGang/claude-code
219stars

plugins/dev/skills/test-coverage/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/MadAppGang/claude-code/blob/main/plugins/dev/skills/test-coverage/SKILL.md -a claude-code --skill test-coverage

Installation paths:

Claude
.claude/skills/test-coverage/
Powered by add-skill CLI

Instructions

# 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**:
```typescript
function divide(a: number, b: number): number {
  if (b === 0) {              // Line 1: COVERED
    throw new Error('Div 0'); // Line 2: NOT COVERED
  }
  return a / b;               // Line 3: COVERED
}

// Test only covers normal case
test('divides numbers', () => {
  expect(divide(10, 2)).toBe(5);
});

// Line Coverage: 66% (2/3 lines)
```

**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**:
```typescript
function getUserStatus(user: User): string {
  if (user.isActive) {     // Branch 1: true (COVERED)
    if (user.isPremium) {  // Branch 2: true (NOT COVERED)
      return 'premium';    // NOT COVERED
    }
    return 'active';       // COVERED
  }
  return 'inactive';       // Branch 1: false (NOT COVERED)
}

// Test only covers active non-pre

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
18338 chars