Skip to content

Fix test coverage for a Flows app to meet the 80% line gate, writing missing tests and refactoring for testability.

CCM score
60 of 100
skills.sh installs
1.9K
GitHub stars
6
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full coverage workflow: tooling setup, scope validation, test runs, and writing missing test files
  • Includes Vitest and Jest configuration checks, plus templates for hook and service tests with renderHook and mocks
  • Enforces the 80% line coverage hard gate, excluding only test files, vite-env.d.ts, and main.tsx from measurement
  • Designed for Flows app projects that need to pass coverage approval rather than merely report gaps

Install

$ npx -y skills add cognitedata/builder-skills --skill test-coverage -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Test Coverage Fix

Fix test coverage for $ARGUMENTS (or the whole app if no argument is given). This skill enforces the 80% line coverage hard gate required for Flows app approval by finding AND fixing coverage gaps. Work through every step in order.


Step 1 — Verify test framework and coverage tooling

Check that the project has a working test framework with coverage configured:

# Check for vitest or jest in package.json
grep -E "(vitest|jest)" package.json

# Check for coverage configuration
cat vitest.config.ts 2>/dev/null || cat vitest.config.js 2>/dev/null || cat jest.config.ts 2>/dev/null || cat jest.config.js 2>/dev/null

Verify:

  • A test framework (Vitest or Jest) is installed and configured
  • The config file has a coverage section (e.g. coverage: { provider: 'v8', ... } in vitest.config.ts)
  • A coverage reporter is configured (at least text and lcov or json-summary)

If coverage tooling is not configured, fix it now:

  1. Install the coverage provider:
pnpm add -D @vitest/coverage-v8

Details

Repository
github.com/cognitedata/builder-skills
Categories
Testing & QA, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the test-coverage skill do for a Flows app?

The test-coverage skill finds and fixes coverage gaps in a Flows app to meet the 80% line coverage hard gate. It configures tooling, writes missing tests, covers untested paths, and refactors code for testability rather than only reporting gaps.

How do I install the test-coverage skill?

Run npx -y skills add cognitedata/builder-skills --skill test-coverage -y in your project. Once installed, the agent can configure Vitest or Jest coverage and write the tests needed to reach 80% line coverage.

Which skills does test-coverage sit alongside in Testing & QA?

Test-coverage is in the Testing & QA category, next to tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. Its focus is the 80% line coverage gate for Flows apps, which the other skills in this category do not center on.

Does test-coverage require a specific test framework?

The skill works with Vitest or Jest and checks for an existing config first. If coverage tooling is missing, it installs @vitest/coverage-v8 and adds a coverage section to vitest.config.ts.

More from cognitedata/builder-skills

All 25

Similar to Test Coverage

More Testing & QA