Analyze code coverage metrics and identify untested code paths. Use when analyzing untested code or coverage gaps. Trigger with phrases like "analyze coverage", "check test coverage", or "find untested code".
npx claudepluginhub flight505/skill-forge --plugin test-coverage-analyzerThis skill is limited to using the following tools:
!`ls package.json pyproject.toml Cargo.toml go.mod 2>/dev/null || echo 'No project manifest found'`
Applies Acme Corporation brand guidelines including colors, fonts, layouts, and messaging to generated PowerPoint, Excel, and PDF documents.
Enforces four-phase systematic debugging: root cause investigation via error reading, reproduction, change checks, and multi-component logging before any fixes for bugs, tests, or issues.
Share bugs, ideas, or general feedback.
!ls package.json pyproject.toml Cargo.toml go.mod 2>/dev/null || echo 'No project manifest found'
!node -v 2>/dev/null || python3 --version 2>/dev/null || echo 'No runtime detected'
Analyze code coverage metrics to identify untested code paths, dead code, and coverage gaps across line, branch, function, and statement dimensions. Supports Istanbul/nyc (JavaScript/TypeScript), coverage.py (Python), JaCoCo (Java), and Go coverage tools.
go test -cover)npx jest --coverage --coverageReporters=json-summary,lcovpytest --cov=src --cov-report=json --cov-report=term-missinggo test -coverprofile=coverage.out ./...if/else blocks where only one branch is tested.switch/case statements with missing case coverage.catch, except) never exercised.|| and && short-circuit conditions..coveragerc, or CI checks).| Error | Cause | Solution |
|---|---|---|
| Coverage report shows 0% | Tests ran but coverage instrumentation was not enabled | Verify --coverage flag is passed; check that source files are not excluded by config |
Coverage includes node_modules | Coverage collection scope too broad | Add collectCoverageFrom in Jest config; set --cov=src in pytest; exclude vendor dirs |
| Branch coverage much lower than line coverage | Conditional logic is only partially tested | Write tests for both truthy and falsy conditions on each branch; focus on edge cases |
| Coverage drops after refactor | New code added without corresponding tests | Set coverageThreshold with global minimums; add --changedSince for incremental checks |
| Flaky coverage numbers between runs | Non-deterministic test execution skipping code paths | Sort tests deterministically; run coverage with --runInBand for consistent results |
Jest coverage configuration with thresholds:
{
"jest": {
"coverageThreshold": {
"global": {
"branches": 70,
"functions": 80,
"lines": 80,
"statements": 80
},
"src/utils/": {
"branches": 90,
"lines": 95
}
},
"collectCoverageFrom": [
"src/**/*.{ts,tsx}",
"!src/**/*.d.ts",
"!src/**/index.ts"
]
}
}
Coverage gap analysis output:
Coverage Gaps (sorted by impact):
1. src/auth/oauth.ts Lines: 45% Branches: 30% [Lines 42-67, 89-103 uncovered]
Suggestion: Add tests for token refresh failure and expired session handling
2. src/api/middleware.ts Lines: 62% Branches: 41% [Lines 28-35, 71-80 uncovered]
Suggestion: Test rate limiting edge cases and malformed header handling
3. src/utils/parser.ts Lines: 71% Branches: 55% [Lines 112-130 uncovered]
Suggestion: Test malformed input, empty string, and encoding edge cases