agentleFS
matusbumatusbu/claude-code-test-automation-skills/.claude/skills/verify-test-coverage/SKILL.md

verify-test-coverage

Skill0 starsChanged 6 months agoMITView on GitHub

Verify test coverage for code changes against the defined test strategy. Use when reviewing a feature branch, commit, or uncommitted changes to ensure adequate test coverage.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $scope is "uncommitted" or "unstaged": analyze uncommitted changes (git diff HEAD)

    line 19
  2. Very specific:

    If $scope is "last-commit": analyze the most recent commit (git diff HEAD~1 HEAD)

    line 20
  3. Very specific:

    If $scope matches pattern "last-N-commits": analyze last N commits from HEAD

    line 21
  4. Very specific:

    If $scope is empty or "branch": analyze diff between current feature branch and main (git diff main...HEAD)

    line 22
  5. Very specific:

    If $scope is a custom git range (e.g., "commit1..commit2"): use that range

    line 23
  6. Very specific:

    If $scope is unclear or not provided, ask the user what scope they want to analyze

    line 24
  7. Distinctive:

    Look for the test strategy definition to understand what needs to be tested.

    line 30
  8. Very specific:

    If not found, check .claude/ directory for strategy documentation

    line 34
  9. Distinctive:

    If user mentioned a specific strategy in their prompt, use that instead

    line 35
  10. Distinctive:

    If no strategy file found, ask the user where the test strategy is defined

    line 36
  11. Distinctive:

    Search for existing tests covering those changes

    line 43
  12. Distinctive:

    If gaps exist, propose concrete test cases that need to be written.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Verify Test Coverage

Analyze test coverage for code changes and identify gaps based on the test strategy.

Step 1: Detect scope of change

The scope defines which code changes to analyze for test coverage.

Scope options:

  • If $scope is "uncommitted" or "unstaged": analyze uncommitted changes (git diff HEAD)
  • If $scope is "last-commit": analyze the most recent commit (git diff HEAD~1 HEAD)
  • If $scope matches pattern "last-N-commits": analyze last N commits from HEAD
  • If $scope is empty or "branch": analyze diff between current feature branch and main (git diff main...HEAD)
  • If $scope is a custom git range (e.g., "commit1..commit2"): use that range
  • If $scope is unclear or not provided, ask the user what scope they want to analyze

Determine the appropriate git command and execute it to get the diff.

Step 2: Locate test strategy

Look for the test strategy definition to understand what needs to be tested.

Strategy location:

  • First, check if TEST_STRATEGY.md exists in the repository root
  • If not found, check .claude/ directory for strategy documentation
  • If user mentioned a specific strategy in their prompt, use that instead
  • If no strategy file found, ask the user where the test strategy is defined

Step 3: Review current test coverage

Based on the code changes from Step 1 and test strategy from Step 2:

  1. Identify what files were changed and what functionality was added/modified
  2. Search for existing tests covering those changes
  3. Compare existing test coverage against the test strategy requirements
  4. Determine coverage according to the test levels defined in the strategy file

Step 4: Report results and gaps

Provide a summary:

  • Scope analyzed: what code changes were reviewed
  • Test coverage found: list existing tests covering the changes
  • Gaps identified: what's missing based on the test strategy
  • Recommendations: specific tests that should be added to close the gaps

If gaps exist, propose concrete test cases that need to be written.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.