Agent skill · luongnv89
test-coverage
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.
What it needs
About 4k tokens when loaded.
What this skill does
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: If the working tree is not clean, stash first, sync, then restore: If 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: 1. Check the current branch - if already on a feature branch for this task, skip 2. Check the repo for branch naming conventions (e.g., feat/, feature/, etc.) 3. 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. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills luongnv89/test-coverage