test-coverage-improver_skill

This skill analyzes test coverage results from pnpm test:coverage, identifies gaps, and drafts high-impact test ideas for review.
  • TypeScript
  • Official

2.2k

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openai/openai-agents-js --skill test-coverage-improver

  • SKILL.md2.8 KB

Overview

This skill improves test coverage in the OpenAI Agents JS monorepo by running the coverage suite, inspecting artifacts, and proposing targeted tests. It identifies low-coverage files and branches, prioritizes high-impact areas, and asks for explicit user approval before writing tests or changing code.

How this skill works

Run CI=1 pnpm test:coverage to regenerate coverage artifacts, then parse coverage/coverage-summary.json (or coverage-final.json) and lcov data to spot gaps. The skill lists lowest files, branches under threshold, and uncovered lines, drafts test scenarios to exercise missing paths, and presents them to the user for confirmation. After approval it implements tests in the appropriate packages, reruns coverage, and verifies improvements.

When to use it

  • Coverage thresholds are failing or regressions are suspected
  • A release needs stronger quality gates for core packages
  • New or changed code shows 0% or low coverage
  • You want a prioritized plan for where tests will have highest impact
  • Before merging risky bug fixes involving error handling, retries, or concurrency

Best practices

  • Prefer coverage/coverage-summary.json for quick file-level totals; use lcov only for branch and line drilling
  • Prioritize public APIs and shared utilities in packages/*/src before examples or docs
  • Target uncovered branches: error paths, boundary values, optional flags, and cancellations
  • Write unit tests next to the package (packages/<pkg>/test/*.test.ts) and avoid flaky async timing
  • Present a numbered, concise list of proposed tests and expected coverage gains; require explicit user approval

Example use cases

  • Detecting which packages dropped below 80% branch coverage after a refactor and proposing specific tests to restore it
  • Adding tests to exercise error-handling and retry logic in a shared network utility identified as low-coverage
  • Creating boundary-case inputs to cover combinational logic in an agent orchestration module
  • Rerunning coverage after implementing tests to verify the reported improvement and remaining hotspots

FAQ

Prefer coverage/coverage-summary.json; fallback to coverage/coverage-final.json. Use coverage/lcov.info or coverage/lcov-report/index.html for branch- and line-level inspection.

Will tests be added without my approval?

No. The skill drafts proposed tests and asks for explicit user confirmation before editing or adding test files.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational