pytest-coverage Skill for Claude: Run Coverage and Add Missing Tests
Has Claude run pytest with coverage, find the lines your tests miss and keep adding tests until every line is covered.
- Installs
- 12.9K
- on skills.sh
- Stars
- 40.7K
- on GitHub
- Updated
- Oct 2026
- last repo commit
pytest-coverage is a one-file instruction skill in the github/awesome-copilot collection. When you ask Claude to raise test coverage, it runs pytest with the --cov option, writes an annotated copy of each source file into a cov_annotate folder, and looks for lines marked with "!" (not covered). It then adds tests for those lines and repeats until all lines are covered.
The skill bundles no scripts. It does run pytest in your project, so your tests and code execute on your machine, and it writes the cov_annotate folder there. SKILL.md does not say how to install the pytest coverage option it uses.
Good for
- Python developers who want a test suite that covers every line
- Teams backfilling tests on an untested module
- Maintainers who want a clear loop: measure, add tests, measure again
- Anyone who prefers one module at a time (the skill shows a --cov=module form)
Install pytest-coverage
Claude Code
- 1
Copy this prompt.
Install the pytest-coverage skill in Claude Code. Run this command: npx skills add https://github.com/github/awesome-copilot --skill pytest-coverage Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
Run pytest tests with coverage, discover lines missing coverage, and increase coverage to 100%.
Key facts
- Repository
- github/awesome-copilot
- Installs on skills.sh
- 12,873 as of 2026-11-02
- GitHub stars
- 40,666 for the whole repo, 2026-11-02
- License
- MIT (repo metadata)
- Last commit to the repo
- 2026-10-30
- Files
- 1 file (SKILL.md)
What it includes
Runs pytest --cov with an annotate report into cov_annotate
Runs the whole test suite with coverage on and writes one annotated file per source file into the cov_annotate folder.
Try: “Run pytest with coverage and tell me which files are below 100%.”
Runs code ·
Full coverage reportLimits coverage to one module with --cov=your_module_name
Measures coverage only for the module you name. You can also run chosen test files, such as tests/test_your_module.py.
Runs code ·
Single module reportLines starting with ! are not covered by tests
Files at 100% can be skipped. For the rest, Claude opens the matching file in cov_annotate and finds the lines marked with an exclamation mark.
Files ·
Read the annotated filesWrites tests for missed lines and reruns until all lines are covered
Claude adds tests for the uncovered lines, reruns the coverage command and keeps going until nothing is marked.
Try: “Add tests until the orders module has full line coverage.”
Runs code ·
Add tests and repeat
From the official docs
Permissions
Medium risk
Claude runs your tests and writes new test files plus a cov_annotate folder in your project. Use a branch and a test environment, and read the tests it adds.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It runs your test suite on your machine
Tests execute real code. If any test touches a real database, API or file path, running it repeatedly will hit them too. Use a test environment. github.com
It writes new tests and a report folder
Claude adds tests until every line is covered and creates a cov_annotate directory. Work on a branch and check what lands in git status. github.com
Technical details
| Scopes |
|
|---|
Questions
What does the pytest-coverage skill do?
It has Claude run pytest with coverage, find uncovered lines and add tests until all lines are covered.
How do I install pytest-coverage in Claude Code, the Claude app or Codex?
Use the install box at the top of this page. The skill is one SKILL.md file. It runs pytest in your project, so pick a client that can run terminal commands.
Does it need an API key?
SKILL.md names no API key and bundles no scripts. It uses pytest with the --cov option, and SKILL.md does not say how to install that option.
Is it safe?
It runs your test suite and writes a cov_annotate folder and new test files in your project. Run it on a git branch, review the tests Claude adds, and be careful if your tests touch real databases or services.
Does 100 percent coverage mean the code is correct?
No. Line coverage only shows which lines ran. The skill aims at covering every line, so read the tests Claude adds to check they assert something useful.
Does it work for other languages?
SKILL.md only covers pytest and Python.
Information
updated Nov 2, 2026
- Repository
- github/awesome-copilot
- Folder
skills/pytest-coverage
Sources
Docs, issue trackers and discussions this page is built from.
Show all 1Hide
- pytest-coverage SKILL.md · github.com