Agent skill · data analytics · jeremylongshore

analyzing-test-coverage

Analyze code coverage metrics and identify untested code paths.

Why this skill is useful

Provides specific commands and procedures for analyzing code coverage metrics that the AI wouldn't reliably generate on its own.

What it needs

Requires go, istanbul, jacoco, pytest installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

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 1. 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. 2. 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). 3. 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. 4. Analyze uncovered branches specifically: Find if/else blocks where only one branch is tested. Identify switch/case statements with missing case coverage. Locate error handling paths (catch, except) never exercised. Check and && short-circuit conditions. 5. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/analyzing-test-coverage

View the source on GitHub

Browse the @skills marketplace