analyzing-test-coverage
'Analyze code coverage metrics and identify untested code paths.
Install / Use
npx skills add jeremylongshore/tons-of-skills-marketplace --skill analyzing-test-coverageInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of analyzing-test-coverage
analyzing-test-coverage scores 85/100 on our quality scale, 1762nd of 3,845 Development & Engineering skills we index (top 46%).
Its SKILL.md is 5.7 KB long, well organised into 9 sections with 2 code examples: a solid amount of guidance for an agent.
With 2,785 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 6 days ago, so analyzing-test-coverage is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
analyzing-test-coverage compared with similar skills
All 4 of these similar skills score higher than analyzing-test-coverage; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| analyzing-test-coverage (this skill)by jeremylongshore | 85 | 2.8k | 6d ago | SKILL.md |
| ai-job-searchby MadsLorentzen | 100 | 44.5k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 41.7k | 4d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 7d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 7d ago | SKILL.md |
Frequently asked questions
- How do I install analyzing-test-coverage?
- Run
npx skills add jeremylongshore/tons-of-skills-marketplace --skill analyzing-test-coverage. The install tabs above show the steps for each supported agent. - Which AI agents does analyzing-test-coverage work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is analyzing-test-coverage safe to use?
- It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is analyzing-test-coverage still maintained?
- The repository was last updated 6 days ago, so analyzing-test-coverage is actively maintained.
Skill content
View source on GitHubname: analyzing-test-coverage description: '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".
' allowed-tools: Read, Write, Edit, Grep, Glob, Bash(test:coverage-*) version: 1.24.0 author: Jeremy Longshore jeremy@intentsolutions.io license: MIT tags:
- testing
- analyzing-test compatibility: Designed for Claude Code
Test Coverage Analyzer
Current State
!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'
Overview
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.
Prerequisites
- Coverage tool installed and configured (Istanbul/nyc, c8, coverage.py, JaCoCo, or
go test -cover) - Test suite that can run with coverage instrumentation enabled
- Coverage threshold targets defined (recommended: 80% lines, 70% branches)
- Coverage output format set to JSON or LCOV for programmatic analysis
- Git history available for coverage trend comparison
Instructions
- Run the test suite with coverage instrumentation enabled:
- JavaScript:
npx jest --coverage --coverageReporters=json-summary,lcov - Python:
pytest --cov=src --cov-report=json --cov-report=term-missing - Go:
go test -coverprofile=coverage.out ./... - Java: Configure JaCoCo Maven/Gradle plugin with XML report output.
- JavaScript:
- Parse the coverage report and extract per-file metrics:
- Line coverage percentage per file.
- Branch coverage percentage per file.
- Function coverage percentage per file.
- Uncovered line ranges (specific line numbers).
- Identify critical coverage gaps by prioritizing:
- Files with coverage below the threshold (sort ascending by coverage %).
- Files with high complexity but low coverage (use cyclomatic complexity if available).
- Recently modified files with decreasing coverage trends.
- Public API functions and exported modules lacking any tests.
- Analyze uncovered branches specifically:
- Find
if/elseblocks where only one branch is tested. - Identify
switch/casestatements with missing case coverage. - Locate error handling paths (
catch,except) never exercised. - Check
||and&&short-circuit conditions.
- Find
- Generate a prioritized action plan:
- List top 10 files needing coverage improvement with specific line ranges.
- Suggest test scenarios for each uncovered branch.
- Estimate effort (small/medium/large) for each coverage improvement.
- Compare current coverage against the previous commit or baseline:
- Calculate coverage delta per file.
- Flag files where coverage decreased.
- Verify new code added since baseline has adequate coverage.
- Write coverage enforcement configuration (coverage thresholds in Jest config,
.coveragerc, or CI checks).
Output
- Coverage summary report with overall and per-file metrics
- Prioritized list of uncovered code paths with file:line references
- Coverage delta report comparing against baseline
- Suggested test cases for top coverage gaps
- Coverage threshold configuration file for CI enforcement
Error Handling
| 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 |
Examples
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
Resources
- Istanbul/nyc: https://istanbul.js.org/
- c8 (Node.js native coverage): https://github.com/bcoe/c8
- coverage.py: https://coverage.readthedocs.io/
- JaCoCo: https://www.jacoco.org/jacoco/
- Go test coverage: https://go.dev/blog/cover
- Code coverage best practices: https://testing.googleblog.com/2020/08/code-coverage-best-practices.html
Related Skills
ai-job-search
44.5kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.7kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
