Agent Skillsrustfs/rustfs › test-coverage-improver

test-coverage-improver

GitHub

基于覆盖率报告识别高风险代码缺口,并优先提出高影响力测试方案,以提升回归测试信心。支持多语言环境,涵盖范围定义、快照生成、风险排序及验证计划。

.agents/skills/test-coverage-improver/SKILL.md rustfs/rustfs

Trigger Scenarios

需要提高代码覆盖率 分析回归测试风险 制定测试改进计划

Install

npx skills add rustfs/rustfs --skill test-coverage-improver -g -y
More Options

Non-standard path

npx skills add https://github.com/rustfs/rustfs/tree/main/.agents/skills/test-coverage-improver -g -y

Use without installing

npx skills use rustfs/rustfs@test-coverage-improver

指定 Agent (Claude Code)

npx skills add rustfs/rustfs --skill test-coverage-improver -a claude-code -g -y

安装 repo 全部 skill

npx skills add rustfs/rustfs --all -g -y

预览 repo 内 skill

npx skills add rustfs/rustfs --list

SKILL.md

Frontmatter
{
    "name": "test-coverage-improver",
    "description": "Run project coverage checks, rank high-risk gaps, and propose high-impact tests to improve regression confidence for changed and critical code paths before release."
}

Test Coverage Improver

Use this skill when you need a prioritized, risk-aware plan to improve tests from coverage results.

Usage assumptions

  • Focus scope is either changed lines/files, a module, or the whole repository.
  • Coverage artifact must be generated or provided in a supported format.
  • If required context is missing, call out assumptions explicitly before proposing work.

Workflow

  1. Define scope and baseline

    • Confirm target language, framework, and branch.
    • Confirm whether the scope is changed files only or full-repo.
  2. Produce coverage snapshot

    • Rust: cargo llvm-cov (or cargo tarpaulin) with existing repo config.
    • JavaScript/TypeScript: npm test -- --coverage and read coverage/coverage-final.json.
    • Python: pytest --cov=<pkg> --cov-report=json and read coverage.json.
    • Collect total, per-file, and changed-line coverage.
  3. Rank highest-risk gaps

    • Prioritize changed code, branch coverage gaps, and low-confidence boundaries.
    • Apply the risk rubric in coverage-prioritization.md.
    • Keep shortlist to 5–8 gaps.
    • For each gap, capture: file, lines, uncovered branches, and estimated risk score.
  4. Propose high-impact tests

    • For each shortlisted gap, output:
      • Intent and expected behavior.
      • Normal, edge, and failure scenarios.
      • Assertions and side effects to verify.
      • Setup needs (fixtures, mocks, integration dependencies).
      • Estimated effort (S/M/L).
  5. Close with validation plan

    • State which gaps remain after proposals.
    • Provide concrete verification command and acceptance threshold.
    • List assumptions or blockers (environment, fixtures, flaky dependencies).

Output template

Coverage Snapshot

  • total / branch coverage
  • changed-file coverage
  • top missing regions by size

Top Gaps (ranked)

  • path:line-range | risk score | why critical

Test Proposals

  • path:line-range
    • Test name
    • scenarios
    • assertions
    • effort

Validation Plan

  • command
  • pass criteria
  • remaining risk

Version History

  • 0d129ec Current 2026-08-20 14:32

Same Skill Collection

.agents/skills/adversarial-validation/SKILL.md
.agents/skills/arch-checks/SKILL.md
.agents/skills/code-change-verification/SKILL.md
.agents/skills/plugin-contract-guard/SKILL.md
.agents/skills/pr-creation-checker/SKILL.md
.agents/skills/rust-code-quality/SKILL.md
.agents/skills/rustfs-logging-governance/SKILL.md
.agents/skills/rustfs-release-publish/SKILL.md
.agents/skills/rustfs-release-version-bump/SKILL.md
.agents/skills/security-advisory-lessons/SKILL.md
.agents/skills/tier-debug/SKILL.md
.mimocode/skills/issue-triage/SKILL.md
.mimocode/skills/pr-review/SKILL.md

Metadata

Files
0
Version
0fe41da
Hash
0c1513b9
Indexed
2026-08-20 14:32

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 21:52
浙ICP备14020137号-1 $Carte des visiteurs$