home / skills / openclaw / skills / ai-coverage-boost
This skill analyzes test coverage gaps and automatically generates targeted tests to improve code paths and edge-case handling.
npx playbooks add skill openclaw/skills --skill ai-coverage-boostReview the files below or copy the command above to add this skill to your agents.
---
name: coverage-boost
description: Generate tests to hit uncovered code paths
---
# Coverage Boost
Your coverage is at 67% and PM wants 80%. This tool finds uncovered lines and generates tests for them.
## Quick Start
```bash
npx ai-coverage-boost ./src/utils/helpers.ts
```
## What It Does
- Analyzes existing test coverage
- Identifies uncovered code paths
- Generates targeted tests for gaps
- Focuses on edge cases you missed
## Usage Examples
```bash
# Boost coverage for a file
npx ai-coverage-boost ./src/utils/validators.ts
# Target a specific function
npx ai-coverage-boost ./src/api.ts --function processOrder
# Generate Jest tests
npx ai-coverage-boost ./src --framework jest
```
## What It Generates
- Unit tests for uncovered branches
- Edge case tests
- Error handling tests
- Boundary condition tests
## Requirements
Node.js 18+. OPENAI_API_KEY required. Existing coverage report helps.
## License
MIT. Free forever.
---
**Built by LXGIC Studios**
- GitHub: [github.com/lxgicstudios/ai-coverage-boost](https://github.com/lxgicstudios/ai-coverage-boost)
- Twitter: [@lxgicstudios](https://x.com/lxgicstudios)
This skill generates tests that target uncovered code paths to raise project coverage quickly. It analyzes existing coverage, finds gaps, and produces focused unit tests for edge cases, error handling, and boundary conditions. Use it to accelerate reaching coverage targets with minimal manual test writing.
The tool inspects coverage reports and source files to identify untested branches and lines. It then generates test scaffolds or full tests (Jest by default) that exercise those paths, including edge cases and error scenarios. You can target files, directories, or individual functions and supply an existing coverage report to guide generation.
Which test frameworks are supported?
It generates Jest tests by default and can be configured for common JS testing frameworks where supported.
Do I need an API key or special runtime?
Yes. Node.js 18+ is required and an OPENAI_API_KEY must be set for generation to work.