Analyzes test coverage and helps implement missing tests for Python projects.
Install
mkdir -p .claude/skills/test-coverage-improver && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/3415" && unzip -o skill.zip -d .claude/skills/test-coverage-improver && rm skill.zipInstalls to .claude/skills/test-coverage-improver
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Improve test coverage in the OpenAI Agents Python repository: run `make coverage`, inspect coverage artifacts, identify low-coverage files, propose high-impact tests, and confirm with the user before writing tests.Key capabilities
- →Runs code coverage suites
- →Generates coverage XML and HTML artifacts
- →Identifies low-coverage files and lines
- →Proposes targeted test scenarios
- →Verifies coverage improvements after implementation
How it works
It uses the `make coverage` command to collect execution data, analyzes the output for gaps, and proposes incremental test additions.
Inputs & outputs
When to use test-coverage-improver
- →Identify low-coverage files in Python repo
- →Generate test coverage HTML reports
- →Implement missing tests for public APIs
About this skill
Test Coverage Improver
Overview
Use this skill whenever coverage needs assessment or improvement (coverage regressions, failing thresholds, or user requests for stronger tests). It runs the coverage suite, analyzes results, highlights the biggest gaps, and prepares test additions while confirming with the user before changing code.
Quick Start
- From the repo root run
make coverageto regenerate.coveragedata andcoverage.xml. - Collect artifacts:
.coverageandcoverage.xml, plus the console output fromcoverage report -mfor drill-downs. - Summarize coverage: total percentages, lowest files, and uncovered lines/paths.
- Draft test ideas per file: scenario, behavior under test, expected outcome, and likely coverage gain.
- Ask the user for approval to implement the proposed tests; pause until they agree.
- After approval, write the tests in
tests/, rerunmake coverage, and then run$code-change-verificationbefore marking work complete.
Workflow Details
- Run coverage: Execute
make coverageat repo root. Avoid watch flags and keep prior coverage artifacts only if comparing trends. - Parse summaries efficiently:
- Prefer the console output from
coverage report -mfor file-level totals; fallback tocoverage.xmlfor tooling or spreadsheets. - Use
uv run coverage htmlto generatehtmlcov/index.htmlif you need an interactive drill-down.
- Prefer the console output from
- Prioritize targets:
- Public APIs or shared utilities in
src/agents/before examples or docs. - Files with low statement coverage or newly added code at 0%.
- Recent bug fixes or risky code paths (error handling, retries, timeouts, concurrency).
- Public APIs or shared utilities in
- Design impactful tests:
- Hit uncovered paths: error cases, boundary inputs, optional flags, and cancellation/timeouts.
- Cover combinational logic rather than trivial happy paths.
- Place tests under
tests/and avoid flaky async timing.
- Coordinate with the user: Present a numbered, concise list of proposed test additions and expected coverage gains. Ask explicitly before editing code or fixtures.
- After implementation: Rerun coverage, report the updated summary, and note any remaining low-coverage areas.
Notes
- Keep any added comments or code in English.
- Do not create
scripts/,references/, orassets/unless needed later. - If coverage artifacts are missing or stale, rerun
pnpm test:coverageinstead of guessing.
When not to use it
- →Non-Python projects
- →When the user has provided specific test logic
- →Projects where coverage thresholds are not defined
Prerequisites
Limitations
- →Does not replace human intuition for edge case design
- →Dependent on valid 'make' configuration
- →May require manual approval for each test proposal
How it compares
It focuses on high-impact code paths rather than simple quantity of tests.
Compared to similar skills
test-coverage-improver side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| test-coverage-improver (this skill) | 1 | 4mo | No flags | Intermediate |
| adk-engineer | 3 | 27d | Review | Advanced |
| unit-testing-test-generate | 2 | 4mo | Review | Intermediate |
| playwright-roll | 2 | 2mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by openai
View all by openai →You might also like
adk-engineer
jeremylongshore
Execute software engineer specializing in creating production-ready ADK agents with best practices, code structure, testing, and deployment automation. Use when asked to "build ADK agent", "create agent code", or "engineer ADK application". Trigger with relevant phrases based on skill purpose.
unit-testing-test-generate
sickn33
Generate comprehensive, maintainable unit tests across languages with strong coverage and edge case focus.
playwright-roll
microsoft
Roll Playwright Python to a new version
api-test-generator
mikopbx
Генерация полных Python pytest тестов для REST API эндпоинтов с валидацией схемы. Использовать при создании тестов для новых эндпоинтов, добавлении покрытия для CRUD операций или валидации соответствия API с OpenAPI схемами.
designing-tests
CloudAI-X
Designs and implements testing strategies for any codebase. Use when adding tests, improving coverage, setting up testing infrastructure, debugging test failures, or when asked about unit tests, integration tests, or E2E testing.
async-repl-protocol
parcadei
Async REPL Protocol