test-coverage-improver
$
npx mdskill add openai/openai-agents-python/test-coverage-improverAnalyzes test coverage gaps and proposes targeted improvements after user confirmation.
- Helps address coverage regressions, failing thresholds, or requests for stronger tests in a repository.
- Integrates with the repository's make system and coverage tools like .coverage and coverage.xml.
- Decides recommendations by identifying low-coverage files and assessing high-impact test scenarios.
- Presents results through summaries and drafts test ideas, pausing for user approval before execution.
SKILL.md
.github/skills/test-coverage-improverView on GitHub ↗
--- name: test-coverage-improver description: '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.' --- # 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 1. From the repo root run `make coverage` to regenerate `.coverage` data and `coverage.xml`. 2. Collect artifacts: `.coverage` and `coverage.xml`, plus the console output from `coverage report -m` for drill-downs. 3. Summarize coverage: total percentages, lowest files, and uncovered lines/paths. 4. Draft test ideas per file: scenario, behavior under test, expected outcome, and likely coverage gain. 5. Ask the user for approval to implement the proposed tests; pause until they agree. 6. After approval, write the tests in `tests/`, rerun `make coverage`, and then run `$code-change-verification` before marking work complete. ## Workflow Details - **Run coverage**: Execute `make coverage` at repo root. Avoid watch flags and keep prior coverage artifacts only if comparing trends. - **Parse summaries efficiently**: - Prefer the console output from `coverage report -m` for file-level totals; fallback to `coverage.xml` for tooling or spreadsheets. - Use `uv run coverage html` to generate `htmlcov/index.html` if you need an interactive drill-down. - **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). - **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/`, or `assets/` unless needed later. - If coverage artifacts are missing or stale, rerun `pnpm test:coverage` instead of guessing.
More from openai/openai-agents-python
- code-change-verificationRun the mandatory verification stack when changes affect runtime code, tests, or build/test behavior in the OpenAI Agents Python repository.
- credit-note-fixerFix the tiny credit-note formatting bug and rerun the exact targeted test command.
- csv-workbenchAnalyze CSV files in /mnt/data and return concise numeric summaries.
- docs-syncAnalyze main branch implementation and configuration to find missing, incorrect, or outdated documentation in docs/. Use when asked to audit doc coverage, sync docs with code, or propose doc updates/structure changes. Only update English docs under docs/** and never touch translated docs under docs/ja, docs/ko, or docs/zh. Provide a report and ask for approval before editing docs.
- examples-auto-runRun python examples in auto mode with logging, rerun helpers, and background control.
- final-release-reviewPerform a release-readiness review by locating the previous release tag from remote tags and auditing the diff (e.g., v1.2.3...<commit>) for breaking changes, regressions, improvement opportunities, and risks before releasing openai-agents-python.
- implementation-strategyDecide how to implement runtime and API changes in openai-agents-python before editing code. Use when a task changes exported APIs, runtime behavior, serialized state, tests, or docs and you need to choose the compatibility boundary, whether shims or migrations are warranted, and when unreleased interfaces can be rewritten directly.
- openai-knowledgeUse when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.
- playwrightUse when the task requires capturing or automating a real browser from the terminal.
- pr-draft-summaryCreate the required PR-ready summary block, branch suggestion, title, and draft description for openai-agents-python. Use in the final handoff after moderate-or-larger changes to runtime code, tests, examples, build/test configuration, or docs with behavior impact; skip only for trivial or conversation-only tasks, repo-meta/doc-only tasks without behavior impact, or when the user explicitly says not to include the PR draft block.