Agent skill

Test Coverage

by luongnv89 in luongnv89/skills

Generate unit tests for untested branches and edge cases. An agent skill from luongnv89/skills.

MITAuto-check passedTesting & QA

Install Test Coverage

skills CLI
$ npx skills add luongnv89/skills --skill test-coverage -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install luongnv89/skills test-coverage --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/luongnv89/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/test-coverage .claude/skills/test-coverage && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
test-coverage
GitHub stars
131
Token cost
~2.5k tokens
SKILL.md length
1,222 words
Files
2
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

Generate unit tests for untested branches and edge cases. An agent skill from luongnv89/skills.

  • Works in 5 steps: Create Feature Branch → Analyze Coverage → Identify Test Gaps → …
  • Coverage is low
  • SKILL.md covers When to Use, Stack (detect before Step 1 of…, Repo Sync Before Edits… and Workflow, plus 5 more sections
  • Calls git, go and cargo

What it does

Test Coverage is an agent skill from luongnv89/skills. 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.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `docs/README.md`).

It sits in Testing & QA, covering Unit testing, Test coverage and Code migrations. The repository describes itself as: Supercharge your AI agents/bots with reusable skills. The licence is MIT.

When your agent uses it

  • Coverage is low
  • A release needs hardening

Example prompts

  • “/test-coverage”

Requirements

  • Python 3
  • Node.js

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Create Feature Branch
  2. Analyze Coverage
  3. Identify Test Gaps
  4. Write Tests
  5. Verify Improvement

What it can do on your machine

Read from SKILL.md and the folder at commit 8f80262. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • go
    • cargo
    • npx
    • pytest
    • jest
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, npx and npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Test Coverage loads about 2.5k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 1,222 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from luongnv89/skills at commit 8f80262, republished under its MIT licence (© luongnv89). 1,222 words, ~2,522 tokens.

Download SKILL.mdSave it as .claude/skills/test-coverage/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
test-coverage
description
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.
license
MIT
effort
low
metadata.version
1.4.1
metadata.author
Luong NGUYEN <luongnv89@gmail.com>

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:

ManifestStackCoverage commandTest framework
package.jsonJavaScript/TypeScriptnpx jest --coverage or npx vitest --coverageJest, Vitest, Mocha
pyproject.tomlPythonpytest --cov=. --cov-report=term-missingpytest, unittest
go.modGogo test -coverprofile=coverage.out ./...testing, testify
Cargo.tomlRustcargo tarpaulin or cargo llvm-covbuilt-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. First save git status --porcelain as the pre-sync list; Step 4 never stages those paths.

bash
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:

bash
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.

Workflow

0. Create Feature Branch

Before making any changes:

  1. Run git rev-parse --abbrev-ref HEAD. If it prints a branch other than main or master that was created for this task, skip to Step 1.
  2. Run git branch -a and note the prefix most existing branches use (e.g., feat/, feature/, test/).
  3. Create and switch to a new branch with that prefix. If no prefix is in use, name it feat/test-coverage.
1. Analyze Coverage

Run the coverage command for the detected Stack above. Record the total coverage percentage and the pass/fail counts as the baseline. If any test fails, stop here (see Edge Cases).

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
  1. Run the full test suite. If a new test fails, fix or remove it, then rerun. If a previously passing test now fails, report PARTIAL and name it.
  2. Run the same coverage command as Step 1.
  3. Compare the new total with the Step 1 baseline. If it is not strictly higher, report PARTIAL and list the Step 2 gaps that are still untested.
  4. If the full suite passed in item 1, commit the new tests on the feature branch with a message that records the before/after coverage percentages and the files newly covered. Stage each test file this run wrote by explicit path (git add tests/test_parser.py); never git add -A, git add . or git commit -a, which would sweep in user work Repo Sync restored. Never stage a path on the pre-sync list. Stage a changed manifest or lockfile (Coverage tool not installed) only with its reason in the commit message. Check git diff --cached --name-only before committing. Under Uncertainty:, list each changed file left unstaged, or every new test file when the commit is skipped (failed suite or regression).
  5. Print the final report. It opens with Result: — COMPLETE, PARTIAL — reason, or BLOCKED — reason — followed by:
    • Evidence: the commands that ran, with before/after totals and pass/fail counts
    • Uncertainty: what was not checked (e.g., excluded paths, CI not run, covered lines without output assertions)
    • Decision: the action that needs approval, or No approval needed, then any remaining user action (e.g., push the branch, open a PR)
    • The number of new test cases and the files with the biggest coverage gains

