Automated summary
Analyzes a project's test coverage, identifies the most critical untested code paths, and generates tests to close those gaps.
Strengths
- Automatically detects the project's coverage tooling (Jest, Vitest, c8, pytest, Go, tarpaulin) and runs the matching command
- Falls back to static analysis of functions and branches when no coverage tool is configured
- Prioritizes gaps by business impact, error handling, security sensitivity, and cyclomatic complexity instead of raw percentages
- Outputs a prioritized improvement plan with current coverage, targets, and needed tests, while following existing test conventions
Limitations
- Assumes coverage commands are installed and runnable; failures are silenced with 2>/dev/null and can hide the real cause
- Real coverage execution is limited to the listed ecosystems (npm, Python, Go, Rust)
- Test generation focuses on the top five critical areas, not exhaustive coverage
Use it before a release or code review to find and fill coverage gaps in the parts of the code that matter most.
Skip it if you want to mechanically hit 100% coverage, or if the project has no tests and no coverage tooling yet and needs an overall test strategy first.
Security analysis
CautionThe skill uses powerful but appropriate tools for test coverage analysis: it runs local coverage commands, inspects project files, and writes generated tests. There is no evidence of destructive commands, secret exfiltration, obfuscated payloads, or safety bypass. The main risk is normal for developer tooling: executing project tests and package-manager commands can run arbitrary repository code, so it is best treated as caution rather than safe.
- •Bash is allowed and the skill runs project test/coverage commands such as `npx jest`, `npx vitest`, `pytest`, `go test`, and `cargo tarpaulin`, which execute repository code and may fetch/install tooling.
- •Write is allowed and the skill generates new test files in the target project.
- •Inline detection commands read project configuration files (e.g., `package.json`, `pyproject.toml`), which is legitimate but still accesses local project metadata.
Examples
/code-coverage src/billing/invoice.ts/code-coverage allRun code coverage on the auth module, show me the uncovered error paths, and generate tests for the most critical ones before we ship.name: code-coverage description: "Analyzes test coverage, identifies untested code paths, and generates tests for the most critical uncovered areas. Use to improve test coverage before releases." argument-hint: "[file, module, or 'all']" allowed-tools: Read, Grep, Glob, Bash, Write
Test Coverage Analysis
Detect Test Setup
!ls package.json jest.config.* vitest.config.* .nycrc* .c8rc* .coveragerc* setup.cfg pyproject.toml tox.ini 2>/dev/null
!cat package.json 2>/dev/null | grep -E "jest|vitest|c8|nyc|istanbul|coverage" | head -5
Process
Step 1: Run Coverage (if configured)
Attempt to run the project's coverage command:
| Ecosystem | Coverage Command |
|-----------|-----------------|
| npm (Jest) | npx jest --coverage --json 2>/dev/null |
| npm (Vitest) | npx vitest run --coverage 2>/dev/null |
| npm (c8) | npx c8 report --reporter=json 2>/dev/null |
| Python (pytest) | python -m pytest --cov --cov-report=json 2>/dev/null |
| Go | go test -coverprofile=coverage.out ./... 2>/dev/null && go tool cover -func=coverage.out |
| Rust | cargo tarpaulin --out json 2>/dev/null |
If coverage tools aren't configured, proceed with static analysis.
Step 2: Static Analysis (if no coverage tool)
For the target file(s):
- Identify all public functions, methods, and classes
- Search for corresponding test files
- For each function, check if there's a test that calls it
- Map which code paths (branches, error handlers) have test coverage
Step 3: Coverage Report
Summary
| Metric | Value | |--------|-------| | Line coverage | XX% | | Branch coverage | XX% | | Function coverage | XX% | | Uncovered files | X |
Uncovered Critical Code
List the most important uncovered code, prioritized by:
- Business logic — core features and workflows
- Error handling — catch blocks, error paths, edge cases
- Security-sensitive — auth, input validation, data access
- Complex logic — functions with high cyclomatic complexity
For each uncovered area:
- File path and line numbers
- What the code does
- Why it's important to test
- Suggested test cases
Step 4: Generate Missing Tests
For the top 5 most critical uncovered areas, generate test code following the project's test patterns (same structure as /write-tests).
Step 5: Coverage Improvement Plan
| Priority | File | Current | Target | Tests Needed | |----------|------|---------|--------|-------------| | 1 | ... | XX% | 80%+ | ... | | 2 | ... | XX% | 80%+ | ... |
Rules
- Focus on meaningful coverage, not 100% — test behavior, not implementation
- Prioritize business logic and error paths over boilerplate
- Don't generate tests just to increase numbers — each test should validate something valuable
- Respect existing test patterns and conventions
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/code-coverage-analysis-mrwakb91/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/code-coverage-analysis-mrwakb91' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/code-coverage-analysis-mrwakb91/download' --output '.skill-downloads/code-coverage-analysis-mrwakb91/SKILL.md.part' && mv '.skill-downloads/code-coverage-analysis-mrwakb91/SKILL.md.part' '.skill-downloads/code-coverage-analysis-mrwakb91/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Grep, Glob, Bash, Write
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/code-coverage-analysis-mrwakb91/SKILL.md' && test -s '.skill-downloads/code-coverage-analysis-mrwakb91/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/code-coverage' && cp -R '.skill-downloads/code-coverage-analysis-mrwakb91' '.claude/skills/code-coverage'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/code-coverage-analysis-mrwakb91'openskills read 'code-coverage-analysis-mrwakb91'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/code-coverage-analysis-mrwakb91/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
ClickHouse Performance Comparison
Testing
Evaluate ClickHouse performance test results, check PR performance changes, compare with history, and assess whether a result is actionable.
Analyze CI Performance Reports
Testing
Analyze CI performance comparison reports for a ClickHouse PR. Cross-references master history to distinguish real regressions from flaky tests.
Santa Method
Testing
Multi-agent adversarial verification with two independent reviewers. Output is checked twice and iteratively fixed until both pass before shipping.