check-tests
Skill1 starsChanged 2 months agoMITView on GitHub
Check test coverage for changes on the current branch. Args: [<file-or-module>]
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Shri-Phnx/claude-skillstheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Shri-Phnx/claude-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository17 other files it gives its agents.
- check-drySkill
- create-commit-messageSkill
- create-unit-testsSkill
- deslop-proseSkill
- deslopSkill
- fanout-reviewSkill
- fix-security-auditSkill
- framework-upgrade-guideSkill
- generate-adrSkill
- learnSkill
- optimizeSkill
- pr-descriptionSkill
- resolve-merge-conflictsSkill
- security-checkSkill
- ship-itSkill
- takeawaysSkill
- update-claude-mdSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
If the value does not resolve to an existing file or directory, the skill stops and asks rather than silently falling back to the whole …
- Distinctive: line 29
If the user prompt names a branch explicitly, use it.
- Distinctive: line 32
If neither exists, stop and ask which branch to diff against.
- Very specific: line 34
If $ARGUMENTS is non-empty and resolves to an existing file or directory, narrow the scope to it.
- Distinctive: line 40
Check whether adequate tests exist for those changes
- Distinctive: line 42
Check if test format is consistent with other existing tests in the project
- Distinctive: line 77
Before the Next Steps block, print:
- Very specific: line 81
If any changed file could not be parsed (binary, unsupported language), the audit must list it under skipped (non-code).
- Very specific: line 85
If gaps exist: Run /create-unit-tests <same scope> to close the gaps.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
<!-- Note: $ARGUMENTS is substituted by Claude commands only. In Copilot,
the user must include their argument inline in the prompt; the skill
body sees the literal text "$ARGUMENTS" unsubstituted. -->Arguments
[<file-or-module>]
- Optional. Narrows the scope to a specific file or module; default is the branch diff vs the resolved base branch (
origin/HEAD, elsemain, elsemaster). - If the value does not resolve to an existing file or directory, the skill stops and asks rather than silently falling back to the whole branch diff.
- Examples:
/check-tests,/check-tests src/auth.ts
Copilot CLI note:
$ARGUMENTSdoes not substitute in skills; include the argument inline in your prompt.
Check Branch Tests
Analyze test coverage for this branch changes.
Scope
Diff between this branch and the base branch. Resolve the base branch in this order:
- If the user prompt names a branch explicitly, use it.
- Else
git symbolic-ref refs/remotes/origin/HEADif it resolves. - Else
mainif it exists locally, elsemaster. - If neither exists, stop and ask which branch to diff against.
If $ARGUMENTS is non-empty and resolves to an existing file or directory, narrow the scope to it. If $ARGUMENTS is a string that does not resolve to a real path, stop and ask; do not silently fall back to the whole branch diff.
Task
For each changed file in the diff:
- Identify functions/methods that were added or modified
- Check whether adequate tests exist for those changes
- Flag untested code paths, missing edge cases, and regression gaps
- Check if test format is consistent with other existing tests in the project
- AAA adherence: flag tests missing clear Arrange / Act / Assert separation or with multiple logical assertions crammed in
- FIRST compliance: flag tests that are slow, order-dependent, non-repeatable (unmocked
time.now/ random), or rely onprintinstead of assertions - Flaky-test smells:
sleep/setTimeout/ timing waits, unmocked clock or randomness, shared mutable state between tests - Mock placement: flag mocks of the SUT or its internal helpers: mocks belong at boundaries (network, filesystem, clock, randomness) only
- Behavior vs implementation: flag assertions on private methods / internal data structures; public-contract assertions only
- Near-duplicate tests: flag pairs that differ only by input: should be parameterised
- Name quality: flag vague names like
test_1,works,happy; expectshould_<expected>_when_<condition>orgiven_<state>_when_<action>_then_<outcome>
Output format
For each finding, report:
- File and line number(s) of the changed code
- What is untested and why it matters (risk, edge cases, regression surface)
- Suggested test cases: with a code example of the missing test
Group findings by severity: Critical (Untested: core logic, error paths) -> Improvement (Partially tested: missing edge cases) -> Quick win (Minor gaps: trivial branches)
Verdict
- Total changed functions: N
- Fully covered: N
- Gaps found: N
- Estimated branch coverage on scope: %
- Flakiness-risk flags: N
- Risk assessment:
- LOW: >=80% estimated branch coverage AND zero flakiness flags AND no critical gaps.
- MEDIUM: 50 to 79% coverage, OR any flakiness flag, OR any improvement-severity gap.
- HIGH: <50% coverage, OR any critical gap (untested error path / untested core logic).
(80% is the LOW threshold because error-handling branches are the most common regression source in production code; lower coverage typically leaves an entire catch or fallback branch untested. If the user passes --coverage <n>, use <n> instead.)
Audit
Before the Next Steps block, print:
Audit: scope=<path | branch-diff>, base=<resolved-branch>, files scanned=N, functions found=F, with tests=T, gaps=G, skipped (non-code)=<list>. Subagents dispatched=0 (synchronous skill).
If any changed file could not be parsed (binary, unsupported language), the audit must list it under skipped (non-code). Do not silently drop.
Next steps
- If gaps exist:
Run /create-unit-tests <same scope> to close the gaps. - Always:
Re-run /check-tests <same scope> after creating tests to verify.
End with a Mentoring section: if any gap is a good learning opportunity, briefly explain the underlying principle (e.g. testing behavior vs implementation, boundary testing, arrange-act-assert). Sharing knowledge improves code health over time.
Rules
- DO NOT write tests. DO NOT edit any files. Report only.
- Technical facts and data overrule opinions and personal preferences.
- Match the project existing test framework, file layout, and naming when suggesting new tests; do not propose Jest patterns in a Vitest project, etc.
- Focus on the code, not the developer.
- Suggested-test examples should be 5 to 15 lines of runnable code, not prose.
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.

