test-coverage-assistant
/test-coverage-assistant
[UDS] 以八维度框架分析代码层级的测试覆盖率,并建议该优先补上哪些缺口。 Use when: 覆盖率数字看起来很健康但缺陷照样流出、要在行覆盖率之外判断测试完整性、设定覆盖率目标。 Not for: 需求层级的 AC 与测试追踪——请用 /ac-coverage;补写缺少的测试——请用 /tdd 或 /spec-derive。 Keywords: test coverage, eight dimensions, line coverage, branch coverage, test quality, 测试覆盖率, 八维度, 测试完整性, 覆盖缺口.
- Author
- AsiaOstrich ↗
- Repository
- universal-dev-standards ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
[UDS] 以八维度框架分析代码层级的测试覆盖率,并建议该优先补上哪些缺口。 Use when: 覆盖率数字看起来很健康但缺陷照样流出、要在行覆盖率之外判断测试完整性、设定覆盖率目标。 Not for: 需求层级的 AC 与测试追踪——请用 /ac-coverage;补写缺少的测试——请用 /tdd 或 /spec-derive。 Keywords: test coverage, eight dimensions, line coverage, branch coverage, test quality, 测试覆盖率, 八维度, 测试完整性, 覆盖缺口.
Original author description
[UDS] 以八维度框架分析代码层级的测试覆盖率,并建议该优先补上哪些缺口。 Use when: 覆盖率数字看起来很健康但缺陷照样流出、要在行覆盖率之外判断测试完整性、设定覆盖率目标。 Not for: 需求层级的 AC 与测试追踪——请用 /ac-coverage;补写缺少的测试——请用 /tdd 或 /spec-derive。 Keywords: test coverage, eight dimensions, line coverage, branch coverage, test quality, 测试覆盖率, 八维度, 测试完整性, 覆盖缺口.
How it works
- 覆盖率维度
- 八维度框架
- 覆盖率目标
- 工作流程
- 使用方式
- 下一步引导
- 参考
- AI 代理行为
SKILL.md preview
--- source: ../../../../skills/test-coverage-assistant/SKILL.md source_version: 1.1.0 translation_version: 1.2.0 last_synced: 2026-10-11 source_hash: a54fe2543e47 status: current description: | [UDS] 以八维度框架分析代码层级的测试覆盖率,并建议该优先补上哪些缺口。 Use when: 覆盖率数字看起来很健康但缺陷照样流出、要在行覆盖率之外判断测试完整性、设定覆盖率目标。 Not for: 需求层级的 AC 与测试追踪——请用 /ac-coverage;补写缺少的测试——请用 /tdd 或 /spec-derive。 Keywords: test coverage, eight dimensions, line coverage, branch coverage, test quality, 测试覆盖率, 八维度, 测试完整性, 覆盖缺口. --- # 测试覆盖率助手 > **语言**: [English](../../../../skills/test-coverage-assistant/SKILL.md) | 简体中文 多维度分析测试覆盖率并提供可执行的建议。 > **相关**:如需需求层级覆盖率(哪些 AC 有对应测试?),请改用 `/ac-coverage`。此技能(`/coverage`)专注于代码层级覆盖率(行、分支、函数)。 ## 覆盖率维度 | 维度 | 测量内容 | Dimension | What it Measures | |------|----------|-----------|------------------| | **行覆盖率** | 执行的代码行数 | Line | Lines of code executed | | **分支覆盖率** | 决策路径覆盖 | Branch | Decision paths taken | | **函数覆盖率** | 调用的函数 | Function | Functions called | | **语句覆盖率** | 执行的语句 | Statement | Statements executed | ## 八维度框架 1. **代码覆盖率** - 行、分支、函数 2. **需求覆盖率** - 所有需求都有对应测试 3. **风险覆盖率** - 高风险区域优先测试 4. **集成覆盖率** - 组件交互路径 5. **边界案例覆盖率** - 边界条件测试 6. **错误覆盖率** - 错误处理路径验证 7. **权限覆盖率** - 访问控制场景 8. **AI 生成质量** - AI 生成测试的有效性 ## 覆盖率目标 | 等级 | 覆盖率 | 适用场景 | Use Case | |------|--------|----------|----------| | 最低要求 | 60% | 遗留代码 | Legacy code | | 标准 | 80% | 大多数项目 | Most projects | | 高标准 | 90% | 关键系统 | Critical systems | | 严格 | 95%+ | 安全关键 | Safety-critical | ## 工作流程 1. **执行覆盖率工具** - 生成覆盖率报告 2. **分析缺口** - 识别未测试的区域 3. **排定优先顺序** - 按风险和重要性排序 4. **建议测试** - 提出具体的测试建议 5. **追踪进度** - 持续监控覆盖率变化 ## 使用方式 ``` /coverage - 执行完整覆盖率分析 /coverage src/auth - 分析特定模块 /coverage --recommend - 获取测试建议 ``` ## 下一步引导 `/coverage` 完成后,AI 助手应建议: > **覆盖率分析完成。建议下一步:** > - 覆盖率不足 → 执行 `/tdd` 补齐测试 > - 已达标 → 执行 `/checkin` 品质关卡 ⭐ **推荐** > - 发现热点 → 执行 `/refactor` 改善可测试性 ## 参考 - 详细指南:[guide.md](./guide.md) - 核心规范:[test-completeness-dimensions.md](../../../../core/test-completeness-dimensions.md) ## AI 代理行为 > 完整的 AI 行为定义请参阅对应的命令文件:[`/coverage`](../../../../skills/commands/coverage.md#ai-agent-behavior--ai-代理行為)
Files in this package (2)
- SKILL.md 3 KB
- guide.md 9 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · AsiaOstrich/universal-dev-standards | 84 | MIT |
| AsiaOstrich/universal-dev-standards | 100 | MIT |
Database snapshot: 13.11.2026 · package version cb1c30df8c89 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95coverage
[UDS] 以八維度框架分析程式碼層級的測試覆蓋率,並建議該優先補上哪些缺口。 Use when: 覆蓋率數字看起來很健康但缺陷照樣流出、要在行覆蓋率之外判斷測試完整性、設定覆蓋率目標。 Not for: 需求層級的 AC 與測試追蹤——請用 /ac-coverage;補寫缺少的測試——請用 /tdd 或 /spec-derive。 Keywords: test coverage, eight dimensions, line coverage, branch coverage, test quality, 測試覆蓋率, 八維度, 測試完整性, 覆蓋缺口. - 95coverage
[UDS] Analyze code-level test coverage across the eight-dimension framework and recommend which gaps to close. Use when: coverage percentages look healthy but defects still ship, judging test completeness beyond line percentage, setting coverage targets. Not for:… - 100tdd
Test-driven development workflow. Use when the user asks to "write tests first", "TDD", "add test coverage", "test this function", or wants to develop a feature test-first. - 100test-review
Test coverage review via Codex exec. Use when: reviewing test sufficiency, identifying coverage gaps, test quality audit. Not for: generating tests (use codex-test-gen), code review (use codex-code-review). Output: coverage analysis + gap report. - 90test-coverage-quality-review
Use this skill when reviewing a test suite for assertion quality rather than coverage percentage — detecting coverage theater, where line/branch coverage is high but the tests would not catch a regression. Trigger when a user provides test files, a coverage report, or asks… - 100gds-test-review
Review test quality and coverage. Use when the user says "test review" or "review tests