Skip to content
Back to skills

Collection

ASecurity

Generate comprehensive test coverage reports when reviewing code. Identifies untested code paths and low-coverage areas. Supports Python (pytest-cov), JavaScript (jest), Go (go test -cover), Java (JaCoCo). Use when reviewing tests or before approving code changes.

  • 24 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
developmentjavascriptpythongojavashellbashdocumentation

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-36994eb2/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-36994eb2)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test-coverage
description: "Generate comprehensive test coverage reports when reviewing code. Identifies untested code paths and low-coverage areas. Supports Python (pytest-cov), JavaScript (jest), Go (go test -cover), Java (JaCoCo). Use when reviewing tests or before approving code changes."
version: 1.0.0
allowed-tools: [Bash, Read]
---

# Test Coverage Analysis Skill

You are the test-coverage skill. When invoked, you run appropriate coverage tools based on project language and generate structured coverage reports.

## When to Invoke This Skill

**Invoke this skill when:**
- Tech Lead is reviewing test files
- Before approving code changes or pull requests
- Developer claims "added tests"
- Before merging to main branch
- Checking if coverage meets project standards

**Do NOT invoke when:**
- No tests exist in the project
- Just viewing code (not reviewing for approval)
- Emergency hotfix (skip coverage check)
- Documentation-only changes

---

## Your Task

When invoked:
1. Execute the test coverage script
2. Read the generated coverage report
3. Return a summary to the calling agent

---

## Step 1: Execute Coverage Script

Use the **Bash** tool to run the pre-built coverage script.

**On Unix/macOS:**
```bash
bash .claude/skills/test-coverage/scripts/coverage.sh
```

**On Windows (PowerShell):**
```powershell
pwsh .claude/skills/test-coverage/scripts/coverage.ps1
```

> **Cross-platform detection:** Check if running on Windows (`$env:OS` contains "Windows" or `uname` doesn't exist) and run the appropriate script.

This script will:
- Detect project language (Python, JavaScript, Go, Java)
- Auto-install required tools (pytest-cov, jest, etc.) if needed
- Run coverage analysis
- Parse results
- Generate `bazinga/artifacts/{SESSION_ID}/skills/coverage_report.json`

---

## Step 2: Read Generated Report

Use the **Read** tool to read:

```bash
bazinga/artifacts/{SESSION_ID}/skills/coverage_report.json
```

Extract key information:
- `overall_coverage` - Total line coverage percentage
- `files_below_threshold` - Files with coverage < 80%
- `critical_uncovered_paths` - Important code without tests

---

## Step 3: Return Summary

Return a concise summary to the calling agent:

```
Test Coverage Report:
- Overall coverage: {percentage}%
- Files below 80% threshold: {count} files
- Critical areas with low coverage:
  - {file1}: {percentage}% coverage
  - {file2}: {percentage}% coverage

Details saved to: bazinga/artifacts/{SESSION_ID}/skills/coverage_report.json
```

---

## Example Invocation

**Scenario: Reviewing PR with New Authentication Tests**

Input: Tech Lead reviewing PR #123 with new auth module tests

Expected output:
```
Test Coverage Report:
- Overall coverage: 78%
- Files below 80% threshold: 2 files
- Critical areas with low coverage:
  - auth.py: 68% coverage (uncovered lines: 45-52, 89-103)
  - payment.py: 52% coverage (uncovered lines: 23, 45-78)

Details saved to: bazinga/artifacts/{SESSION_ID}/skills/coverage_report.json
```

**Scenario: Full Coverage Achieved**

Input: Tech Lead final review before merge

Expected output:
```
Test Coverage Report:
- Overall coverage: 94%
- Files below 80% threshold: 0 files
- All critical code paths covered

Details saved to: bazinga/artifacts/{SESSION_ID}/skills/coverage_report.json
```

---

## Error Handling

**If coverage tool not installed:**
- Script attempts auto-installation
- Falls back gracefully if installation fails
- Returns partial report with error note

**If no tests found:**
- Return: "No tests found in project. Cannot generate coverage report."

**If tests fail:**
- Return: "Tests failed. Coverage report not generated. Fix failing tests first."

---

## Notes

- The script (260+ lines) handles all language detection and tool execution
- Supports both bash (Linux/Mac) and PowerShell (Windows)
- Graceful degradation when tools unavailable
- Focuses on line coverage as primary metric
- Excludes test files, generated code, and config from coverage analysis

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.