Claude-skill-registry calculate-coverage
Measure test coverage and identify untested code. Use when assessing test completeness.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/calculate-coverage" ~/.claude/skills/majiayu000-claude-skill-registry-calculate-coverage && rm -rf "$T"
manifest:
skills/data/calculate-coverage/SKILL.mdsource content
Calculate Coverage
Measure code coverage percentage and identify which code paths are untested to ensure comprehensive testing.
When to Use
- Checking test coverage for modules
- Identifying gaps in test suites
- Meeting coverage thresholds (typically 80%+)
- Planning additional test cases
Quick Reference
# Python coverage with pytest pip install coverage pytest-cov pytest --cov=module_name --cov-report=html tests/ # View coverage report open htmlcov/index.html # Check coverage threshold coverage report --fail-under=80
Workflow
- Install coverage tool: Set up measurement infrastructure
- Run tests with coverage: Execute test suite capturing coverage data
- Generate report: Create HTML or text coverage report
- Analyze gaps: Identify untested functions, branches, edge cases
- Plan improvements: Create tests for uncovered code paths
Output Format
Coverage analysis:
- Overall coverage percentage
- Per-module coverage breakdown
- Uncovered lines (with line numbers)
- Branch coverage (if applicable)
- Recommendations for improvement
References
- See
skill for test executionrun-tests - See
skill for test creationgenerate-tests - See CLAUDE.md > Key Development Principles (TDD) for testing strategy