Expected Output

After a successful run on a Python project, the final verification report shows:

Result:       COMPLETE — coverage 61% → 84%, all tests pass
Evidence:     pytest --cov=. --cov-report=term-missing (before): 61% (47/77 statements), 47 passed
              same command (after): 84% (65/77 statements), 56 passed, 0 failed
Uncertainty:  CI not run; src/vendor/ excluded from coverage
Decision:     No approval needed. Next: push feat/test-coverage and open a PR.

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)
Show full SKILL.md (545 more words)Show less

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. A 100% baseline is the one exception (see Edge Cases).
  • 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 on main/master.
  • Commit message records the before/after coverage percentages and the files newly covered.
  • The commit holds only files this run wrote, staged by explicit path.

If any item fails, the final report says PARTIAL or BLOCKED and names the reason.

The final report must also be understandable:

  • The first line gives COMPLETE, PARTIAL or BLOCKED and the reason.
  • Evidence: (commands run and their observed totals) is separate from Uncertainty: (assumptions and unchecked behavior).
  • Each coverage number traces to a command output: the before/after totals and the per-file percentages.
  • Decision: names the approval needed or says No approval needed, and names any remaining user action.

These are instruction checks. Without reviewer feedback, human understanding of the report stays unconfirmed; agent inspection cannot confirm it.

Edge Cases

  • No test framework detected: Skill checks 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.
  • Coverage tool not installed: If the coverage command fails because the tool is missing, install it as a dev dependency (pytest-cov, nyc, cargo tarpaulin, etc.) and rerun the command once. If it fails again, stop and report BLOCKED with the error output.
  • Existing tests are already failing: If the Step 1 baseline run reports failing tests, do not write new tests. Stop and report BLOCKED with the names of the failing tests.
  • 100% coverage already reached: If the Step 1 baseline is 100%, add no tests. Report COMPLETE with the baseline as evidence and stop.
  • Generated code or vendored files in coverage report: Leave auto-generated and third-party paths (e.g., node_modules/, vendor/, dist/, build/, files with a generated-code header) out of the Step 2 gap list, and list them under Uncertainty:.
  • 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 | 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

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

© luongnv89, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/test-coverage of luongnv89/skills.

  • SKILL.md
  • docs/README.md

Open the folder on GitHubat commit 8f80262

Compare with similar skills

Test Coverage next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Test Coverage compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Test Coverage this skillluongnv89/skills131—~2.5kAutomated safety check: PassMIT
Atdd Mutateswingerman/engineer154—~2.7kAutomated safety check: PassMIT
Post Dev Testsd0xdev/sd0x-harness192—~1.8kAutomated safety check: NotesMIT
Scenario Testingaiskillstore/marketplace4301 repos~830Automated safety check: PassNone
Test Automationrevfactory/harness-1001.3k—~1.7kAutomated safety check: PassApache-2.0
Test Specialisttravisjneuman/.claude101—~3.7kAutomated safety check: PassMIT

