What problem does it solve?
Python projects accumulate untested code paths that hide bugs in conditional branches, error handling, and edge cases. This Skill automates the cycle of measuring coverage, identifying high-impact gaps, and writing meaningful unit tests until coverage improves by a defined target.
Core Features & Use Cases
- Coverage Analysis: Runs the test suite with coverage, generates a JSON report, and prioritizes files by size and missing lines while skipping protobufs, vendor code, and already well-covered modules.
- Autonomous Test Implementation: Delegates test writing to subagents that follow project conventions such as pytest-style functions, parametrize, numpydoc docstrings, and integration-test markers.
- Iterative Verification: Re-runs tests and coverage until the 0.2% improvement target is met, then simplifies and reviews the changes.
- Use Case: A maintainer of the Streamlit repository wants to steadily raise unit test coverage in lib/streamlit without manually hunting for uncovered lines or writing boilerplate tests.
Quick Start
Ask the assistant to improve Python test coverage in this repository and let it run the coverage analysis and test-writing loop autonomously.