testdoc-gapslisted
Install: claude install-skill vivekbhange-hub/test-doctor-skill
# testdoc-gaps: where to write tests first
A coverage percentage says how much, not where. `cov_gaps.py` ranks files by priority (uncovered
lines multiplied by the share of the file that is uncovered), lists the exact ranges, and names
the functions nothing calls. Your job is to turn the top of that list into real tests.
## Inputs
- A coverage file: `lcov.info`, Cobertura `coverage.xml`, or coverage.py `coverage.json`. If the
user has none, show how to produce one for their stack (`coverage json` or `coverage lcov`
after `coverage run -m pytest`, `jest --coverage --coverageReporters=lcov`,
`go test -coverprofile` then a converter, JaCoCo to Cobertura XML).
- Optional: a git ref to compare against, for "what did my branch leave untested".
- Commands below say `python3`; on Windows use `python` (or `py -3`).
## Outputs
- `testdoc/coverage-gaps.md`: ranked files with ranges, branches and never-called functions.
- A short plan: the 3 to 5 places to test first, each with the behaviour worth pinning down.
- New tests (through `testdoc-write`) for as many of those as the user wants.
## Steps
1. **Confirm permission.** Run the tests and read the code only in a repository the user owns or
is authorized to work on.
2. **Make sure the coverage is fresh.** Coverage from an old commit points at the wrong lines.
If the file is older than the last code change, regenerate it first.
3. **Run the report.**
```
python3 "${CLAUDE_SKILL_DIR}/cov_gaps.py" coverage/lcov.i