skills/test-coverage/SKILL.md
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.
npx skillsauth add luongnv89/skills test-coverageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expand unit test coverage by targeting untested branches and edge cases.
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".
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 pop
If origin is missing, pull is unavailable, or rebase/stash conflicts occur, stop and ask the user before continuing.
Before making any changes:
feat/, feature/, etc.)feat/test-coverageRun the coverage command for the detected Stack above.
From the report, identify:
Review code for:
Use the test framework for the detected Stack above.
Target scenarios:
Run coverage again and confirm measurable increase. Report:
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.
A run passes when all of the following are true:
jest --coverage, pytest --cov, go test -cover).npm test, pytest, go test ./..., etc.).feat/test-coverage), never on main/master.package.json, pyproject.toml, Cargo.toml, or go.mod for test dependencies; if none found, asks the user which framework to use before writing any tests.pytest-cov, nyc, cargo tarpaulin, etc.) and retries rather than failing silently.pytest-asyncio, jest fakeTimers) rather than bare sync wrappers.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 | PARTIAL
Adapt 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
development
Scan a live site with isitagentready.com, then approve each step: triage the 0-5 agent-readiness score, write agent-ready-plan.md, file issues via /plan-to-issues. Don't use for applying llms.txt/SEO fixes (seo-ai-optimizer) or app-store ASO.
development
Review a product codebase and landing page against 32 viral principles and produce a Virality Score plus ranked fixes. Use to audit virality or prioritize growth. Don't use for SEO, ASO, copywriting, or code review.
development
Generate a Technical Architecture Document (TAD) from a PRD. Use when asked to design system architecture or define how a product is built. Updates tad.md and reports GitHub links. Don't use for PRD authoring, sprint tasks, or code implementation.
development
Check product and brand names for conflicts across trademarks, domains, social handles, and package registries. Returns a risk level and Proceed/Modify/Abandon recommendation. Skip for name brainstorming, logo design, or trademark filings.