test-coverage
Skill129 starsChanged 2 months agoMITView on GitHub
Generate unit tests for untested branches and edge cases. Use when coverage is low, CI flags gaps, or a release needs hardening. Not for integration/E2E suites, framework migrations, or fixing production bugs.
13 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- jamesdebatty/skillstheir own version, first seen Sep 8, 2026
- drvoss/everything-copilot-clitheir own version, first seen Aug 9, 2026
- PatriotAgenticLLC/better_claude_skillztheir own version, first seen Jul 1, 2026
- hadyfayed/laravel-agenttheir own version, first seen Jun 23, 2026
- kartik-nighania/av_claude_code_workshoptheir own version, first seen Jun 14, 2026
- kirti/reactforge-demotheir own version, first seen Jun 1, 2026
Used with
Projects with it also use instinct-export, instinct-import and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TheKREATORSSkillinstinct-export
Export instincts from project/global scope to a file
Also in 3 projects that use this
TheKREATORSSkillinstinct-import
Import instincts from file or URL into project/global scope
Also in 3 projects that use this
diego-tobalinaSkillbuild-fix
Fix build and compilation errors systematically. Run when build fails.
Also in 3 projects that use this
WorldFlowAISkilleval-harness
Also in 4 projects that use this
Microsoft AzureSkilliterative-retrieval
Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work.
Also in 3 projects that use this
qtzx06Skilleval
Evaluate trained YOLO model accuracy with mAP metrics and per-class error analysis. Identifies failure cases for targeted improvement. Use after training.
Also in 3 projects that use this
- +1 more from TheKREATORS
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- Montimage/skills★ 912% same
Wrote their own version · 12
- NeoLabHQ/context-engineering-kit★ 1.7ksame name
- drvoss/everything-copilot-cli★ 47same name
- Minh-Tam-Solution/EndiorBot★ 19same name
- hadyfayed/laravel-agent★ 14same name
- kartik-nighania/av_claude_code_workshop★ 4same name
- PatriotAgenticLLC/better_claude_skillz★ 3same name
- peopleforrester/claude-dotfiles★ 3same name
- kirti/reactforge-demo★ 2same name
- Nordic-AI/production-readiness-skills★ 2same name
- drafael/coding-harness★ 1same name
2 more not listed
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 repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-configSkill
- appstore-review-checkerSkill
- aso-marketingSkill
- auto-pushSkill
- brand-name-checkerSkill
- cli-builderSkill
- codebase-modernizerSkill
- code-reviewSkill
- dev-machine-setupSkill
- devops-pipelineSkill
- drawio-generatorSkill
- excalidraw-generatorSkill
- diagram-generatorSkill
- doc-managerSkill
- dont-make-me-thinkSkill
- frontend-designSkill
- herdr-agentSkill
- idea-validatorSkill
- install-script-generatorSkill
- issue-work-loopSkill
- landing-page-generatorSkill
- logo-designerSkill
- ollama-optimizerSkill
- opencode-runnerSkill
- oss-readySkill
- plan-to-issuesSkill
- prd-generatorSkill
- release-managerSkill
- security-setupSkill
- seo-ai-optimizerSkill
- tad-generatorSkill
- tasks-generatorSkill
- tmux-agent-commsSkill
- ux-ax-reviewSkill
- viral-product-evaluatorSkill
- website-agent-readinessSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. 0 are common, 15 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
15
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 33
If none of these manifests is found, see Edge Cases — "No test framework detected".
- Very specific: line 36
Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
- Distinctive: line 44
If the working tree is not clean, stash first, sync, then restore:
- Very specific: line 53
If origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.
- Distinctive: line 59
Before making any changes:
- Distinctive: line 60
Check the current branch - if already on a feature branch for this task, skip
- Very specific: line 61
Check the repo for branch naming conventions (e.g., feat/, feature/, etc.)
- Very specific: line 62
Create and switch to a new branch following the repo's convention, or fallback to: feat/test-coverage
- Distinctive: line 66
Run the coverage command for the detected Stack above.
- Distinctive: line 84
Use the test framework for the detected Stack above.
- Distinctive: line 94
Run coverage again and confirm measurable increase.
- Distinctive: line 95
Before/after coverage percentages
- Distinctive: line 101
After a successful run on a Python project, the final verification report shows:
- Distinctive: line 130
Existing tests are already failing: Does not add new tests until existing failures are resolved.
- Distinctive: line 137
After completing each major step, output a status report in this format:
- Distinctive: line 163
Follow existing test patterns and naming conventions
- Distinctive: line 164
Place test files alongside source or in the project's existing test directory
- Distinctive: line 166
Use descriptive test names that explain the scenario
- Distinctive: line 167
Do not mock what you do not own — prefer real collaborators over mocks at external boundaries
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test Coverage Expander
Expand unit test coverage by targeting untested branches and edge cases.
When to Use
- User asks to "increase test coverage", "add more tests", "expand unit tests", or "cover edge cases"
- A CI pipeline reports low coverage and the user wants it improved
- A code review flags untested error paths or boundary conditions
- The user wants to identify and fill gaps in an existing test suite before a release
Stack (detect before Step 1 of Workflow)
Detect the project's language from its manifest file and use the matching commands throughout the Workflow below:
| Manifest | Stack | Coverage command | Test framework |
package.json | JavaScript/TypeScript | npx jest --coverage or npx vitest --coverage | Jest, Vitest, Mocha |
pyproject.toml | Python | pytest --cov=. --cov-report=term-missing | pytest, unittest |
go.mod | Go | go test -coverprofile=coverage.out ./... | testing, testify |
Cargo.toml | Rust | cargo tarpaulin or cargo llvm-cov | built-in test framework |
If none of these manifests is found, see Edge Cases — "No test framework detected".
Repo Sync Before Edits (mandatory)
Before creating/updating/deleting files in an existing repository, sync the current branch with remote:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"If the working tree is not clean, stash first, sync, then restore:
git stash push -u -m "pre-sync"
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin && git pull --rebase origin "$branch"
git stash popIf origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.
Workflow
0. Create Feature Branch
Before making any changes:
- Check the current branch - if already on a feature branch for this task, skip
- Check the repo for branch naming conventions (e.g.,
feat/,feature/, etc.) - Create and switch to a new branch following the repo's convention, or fallback to:
feat/test-coverage
1. Analyze Coverage
Run the coverage command for the detected Stack above.
From the report, identify:
- Untested branches and code paths
- Low-coverage files/functions (prioritize files below 60%)
- Missing error handling tests
2. Identify Test Gaps
Review code for:
- Logical branches (if/else, switch)
- Error paths and exceptions
- Boundary values (min, max, zero, empty, null)
- Edge cases and corner cases
- State transitions and side effects
3. Write Tests
Use the test framework for the detected Stack above.
Target scenarios:
- Error handling and exceptions
- Boundary conditions
- Null/undefined/empty inputs
- Concurrent/async edge cases
4. Verify Improvement
Run coverage again and confirm measurable increase. Report:
- Before/after coverage percentages
- Number of new test cases added
- Files with the biggest coverage gains
Expected Output
After a successful run on a Python project, the final verification report shows:
Coverage before: 61% (47/77 statements)
Coverage after: 84% (65/77 statements)
New tests added: 9
Files improved:
- src/parser.py 52% → 91% (+7 tests: null input, empty string, unicode overflow)
- src/auth.py 71% → 88% (+2 tests: expired token, missing header)
All 56 tests passing. No regressions.Acceptance Criteria
A run passes when all of the following are true:
- Coverage report exists from a runnable command for the detected stack (e.g.,
jest --coverage,pytest --cov,go test -cover). - Post-run total coverage is strictly higher than the pre-run baseline — no test additions that fail to move the metric.
- New tests target previously-untested branches, error paths, or boundary values — not duplicates of existing assertions.
- The full test suite passes locally before committing (
npm test,pytest,go test ./..., etc.). - All new tests live on a feature branch (e.g.,
feat/test-coverage), never onmain/master. - Commit message records the before/after coverage percentages and the files newly covered.
Edge Cases
- No test framework detected: Skill checks
package.json,pyproject.toml,Cargo.toml, orgo.modfor test dependencies; if none found, asks the user which framework to use before writing any tests. - Coverage tool not installed: Installs the appropriate tool (
pytest-cov,nyc,cargo tarpaulin, etc.) and retries rather than failing silently. - Existing tests are already failing: Does not add new tests until existing failures are resolved; reports the failing tests to the user first.
- 100% coverage already reached: Reports this to the user and exits — no tests are added unnecessarily.
- Generated code or vendored files in coverage report: Excludes auto-generated and third-party directories from analysis to avoid writing tests for code the project does not own.
- Async / concurrent code paths: Uses framework-appropriate async test utilities (e.g.,
pytest-asyncio,jest fakeTimers) rather than bare sync wrappers.
Step Completion Reports
After completing each major step, output a status report in this format:
◆ [Step Name] ([step N of M] — [context])
··································································
[Check 1]: √ pass
[Check 2]: √ pass (note if relevant)
[Check 3]: × fail — [reason]
[Check 4]: √ pass
[Criteria]: √ N/M met
____________________________
Result: PASS | FAIL | PARTIALAdapt the check names to match what the step actually validates. Use √ for pass, × for fail, and — to add brief context. The "Criteria" line summarizes how many acceptance criteria were met. The "Result" line gives the overall verdict.
Branch Setup phase checks: Feature branch created, Base coverage measured
Analysis phase checks: Coverage report parsed, Gaps identified, Priority ranked
Test Writing phase checks: Tests written, Edge cases covered, Framework conventions followed
Verification phase checks: Tests pass, Coverage improved, No regressions
Guidelines
- Follow existing test patterns and naming conventions
- Place test files alongside source or in the project's existing test directory
- Group related test cases logically
- Use descriptive test names that explain the scenario
- Do not mock what you do not own — prefer real collaborators over mocks at external boundaries
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.