Similar skills

  • Atdd Mutate

    swingerman/engineer

    A skill your agent uses to add a third validation layer to the ATDD workflow — after acceptance tests verify WHAT and unit tests verify HOW, mutation testing verifies the tests actually catch bugs.

    154 GitHub stars~2.7k tokensUpdated 14 days ago
    Testing & QAAuto-check passed
  • Post Dev Test

    sd0xdev/sd0x-harness

    Post-development test completion. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.8k tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Scenario Testing

    aiskillstore/marketplace

    This skill should be used when writing tests, validating features, or needing to verify code works.

    430 GitHub starsUsed in 1 repo~830 tokens
    Testing & QAAuto-check passed
  • Test Automation

    revfactory/harness-100

    A full test automation pipeline. An agent skill from revfactory/harness-100.

    1.3k GitHub stars~1.7k tokensUpdated 6 mo ago
    Testing & QAAuto-check passed
  • Test Specialist

    travisjneuman/.claude

    Test-writing patterns for JS/TS, Python, Go, and Rust (unit, integration, E2E, visual regression).

    101 GitHub stars~3.7k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Dotnet Testing

    novotnyllc/dotnet-artisan

    Defines .NET test strategy and implementation patterns across xUnit v3 (Facts, Theories, fixtures, IAsyncLifetime), integration testing (WebApplicationFactory, Testcontainers), Aspire testing…

    233 GitHub stars~972 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed

More from luongnv89/skills

All 37 skills in this repo
  • Dont Make Me Think

    luongnv89/skills

    Review UI usability using Steve Krug's principles and produce a scannable report.

    131 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Herdr Agent

    luongnv89/skills

    Manage AI agent fleets in Herdr: tile root + sub-agents in one tab, start/prompt/wait/read/monitor via the herdr agent CLI, steer any pane; help lists every operation.

    131 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Ollama Optimizer

    luongnv89/skills

    Optimize Ollama configuration for the current machine's hardware.

    131 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check: notes
  • Security Setup

    luongnv89/skills

    Install local-first security hardening: pre-commit secret detection, offline dependency scans, static analysis, reports, and gated free CI.

    131 GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed
  • Tasks Generator

    luongnv89/skills

    Generate sprint-based development tasks from a PRD. An agent skill from luongnv89/skills.

    131 GitHub stars~3.8k tokensUpdated yesterday
    Auto-check passed
  • Tmux Agent Comms

    luongnv89/skills

    Manage AI agents in tmux: spawn sessions, send messages, wait, capture replies, inspect fleets, and tear down safely.

    131 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Test Coverage

What does Test Coverage do?

Generate unit tests for untested branches and edge cases. An agent skill from luongnv89/skills. Test Coverage is an agent skill from luongnv89/skills. Generate unit tests for untested branches and edge cases.

When should I use Test Coverage?

Test Coverage fits situations like: coverage is low; A release needs hardening.

How do I install Test Coverage in Claude Code?

Run `npx skills add luongnv89/skills --skill test-coverage -a claude-code`. Or copy the skill folder (skills/test-coverage in luongnv89/skills) into .claude/skills/test-coverage in your project. Claude Code loads it when a task matches its description.

How do I install Test Coverage in Codex?

Run `npx skills add luongnv89/skills --skill test-coverage -a codex`. Or copy the skill folder (skills/test-coverage in luongnv89/skills) into .agents/skills/test-coverage in your project. Codex loads it when a task matches its description.

Can I use Test Coverage in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add luongnv89/skills --skill test-coverage -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/test-coverage, .gemini/skills/test-coverage, .github/skills/test-coverage and .opencode/skills/test-coverage in your project.

What does Test Coverage need to run?

Going by SKILL.md and its folder, Test Coverage needs the command-line tools its instructions call (git, go, cargo, npx, pytest and jest). Our summary lists: Python 3; Node.js.

Does Test Coverage access the network?

SKILL.md contains no URLs. Its commands use git, npx and npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Test Coverage safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Test Coverage use?

Test Coverage is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Test Coverage use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Test Coverage?

Skills that share tags, products or a category with Test Coverage: Atdd Mutate (swingerman/engineer, 154 stars), Post Dev Test (sd0xdev/sd0x-harness, 192 stars), Scenario Testing (aiskillstore/marketplace, 430 stars) and Test Automation (revfactory/harness-100, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Test Coverage?

luongnv89 (a GitHub user) maintains it in luongnv89/skills, which has 131 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on October 7, 2026.

Source: luongnv89/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.