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.
In this repositoryOne other file it gives its agents.
- test-design-reviewSkill
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
- Very specific: line 19
If $scope is "uncommitted" or "unstaged": analyze uncommitted changes (git diff HEAD)
- Very specific: line 20
If $scope is "last-commit": analyze the most recent commit (git diff HEAD~1 HEAD)
- Very specific: line 21
If $scope matches pattern "last-N-commits": analyze last N commits from HEAD
- Very specific: line 22
If $scope is empty or "branch": analyze diff between current feature branch and main (git diff main...HEAD)
- Very specific: line 23
If $scope is a custom git range (e.g., "commit1..commit2"): use that range
- Very specific: line 24
If $scope is unclear or not provided, ask the user what scope they want to analyze
- Distinctive: line 30
Look for the test strategy definition to understand what needs to be tested.
- Very specific: line 34
If not found, check .claude/ directory for strategy documentation
- Distinctive: line 35
If user mentioned a specific strategy in their prompt, use that instead
- Distinctive: line 36
If no strategy file found, ask the user where the test strategy is defined
- Distinctive: line 43
Search for existing tests covering those changes
- Distinctive: line 55
If gaps exist, propose concrete test cases that need to be written.
≈ “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.
Files
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
$scopeis "uncommitted" or "unstaged": analyze uncommitted changes (git diff HEAD) - If
$scopeis "last-commit": analyze the most recent commit (git diff HEAD~1 HEAD) - If
$scopematches pattern "last-N-commits": analyze last N commits from HEAD - If
$scopeis empty or "branch": analyze diff between current feature branch and main (git diff main...HEAD) - If
$scopeis a custom git range (e.g., "commit1..commit2"): use that range - If
$scopeis 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.mdexists 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:
- Identify what files were changed and what functionality was added/modified
- Search for existing tests covering those changes
- Compare existing test coverage against the test strategy requirements
- 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.
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
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.

