improve-test-coverage

Diagnose and fix test coverage gaps in codebases.

11|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/awood45/claude-coding-commands --skill improve-test-coverage-awood45
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: improve-test-coverage
Source: https://github.com/awood45/claude-coding-commands/tree/main/.claude/skills/improve-test-coverage
Command: npx skills add https://github.com/awood45/claude-coding-commands --skill improve-test-coverage-awood45

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you find why a codebase is missing test coverage and then close those gaps with the right fix, whether that means adding tests, mocking dependencies, or refactoring code to make it testable.

Core Features & Use Cases

  • Coverage Analysis: Locates the weakest files and uncovered paths using the project’s own coverage tooling.
  • Targeted Remediation: Adds unit tests for pure logic, exercises error branches, introduces mocks for external dependencies, and refactors untestable code when needed.
  • Threshold Protection: Keeps the existing coverage goal intact and works toward meeting or exceeding it instead of relaxing standards.
  • Use Case: A team notices a drop in coverage after a feature launch, and this Skill identifies the exact branches and files to test so the suite becomes trustworthy again.

Quick Start

Use the improve-test-coverage skill to analyze the current project or a specific file or package and then add the tests or refactoring needed to reach the coverage threshold.

Frequently Asked Questions about improve-test-coverage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find and fix missing unit test coverage in my codebase?

To fix missing unit test coverage, you diagnose uncovered paths using the project's coverage tooling, then add targeted tests, mock external dependencies, or refactor untestable code to close the gaps.

What causes test coverage to drop after a feature launch and how do I restore it?

Test coverage drops when new code paths lack tests, and you restore it by analyzing coverage reports to identify exact missing branches and adding unit tests or mocks to meet existing thresholds.

How do I make untestable code testable for unit testing?

To make untestable code testable for unit testing, you refactor the logic to isolate external dependencies and then apply mocking to exercise error branches and pure logic independently.

Do I need detailed coverage reports to diagnose missing error paths and branches?

Yes, you need detailed coverage reports to diagnose missing error paths and branches, because they locate the weakest files and uncovered paths using the project's own coverage tooling.

Can I improve test coverage for a specific file or package without lowering thresholds?

Yes, you can scope coverage analysis and remediation to a specific file or package, and the process preserves existing coverage thresholds while working toward meeting or exceeding them.

When should I use mocking versus refactoring to improve test coverage?

Use mocking to improve test coverage when external dependencies block unit testing, and use refactoring when code structure is fundamentally untestable and prevents pure logic or error branch execution.