| name | test-gaps |
| description | Find files with low test coverage that have changed recently. Runs pytest or jest/vitest, cross-references with `git log --since`, and emits a Markdown report ranking 'no test touches it' first, 'coverage below threshold' second. |
| effort | low |
| argument-hint | [--threshold N] [--days N] [--repo PATH] [--no-run] [--out PATH] |
| allowed-tools | Read, Write, Edit, Bash, Glob, Grep |
| policy_doc_kind | skill |
| classification | canonical |
| canonical_owner | self |
| authority_level | procedural |
| in_verifier_scope | true |
/test-gaps — Recent-Churn × Low-Coverage Cross-Reference
Find the highest-leverage gaps in your test suite: files that have changed in the last N days and either have no test coverage at all or fall below a threshold.
This is on-demand only. No cron, no daemon, no background worker. Run it when you want the answer.
Usage
/test-gaps
/test-gaps --threshold 80 --days 14
/test-gaps --repo ~/code/some-other-project <!-- pointer-check:skip -->
/test-gaps --no-run
The skill writes a Markdown report to:
~/.claude/reports/test-gaps/{YYYY-MM-DD}-{repo-slug}.md
And prints a one-line summary on stdout.
Supported Runners (Day 1)
| Runner | Detection | Coverage command |
|---|
pytest | pyproject.toml [tool.pytest] / pytest.ini / conftest.py / any test_*.py | pytest --cov=. --cov-report=json:.test-gaps-coverage.json |
jest / vitest | package.json declares jest or vitest, or jest/vitest config file | npx jest --coverage --coverageReporters=json-summary (or vitest run --coverage) |
cargo / go test are deferred — add a runner branch in scripts/test_gaps.py if/when needed.
Workflow
- Detect runner —
scripts/detect_runner.sh returns pytest, jest, or unsupported. Bail on unsupported.
- Run coverage —
pytest --cov or npx jest --coverage, tolerating test failures (we want the coverage data even if tests fail).
- Parse per-file coverage % — pytest
coverage.json , or jest .