skills/test-coverage-assistant/SKILL.md
[UDS] Analyze test coverage and provide recommendations
npx skillsauth add asiaostrich/universal-dev-standards coverageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze test coverage across multiple dimensions and provide actionable recommendations.
多維度分析測試覆蓋率並提供可執行的建議。
Related: For requirement-level coverage (which AC have tests?), use
/ac-coverageinstead. This skill (/coverage) focuses on code-level coverage (lines, branches, functions).相關:如需需求層級覆蓋率(哪些 AC 有對應測試?),請改用
/ac-coverage。此技能(/coverage)專注於程式碼層級覆蓋率。
| Dimension | What it Measures | 測量內容 | |-----------|------------------|----------| | Line | Lines of code executed | 執行的程式碼行數 | | Branch | Decision paths taken | 決策路徑覆蓋 | | Function | Functions called | 呼叫的函數 | | Statement | Statements executed | 執行的陳述式 |
| Level | Coverage | Use Case | 適用場景 | |-------|----------|----------|----------| | Minimum | 60% | Legacy code | 遺留程式碼 | | Standard | 80% | Most projects | 大多數專案 | | High | 90% | Critical systems | 關鍵系統 | | Critical | 95%+ | Safety-critical | 安全關鍵 |
/coverage - Run full coverage analysis | 執行完整覆蓋率分析
/coverage src/auth - Analyze specific module | 分析特定模組
/coverage --recommend - Get test recommendations | 取得測試建議
After /coverage completes, the AI assistant should suggest:
覆蓋率分析完成。建議下一步 / Coverage analysis complete. Suggested next steps:
- 覆蓋率不足 → 執行
/tdd補齊測試 — Coverage gaps → Run/tddto add tests- 已達標 → 執行
/checkin品質關卡 ⭐ Recommended / 推薦 — Targets met → Run/checkinquality gates- 發現熱點 → 執行
/refactor改善可測試性 — Hotspots found → Run/refactor
完整的 AI 行為定義請參閱對應的命令文件:
/coverageFor complete AI agent behavior definition, see the corresponding command file:
/coverage
development
[UDS] 扫描代码库的调试残留与代码质量问题;可自动修正安全模式。 Use when: before committing, during PR review, or periodic codebase cleanup. Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality, 扫描, 清理.
tools
[UDS] 从规格衍生 BDD 场景、TDD 骨架或 ATDD 表格
development
[UDS] 识别重复流程并以正确的开发深度构建 Skill
tools
[UDS] AI 辅助 git push 安全层:质量门禁 + 协作护栏。 Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches. Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保护分支, 质量门禁.