Agent Skillsldayton/Dippy › check-coverage

check-coverage

GitHub

确保CLI处理程序及测试具备全面覆盖率。用于新增命令或审计现有处理器时,通过查阅文档、探索子命令、审查和补充测试用例,直至验证通过。

.claude/skills/check-coverage/SKILL.md ldayton/Dippy

Trigger Scenarios

添加新的CLI命令 审计现有处理程序的测试覆盖率

Install

npx skills add ldayton/Dippy --skill check-coverage -g -y
More Options

Non-standard path

npx skills add https://github.com/ldayton/Dippy/tree/main/.claude/skills/check-coverage -g -y

Use without installing

npx skills use ldayton/Dippy@check-coverage

指定 Agent (Claude Code)

npx skills add ldayton/Dippy --skill check-coverage -a claude-code -g -y

安装 repo 全部 skill

npx skills add ldayton/Dippy --all -g -y

预览 repo 内 skill

npx skills add ldayton/Dippy --list

SKILL.md

Frontmatter
{
    "name": "check-coverage",
    "description": "Ensure comprehensive test coverage for a CLI handler. Use when adding a new command or auditing existing handler coverage.",
    "argument-hint": "<tool>",
    "disable-model-invocation": true
}

Ensure the handler and tests for $ARGUMENTS provide comprehensive coverage.

1. Gather Documentation

Find documentation for the tool (need at least one source):

tldr:

ls ~/source/tldr/pages/*/$ARGUMENTS*.md
cat ~/source/tldr/pages/*/$ARGUMENTS.md

Local CLI:

$ARGUMENTS --help
man $ARGUMENTS

Stop if neither source exists.

2. Explore Subcommands

For tools with subcommands, recursively explore:

$ARGUMENTS <subcommand> --help
$ARGUMENTS help <subcommand>

Build a mental model of:

  • All subcommands and their actions
  • Which operations are read-only (safe) vs mutate state (unsafe)
  • Global flags that affect parsing
  • Edge cases

3. Review Existing Tests

Read tests/cli/test_$ARGUMENTS.py and check for:

  • Coverage of all subcommands
  • Both safe and unsafe variants of each action
  • Global flag handling
  • Edge cases from the docs

4. Add Missing Tests

Add aspirational test cases for anything missing. Follow existing format:

TESTS = [
    # --- Subcommand group ---
    ("$ARGUMENTS <subcommand> <safe-action>", True),
    ("$ARGUMENTS <subcommand> <unsafe-action>", False),
]

5. Iterate Until Tests Pass

just test

For each failure, determine if the test expectation is correct:

  • If yes, update src/dippy/cli/$ARGUMENTS.py
  • If no, fix the test

6. Verify

just check MUST pass before you're done.

Version History

  • 2edad4a Current 2026-07-24 21:07

Same Skill Collection

.claude/skills/add-command/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/verify-counts/SKILL.md
.claude/skills/debug/SKILL.md

Metadata

Files
0
Version
2edad4a
Hash
058968e9
Indexed
2026-07-24 21:07

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 23:53
浙ICP备14020137号-1 $Гость$