Skip to main content
configure-coverage Code coverage: thresholds and reporters for Vitest, Jest, pytest, Rust. Use when setting thresholds, adding Codecov/Coveralls, or wiring lcov/HTML reports.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/laurigates/claude-plugins --skill configure-coverage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... created "2025-12-16T00:00:00.000Z" modified "2026-04-19T00:00:00.000Z" reviewed "2025-12-16T00:00:00.000Z" description Code coverage: thresholds and reporters for Vitest, Jest, pytest, Rust. Use when setting thresholds, adding Codecov/Coveralls, or wiring lcov/HTML reports. allowed-tools Glob, Grep, Read, Write, Edit, Bash, AskUserQuestion, TodoWrite, WebSearch, WebFetch args [--check-only] [--fix] [--threshold <percentage>] argument-hint [--check-only] [--fix] [--threshold <percentage>] name configure-coverage
/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-v8 or @vitest/coverage-istanbul
Jest : Built-in coverage with --coverage
pytest : pytest-cov plugin
Rust : cargo-llvm-cov or cargo-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 coverageVitest @vitest/coverage-v8 jest.config.* with coverageJest Built-in pyproject.toml [tool.coverage]pytest pytest-cov .cargo/config.toml with coverageRust 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:
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 :
Install coverage provider (e.g., @vitest/coverage-v8, pytest-cov)
Update config file with thresholds, reporters, exclusions
Add scripts to package.json or pyproject.toml
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.
Agentic Optimizations Context Command Quick compliance check /configure:coverage --check-onlyAuto-fix all issues /configure:coverage --fixCustom threshold /configure:coverage --fix --threshold 90Check coverage config exists find . -maxdepth 1 -name 'vitest.config.*' -o -name 'jest.config.*' 2>/dev/nullVerify coverage directory test -d coverage && echo "EXISTS"
Flags Flag Description --check-onlyReport status without offering fixes --fixApply all fixes automatically without prompting --threshold <percentage>Set coverage threshold (default: 80)
Examples
/configure:coverage
/configure:coverage --check-only
/configure:coverage --fix --threshold 90
Error Handling
No test framework detected : Suggest running /configure:tests first
Coverage provider missing : Offer to install
Invalid threshold : Reject values <0 or >100
CI token missing : Warn about Codecov/Coveralls setup
See Also