Skip to content
Back to skills

Test Coverage

ASecurity

Find untested code paths in a module and add focused tests that exercise the real risk

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 3, 2026
ai-agentsgotesting

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill test-coverage --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Coverage?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Test Coverage
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-test-coverage/badge)](https://www.skillsdirectory.com/skills/black141312-test-coverage)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test-coverage
description: Find untested code paths in a module and add focused tests that exercise the real risk
category: testing
---

# Test Coverage

Use when a module is under-tested and you need to raise meaningful coverage, not just the percentage.

1. Run the suite with coverage reporting enabled and read the per-file line/branch numbers for the target module.
2. Open the coverage report and locate uncovered lines, especially error handling, early returns, and conditional branches.
3. Rank gaps by risk: prioritize logic that can fail in production over trivial getters or generated code.
4. Write a test for each high-risk path, naming it after the behavior it pins (not "test_function_2").
5. Cover the negative and edge cases — empty inputs, nulls, boundary values, thrown exceptions — not just the happy path.
6. Re-run coverage to confirm the lines are hit, then sanity-check that each new test actually asserts something.

## Rules
- Chase uncovered branches and behaviors, not a coverage number; 100% line coverage with weak asserts is worthless.
- Do not add tests that only call code without asserting on results or side effects.
- Skip testing third-party libraries and trivial pass-throughs; focus on your own logic.
- A surprising uncovered path often signals dead code — confirm it is reachable before testing it.
- Keep each test isolated; do not rely on order or shared mutable state to hit a path.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.