
Configure Coverage
- 54 installs
- 49 repo stars
- Updated August 4, 2026
- laurigates/claude-plugins
Helps with ai & agent building tasks.
About
configure-coverage is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- configure-coverage
- AI & Agent Building
- AI-coding skill
Configure Coverage by the numbers
- 54 all-time installs (skills.sh)
- Ranked #6,877 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/laurigates/claude-plugins --skill configure-coverageAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 54 |
|---|---|
| repo stars | ★ 49 |
| Last updated | August 4, 2026 |
| Repository | laurigates/claude-plugins ↗ |
What it does
Helps with ai & agent building tasks.
Files
/configure:coverage
Check and configure code coverage thresholds and reporting for test frameworks.
When to Use This Skill
| Use this skill when... | Use another approach when... |
|---|---|
| Setting up coverage thresholds for Vitest, Jest, pytest, or Rust | Running tests with coverage (/test:coverage) |
| Configuring coverage reporters (text, JSON, HTML, lcov) | Configuring the test framework itself (/configure:tests) |
| Adding Codecov or Coveralls integration to CI/CD | Analyzing test failures (test-runner agent) |
| Auditing coverage configuration compliance across a project | Writing individual test cases |
| Adjusting coverage threshold percentages | Configuring general CI/CD workflows (/configure:workflows) |
Context
- Project root: !
pwd - Package files: !
find . -maxdepth 1 \( -name 'package.json' -o -name 'pyproject.toml' -o -name 'Cargo.toml' \) - Vitest config: !
find . -maxdepth 1 -name 'vitest.config.*' - Jest config: !
find . -maxdepth 1 -name 'jest.config.*' - Coverage dir: !
find . -maxdepth 1 -type d -name 'coverage' - Codecov config: !
find . -maxdepth 1 \( -name 'codecov.yml' -o -name '.codecov.yml' \) - Project standards: !
find . -maxdepth 1 -name '.project-standards.yaml'
Parameters
Parse from command arguments:
--check-only: Report compliance status without modifications (CI/CD mode)--fix: Apply fixes automatically without prompting--threshold <percentage>: Set coverage threshold (default: 80)
Default threshold: 80% (lines, branches, functions, statements)
Supported frameworks:
- Vitest:
@vitest/coverage-v8or@vitest/coverage-istanbul - Jest: Built-in coverage with
--coverage - pytest:
pytest-covplugin - Rust:
cargo-llvm-covorcargo-tarpaulin
Execution
Execute this code coverage compliance check:
Step 1: Detect test framework and coverage configuration
Check for framework indicators:
| Indicator | Framework | Coverage Tool |
|---|---|---|
vitest.config.* with coverage | Vitest | @vitest/coverage-v8 |
jest.config.* with coverage | Jest | Built-in |
pyproject.toml [tool.coverage] | pytest | pytest-cov |
.cargo/config.toml with coverage | Rust | cargo-llvm-cov |
Use WebSearch or WebFetch to verify latest versions of coverage tools before configuring.
Step 2: Analyze current coverage state
For the detected framework, check configuration completeness:
Vitest:
- [ ] Coverage provider configured (
v8oristanbul) - [ ] Coverage reporters configured (
text,json,html,lcov) - [ ] Thresholds set for lines, functions, branches, statements
- [ ] Exclusions configured (node_modules, dist, tests, config files)
- [ ] Output directory specified
Jest:
- [ ]
collectCoverageenabled - [ ]
coverageProviderset (v8orbabel) - [ ]
collectCoverageFrompatterns configured - [ ]
coverageThresholdsconfigured - [ ]
coverageReportersconfigured
pytest:
- [ ]
pytest-covinstalled - [ ]
[tool.coverage.run]section exists - [ ]
[tool.coverage.report]section exists - [ ] Coverage threshold configured (
--cov-fail-under)
Rust (cargo-llvm-cov):
- [ ]
cargo-llvm-covinstalled - [ ] Coverage configuration in workspace
- [ ] HTML/LCOV output configured
Step 3: Generate compliance report
Print a formatted compliance report:
Code Coverage Compliance Report
================================
Project: [name]
Framework: [Vitest 2.x | pytest 8.x | cargo-llvm-cov 0.6.x]
Coverage Configuration:
Provider @vitest/coverage-v8 [CONFIGURED | MISSING]
Reporters text, json, html, lcov [ALL | PARTIAL]
Output directory coverage/ [CONFIGURED | DEFAULT]
Exclusions node_modules, dist, tests [CONFIGURED | INCOMPLETE]
Thresholds:
Lines 80% [PASS | LOW | NOT SET]
Branches 80% [PASS | LOW | NOT SET]
Functions 80% [PASS | LOW | NOT SET]
Statements 80% [PASS | LOW | NOT SET]
CI/CD Integration:
Coverage upload codecov/coveralls [CONFIGURED | MISSING]
Artifact upload coverage reports [CONFIGURED | MISSING]
Overall: [X issues found]If --check-only, stop here.
Step 4: Configure coverage (if --fix or user confirms)
Apply coverage configuration based on detected framework. Use templates from REFERENCE.md:
1. Install coverage provider (e.g., @vitest/coverage-v8, pytest-cov) 2. Update config file with thresholds, reporters, exclusions 3. Add scripts to package.json or pyproject.toml 4. Configure CI/CD with Codecov upload and artifact storage
Step 5: Update standards tracking
Update .project-standards.yaml:
standards_version: "2025.1"
last_configured: "[timestamp]"
components:
coverage: "2025.1"
coverage_threshold: 80
coverage_provider: "[v8|istanbul|pytest-cov|llvm-cov]"
coverage_reporters: ["text", "json", "html", "lcov"]
coverage_ci: "codecov"Step 6: Print final report
Print a summary of changes applied, scripts added, and next steps for verifying coverage.
For detailed configuration templates, see REFERENCE.md.
Agentic Optimizations
| Context | Command |
|---|---|
| Quick compliance check | /configure:coverage --check-only |
| Auto-fix all issues | /configure:coverage --fix |
| Custom threshold | /configure:coverage --fix --threshold 90 |
| Check coverage config exists | find . -maxdepth 1 -name 'vitest.config.*' -o -name 'jest.config.*' 2>/dev/null |
| Verify coverage directory | test -d coverage && echo "EXISTS" |
Flags
| Flag | Description |
|---|---|
--check-only | Report status without offering fixes |
--fix | Apply all fixes automatically without prompting |
--threshold <percentage> | Set coverage threshold (default: 80) |
Examples
# Check compliance and offer fixes
/configure:coverage
# Check only, no modifications
/configure:coverage --check-only
# Auto-fix with custom threshold
/configure:coverage --fix --threshold 90Error Handling
- No test framework detected: Suggest running
/configure:testsfirst - Coverage provider missing: Offer to install
- Invalid threshold: Reject values <0 or >100
- CI token missing: Warn about Codecov/Coveralls setup
See Also
/configure:tests- Configure testing frameworks/test:coverage- Run tests with coverage/configure:all- Run all compliance checks- Codecov documentation: https://docs.codecov.com
- pytest-cov documentation: https://pytest-cov.readthedocs.io
Coverage Configuration Reference
Detailed configuration templates for code coverage tools.
Vitest Coverage Configuration
Install Coverage Provider
npm install --save-dev @vitest/coverage-v8
# or for Istanbul
npm install --save-dev @vitest/coverage-istanbulvitest.config.ts Template
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
coverage: {
provider: 'v8',
reporter: [
'text', // Console output
'json', // JSON report for tools
'html', // HTML report for browsing
'lcov', // LCOV for CI/CD (codecov, coveralls)
],
reportsDirectory: './coverage',
thresholds: {
lines: 80,
functions: 80,
branches: 80,
statements: 80,
},
include: ['src/**/*.{js,ts,jsx,tsx}'],
exclude: [
'node_modules/',
'dist/',
'tests/',
'**/*.config.*',
'**/*.d.ts',
'**/*.test.*',
'**/*.spec.*',
'**/types/',
'**/__tests__/',
],
clean: true,
all: true,
skipFull: false,
},
},
});Package.json Scripts
{
"scripts": {
"test:coverage": "vitest run --coverage",
"coverage:report": "open coverage/index.html",
"coverage:check": "vitest run --coverage --reporter=json"
}
}Jest Coverage Configuration
jest.config.ts Template
import type { Config } from 'jest';
const config: Config = {
collectCoverage: true,
coverageProvider: 'v8',
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/**/*.d.ts',
'!src/**/*.stories.*',
'!src/**/__tests__/**',
'!src/**/types/**',
],
coverageDirectory: 'coverage',
coverageReporters: [
'text',
'text-summary',
'json',
'html',
'lcov',
],
coverageThresholds: {
global: {
lines: 80,
functions: 80,
branches: 80,
statements: 80,
},
'./src/critical/**/*.ts': {
lines: 90,
functions: 90,
branches: 90,
statements: 90,
},
},
coveragePathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/tests/',
'.config.js',
],
};
export default config;pytest Coverage Configuration
Install pytest-cov
uv add --group dev pytest-covpyproject.toml Template
[tool.pytest.ini_options]
addopts = [
"-v",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-report=xml",
"--cov-report=json",
"--cov-fail-under=80",
]
[tool.coverage.run]
source = ["src"]
branch = true
parallel = true
omit = [
"*/tests/*",
"*/migrations/*",
"*/__init__.py",
"*/config.py",
"*/settings.py",
]
[tool.coverage.report]
precision = 2
show_missing = true
fail_under = 80
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"if __name__ == .__main__.:",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if False:",
"if TYPE_CHECKING:",
"@abstractmethod",
"@overload",
]
[tool.coverage.html]
directory = "coverage/html"
[tool.coverage.xml]
output = "coverage/coverage.xml"
[tool.coverage.json]
output = "coverage/coverage.json"Rust Coverage Configuration
Install cargo-llvm-cov
cargo install cargo-llvm-cov --locked.cargo/config.toml Template
[alias]
coverage = "llvm-cov --html --open"
coverage-lcov = "llvm-cov --lcov --output-path lcov.info"Cargo.toml Coverage Metadata
[package.metadata.coverage]
exclude = [
"tests/*",
"benches/*",
"examples/*",
]Run Coverage
# Generate HTML report
cargo coverage
# Generate LCOV for CI
cargo coverage-lcovCI/CD Integration
GitHub Actions - Vitest/Jest
- name: Run tests with coverage
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage/GitHub Actions - pytest
- name: Run tests with coverage
run: uv run pytest --cov --cov-report=xml --cov-report=html
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage/GitHub Actions - Rust
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate coverage
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./lcov.info
flags: unittests
fail_ci_if_error: trueCoverage Badges
Codecov:
[](https://codecov.io/gh/USERNAME/REPO)Coveralls:
[](https://coveralls.io/github/USERNAME/REPO?branch=main)Codecov Configuration
codecov.yml Template
coverage:
status:
project:
default:
target: 80%
threshold: 1%
patch:
default:
target: 80%
comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: falseCodecov Setup Steps
1. Sign up at https://codecov.io 2. Add repository 3. Copy token from Codecov dashboard 4. Add secret: GitHub repo -> Settings -> Secrets -> CODECOV_TOKEN 5. Add upload step to workflow