skills/test-coverage/SKILL.md
Expand unit test coverage by targeting untested branches and edge cases. Use when users ask to "increase test coverage", "add more tests", "expand unit tests", "cover edge cases", "improve test coverage", "find untested code", "what's not tested", "run coverage report", "write missing tests", or want to identify and fill gaps in existing test suites. Adapts to project's testing framework. Trigger this skill whenever the user mentions test gaps, untested code, coverage percentages, or wants to harden their test suite.
npx skillsauth add montimage/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.
Before making any changes, sync with the remote to avoid conflicts:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"
If the working tree is dirty, stash first, sync, then pop. If origin is missing or conflicts occur, stop and ask the user before continuing.
Before making any changes:
feat/, feature/, etc.)feat/test-coverageUse sub-agents for parallel discovery. Launch multiple Agent tool calls concurrently to keep the main context clean:
package.json, tsconfig.json, pyproject.toml, setup.py, Cargo.toml, go.mod, and identify the primary language(s), testing framework, and coverage tool. Check for existing test configuration (jest.config, vitest.config, pytest.ini, .coveragerc). Return a structured summary.Collect the results from both agents before proceeding.
Then run the appropriate coverage command for the project's stack:
# JavaScript/TypeScript (Jest)
npx jest --coverage --coverageReporters=text --coverageReporters=json-summary
# JavaScript/TypeScript (Vitest)
npx vitest run --coverage
# Python (pytest)
python -m pytest --cov=. --cov-report=term-missing
# Go
go test -coverprofile=coverage.out ./... && go tool cover -func=coverage.out
# Rust
cargo tarpaulin --out Stdout
From the report, identify:
Use sub-agents for parallel file analysis. When multiple low-coverage files are identified, dispatch independent agents to analyze them concurrently:
Each agent should look for:
Collect all agent results and prioritize gaps by risk: error paths and boundary values cause the most production bugs.
Use the project's existing testing framework and follow its conventions. Detect which framework is in use by checking config files and existing test files.
| Stack | Framework | Test Location Pattern |
|-------|-----------|----------------------|
| JS/TS | Jest | __tests__/ or *.test.ts |
| JS/TS | Vitest | *.test.ts or *.spec.ts |
| Python | pytest | tests/ or test_*.py |
| Go | testing | *_test.go in same package |
| Rust | built-in | #[cfg(test)] module in same file |
Use sub-agents for parallel test writing. When gaps span multiple independent files or modules, dispatch sub-agents concurrently to write tests in parallel:
Collect all agent results, then verify no conflicts between test files (e.g., duplicate test names, shared fixtures).
For each gap, write focused test cases:
test_parse_returns_error_on_empty_input not test_parse_2Run coverage again with the same command from Step 1 and confirm:
Report the before/after coverage numbers to the user.
development
Audit npm/pip/Docker/GitHub Actions for supply chain risks; apply cooldown, lockfile, ignore-scripts, SHA pinning, scanning after approval. Use for 'supply chain audit', 'harden dependencies'. Skip for runtime vulns, secret scanning, code review.
development
Analyze agent skills for security risks, malicious patterns, and potential dangers before installation. Use when asked to "audit a skill", "check if a skill is safe", "analyze skill security", "review skill risk", "should I install this skill", "is this skill safe", "scan this skill", or when evaluating any skill directory for trust and safety. Also triggers when the user pastes a skill install command like "npx skills add https://github.com/org/repo --skill name". Produces a comprehensive security report with a clear install/reject verdict. Trigger this skill proactively whenever the user is about to install a third-party skill or mentions concerns about skill safety.
development
Add OSS-standard files (README, CONTRIBUTING, LICENSE, CODE_OF_CONDUCT, SECURITY, GitHub templates) and run an 8-section readiness audit. Use for 'make this open source', 'OSS readiness', 'public release'. Skip for marketing pages or closed code.
testing
Prepare a repository for end-to-end OSS release across 6 sub-agent steps: audit, branch cleanup, docs, README, publications, optional Pages. Use for 'full OSS prep', 'OSS release flow', 'open-source this repo'. Skip for audit-only (use oss-ready) or single-doc edits.