
Test Coverage Improver
OfficialFreeEnhance your test coverage effectively and collaboratively.
Free · Opens the source repo
What Test Coverage Improver does
The Test Coverage Improver skill is designed for developers who want to assess and enhance test coverage in their projects, particularly within the OpenAI Agents Python repository. This skill automates the process of running coverage tests, analyzing the results, and identifying areas that require additional testing. By utilizing this skill, developers can ensure that their code is thoroughly tested, which is crucial for maintaining software quality and reliability.
To begin using the skill, developers execute the command make coverage from the repository root. This generates the necessary coverage data files, including .coverage and coverage.xml. The skill then summarizes the coverage results, highlighting the files with the lowest coverage and providing insights into uncovered lines and paths. This allows developers to focus their testing efforts where they are most needed, ensuring that critical parts of the codebase are adequately tested.
The skill goes beyond mere analysis; it proposes specific test scenarios based on the identified gaps in coverage. Developers receive a concise list of suggested tests, including the expected outcomes and potential coverage gains. Before implementing any changes, the skill prompts the user for approval, fostering a collaborative approach to test development. Once approved, the skill writes the tests and reruns the coverage suite to verify improvements, ensuring that the code remains robust against future changes.
This skill is particularly beneficial for teams aiming to maintain high code quality standards and for individual developers seeking to improve their testing practices. By streamlining the process of identifying and addressing coverage gaps, the Test Coverage Improver skill helps users create more reliable software with less manual effort.
When to use it
Use this skill when you need to assess or improve test coverage, especially after code changes or when coverage thresholds are not met.
When not to use it
This skill may not be suitable for projects that do not require extensive testing or where coverage is already deemed sufficient.
What you can build with it
Improving Coverage After Code Changes
After making significant changes to your codebase, use this skill to assess the impact on test coverage and identify areas needing additional tests.
Meeting Coverage Thresholds
When your project fails to meet established coverage thresholds, this skill helps pinpoint gaps and suggests targeted tests to improve compliance.
Collaborative Test Development
In team environments, use this skill to facilitate discussions around test proposals, ensuring all team members agree on the testing strategy before implementation.
How to install Test Coverage Improver
View source1. Install with the skills CLI
npx skills add openai/openai-agents-python/test-coverage-improver --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by openaiTest 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.
Frequently asked questions about Test Coverage Improver
Similar skills
Quality Playbook Generator
Run comprehensive quality audits on any codebase.
PR Draft Summary
Automate PR summary generation for openai-agents-python.
Final Release Review
Streamline your release candidate audits with ease.
Unit Test Vue Pinia
Efficiently write and review unit tests for Vue 3 applications.
Slang Shader Expert
Optimize and integrate Slang shaders with ease.
Telemetry Standards
Ensure consistent event tracking in Supabase Studio.
