Agent skill
validate-coverage-threshold
Validate test coverage meets minimum thresholds (default 80% overall, 80% statements, 75% branches, 80% functions). Parses coverage reports from coverage/coverage-summary.json or test output. Returns pass/fail status with detailed metrics and identifies uncovered files.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/validate-coverage-threshold
SKILL.md
Validate Coverage Threshold
Parses test coverage reports and validates that coverage meets minimum thresholds for quality assurance.
Usage
This skill checks test coverage data against configurable thresholds and returns structured validation results.
Default Thresholds
{
"overall": 80,
"statements": 80,
"branches": 75,
"functions": 80
}
Output Format
All Thresholds Met
{
"status": "success",
"coverage": {
"overall": 87.5,
"statements": 88.2,
"branches": 84.1,
"functions": 89.3
},
"thresholds": {
"overall": 80,
"statements": 80,
"branches": 75,
"functions": 80
},
"passed": true,
"failures": [],
"canProceed": true
}
Below Threshold
{
"status": "warning",
"coverage": {
"overall": 75.3,
"statements": 76.1,
"branches": 72.8,
"functions": 78.2
},
"thresholds": {
"overall": 80,
"statements": 80,
"branches": 75,
"functions": 80
},
"passed": false,
"failures": [
"overall:75.3%<80%",
"statements:76.1%<80%"
],
"uncoveredFiles": [
{"file": "src/utils/helpers.ts", "coverage": 45.2}
],
"canProceed": false,
"details": "Coverage below threshold: 4 metric(s) failed"
}
When to Use
- Quality gate validation (Conductor Phase 3)
- After running tests with coverage
- Pre-commit checks
- CI/CD pipeline validation
Coverage Data Sources
coverage/coverage-summary.json(preferred - c8/Istanbul)- Test output text (fallback)
Requirements
- Coverage data generated by test run
- Run
npm run test -- --coveragefirst
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?