coverage
/coverage
[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
- 08.11.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 3
No signals detected. Repository changed on 08.11.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, 測試覆蓋率, 八維度, 測試完整性, 覆蓋缺口.
Arguments
/coverage [file or module | 檔案或模組]
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
--- name: coverage source: ../../../../skills/test-coverage-assistant/SKILL.md source_version: 1.1.0 translation_version: 1.2.0 last_synced: 2026-10-12 source_hash: a54fe2543e47 status: current scope: partial description: | [UDS] 以八維度框架分析程式碼層級的測試覆蓋率,並建議該優先補上哪些缺口。 Use when: 覆蓋率數字看起來很健康但缺陷照樣流出、要在行覆蓋率之外判斷測試完整性、設定覆蓋率目標。 Not for: 需求層級的 AC 與測試追蹤——請用 /ac-coverage;補寫缺少的測試——請用 /tdd 或 /spec-derive。 Keywords: test coverage, eight dimensions, line coverage, branch coverage, test quality, 測試覆蓋率, 八維度, 測試完整性, 覆蓋缺口. allowed-tools: Read, Grep, Glob, Bash(npm test:*) argument-hint: "[file or module | 檔案或模組]" --- # 測試覆蓋率助手 > **語言**: [English](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/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](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/test-completeness-dimensions.md) ## AI 代理行為 > 完整的 AI 行為定義請參閱對應的命令文件:[`/coverage`](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/skills/commands/coverage.md#ai-agent-behavior--ai-代理行為)
Files in this package (2)
- SKILL.md 4 KB
- guide.md 9 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · AsiaOstrich/universal-dev-standards | 95 | MIT |
| alirezarezvani/claude-skills | 100 | MIT |
| AsiaOstrich/universal-dev-standards | 95 | MIT |
Database snapshot: 13.11.2026 · package version d265886c5678 (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
- 100test-coverage-assistant
[UDS] 以八維度框架分析程式碼層級的測試覆蓋率,並建議該優先補上哪些缺口。 Use when: 覆蓋率數字看起來很健康但缺陷照樣流出、要在行覆蓋率之外判斷測試完整性、設定覆蓋率目標。 Not for: 需求層級的 AC 與測試追蹤——請用 /ac-coverage;補寫缺少的測試——請用 /tdd 或 /spec-derive。 Keywords: test coverage, eight dimensions, line coverage, branch coverage, test quality, 測試覆蓋率, 八維度, 測試完整性, 覆蓋缺口. - 84test-coverage-assistant
[UDS] 以八维度框架分析代码层级的测试覆盖率,并建议该优先补上哪些缺口。 Use when: 覆盖率数字看起来很健康但缺陷照样流出、要在行覆盖率之外判断测试完整性、设定覆盖率目标。 Not for: 需求层级的 AC 与测试追踪——请用 /ac-coverage;补写缺少的测试——请用 /tdd 或 /spec-derive。 Keywords: test coverage, eight dimensions, line coverage, branch coverage, test quality, 测试覆盖率, 八维度, 测试完整性, 覆盖缺口. - 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. - 95coverage-analyzer
Analyze test coverage with detailed metrics, identify gaps, and generate comprehensive reports. Use when measuring code coverage, finding untested code, or validating coverage thresholds. - 100test-coverage-analyzer
Analyzes test coverage reports, identifies gaps, and recommends priority areas for testing. Use when reviewing coverage, finding untested code, or planning test improvements.