Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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".
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 59% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 51% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 36% | 0% |
!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:
json{ "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 casesOther measured skills in the registry, with their headline benchmark lift.