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.
You are the test-coverage skill. When invoked, you run appropriate coverage tools based on project language and generate structured coverage reports.
Invoke this skill when:
Do NOT invoke when:
When invoked:
Use the Bash tool to run the pre-built coverage script.
On Unix/macOS:
bash .claude/skills/test-coverage/scripts/coverage.sh
On Windows (PowerShell):
pwsh .claude/skills/test-coverage/scripts/coverage.ps1
Cross-platform detection: Check if running on Windows (
$env:OScontains "Windows" orunamedoesn't exist) and run the appropriate script.
This script will:
bazinga/artifacts/{SESSION_ID}/skills/coverage_report.jsonUse the Read tool to read:
bazinga/artifacts/{SESSION_ID}/skills/coverage_report.json
Extract key information:
overall_coverage - Total line coverage percentagefiles_below_threshold - Files with coverage < 80%critical_uncovered_paths - Important code without testsReturn 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
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
If coverage tool not installed:
If no tests found:
If tests fail: