Agent skill

test-coverage-improver

Improve test coverage in the OpenAI Agents JS monorepo: run `pnpm test:coverage`, inspect coverage artifacts, identify low-coverage files and branches, propose high-impact tests, and confirm with the user before writing tests.

Stars 2,570
Forks 665

Install this agent skill to your Project

npx add-skill https://github.com/openai/openai-agents-js/tree/main/.agents/skills/test-coverage-improver

SKILL.md

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 pnpm test:coverage (set CI=1 if needed) to regenerate coverage/.
  2. Collect artifacts: coverage/coverage-summary.json (preferred) or coverage/coverage-final.json, plus coverage/lcov.info and coverage/lcov-report/index.html for drill-downs.
  3. Summarize coverage: total percentages, lowest files, branches under 80%, 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 the relevant package, rerun pnpm test:coverage, and then run $code-change-verification before marking work complete.

Workflow Details

  • Run coverage: Execute CI=1 pnpm test:coverage at repo root. Avoid watch flags and keep prior coverage artifacts only if comparing trends.
  • Parse summaries efficiently:
    • Prefer coverage/coverage-summary.json for file-level totals; fallback to coverage/coverage-final.json if the summary file is absent.
    • Use coverage/lcov.info or coverage/lcov-report/index.html to spot branch- and line-level holes.
  • Prioritize targets:
    • Public APIs or shared utilities in packages/*/src before examples or docs.
    • Files with statements/branches below 80% or newly added code at 0%.
    • Recent bug fixes or risky code paths (error handling, retries, timeouts, concurrency).
  • Design impactful tests:
    • Hit uncovered branches: error cases, boundary inputs, optional flags, and cancellation/timeouts.
    • Cover combinational logic rather than trivial happy paths.
    • Place unit tests near the package (packages/<pkg>/test/*.test.ts) 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.

Expand your agent's capabilities with these related and highly-rated skills.

openai/openai-agents-js

openai-knowledge

Use 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`.

2,570 665
Explore
openai/openai-agents-js

final-release-review

Perform 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-js.

2,570 665
Explore
openai/openai-agents-js

examples-auto-run

Run examples:start-all in auto mode with parallel execution, per-script logs, and start/stop helpers.

2,570 665
Explore
openai/openai-agents-js

implementation-strategy

Decide how to implement runtime and API changes in openai-agents-js before editing code. Use when a task changes exported APIs, runtime behavior, schemas, 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.

2,570 665
Explore
openai/openai-agents-js

docs-sync

Analyze 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 (docs/src/content/docs/**) and never touch translated docs under docs/src/content/docs/ja, ko, or zh. Provide a report and ask for approval before editing docs.

2,570 665
Explore
openai/openai-agents-js

pnpm-upgrade

Keep pnpm current: run pnpm self-update/corepack prepare, align packageManager in package.json, and bump pnpm/action-setup + pinned pnpm versions in .github/workflows to the latest release. Use this when refreshing the pnpm toolchain manually or in automation.

2,570 665
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results