test-coverage-improver

Analyzes coverage reports and proposes high-impact tests for the OpenAI Agents Python repository.

Updated May 23, 2026
One-click install
npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill test-coverage-improver-kiranimmadi2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-coverage-improver
Source: https://github.com/kiranimmadi2/promptforge-ai/tree/main/openai-agents-python/.agents/skills/test-coverage-improver
Command: npx skills add https://github.com/kiranimmadi2/promptforge-ai --skill test-coverage-improver-kiranimmadi2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Identifying which parts of a codebase lack test coverage and deciding which tests to write first is time-consuming. This Skill runs the coverage suite, pinpoints low-coverage files, and drafts targeted test proposals before any code changes. ## Core Features & Use Cases - Coverage Analysis: Runs make coverage and parses .coverage, coverage.xml, and coverage report -m output to summarize totals and uncovered lines. - Gap Prioritization: Ranks targets by public API importance, low statement coverage, new code at 0%, and risky paths like error handling, retries, and concurrency. - Approval-Gated Test Writing: Presents a numbered list of proposed tests with expected coverage gains and waits for user approval before editing files in tests/. - Use Case: After a coverage regression fails CI, use this Skill to regenerate coverage data, identify the files that dropped, and get a concrete plan of tests to restore the threshold. ## Quick Start Ask the assistant to run the coverage suite, summarize the lowest-coverage files, and propose tests to improve them.

Frequently Asked Questions about test-coverage-improver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find low-coverage files in a Python project?

Run the coverage suite with make coverage, then inspect the console output of coverage report -m for file-level totals and missing line numbers. For interactive drill-downs, generate an HTML report with uv run coverage html and open htmlcov/index.html.

How to prioritize which tests to write for coverage improvement?

Prioritize public APIs and shared utilities in src/agents/ over examples or docs, then target files with low statement coverage or newly added code at 0%. Focus on risky paths like error handling, retries, timeouts, and concurrency rather than trivial happy paths.

Does this Skill write tests automatically without confirmation?

No, it presents a numbered list of proposed test additions with expected coverage gains and explicitly asks for approval before editing any code or fixtures. Implementation only begins after the user agrees.

What should I do if coverage artifacts are missing or stale?

Rerun the coverage command to regenerate .coverage data and coverage.xml instead of guessing from outdated results. Stale artifacts can misrepresent current coverage and lead to poorly targeted test proposals.

What kinds of tests give the biggest coverage gains?

Tests that hit uncovered paths such as error cases, boundary inputs, optional flags, and cancellation or timeout behavior yield the largest gains. Covering combinational logic beats adding more happy-path tests, and async tests should avoid flaky timing dependencies.