This one automates the grind of hitting 80% line coverage for Flows apps. It doesn't just run a report and leave you hanging. It configures Vitest or Jest coverage tooling if it's missing, audits your exclude rules to catch overly broad exemptions (like hiding entire component or page directories), then writes the actual missing test files for hooks, services, and utilities. It knows to use renderHook with QueryClientProvider wrappers for React hooks and vi.mock for services. If tests are broken, it fixes imports and mocks before measuring coverage. Useful when you're staring at a 60% coverage gate failure and need to close the gap without spending half a day figuring out which files have no tests.

skills.sh installs
1.9K
GitHub stars
6
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

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

More from cognitedata/builder-skills

All 26
1hieutrtr avatare2e-testinghieutrtr/ai1-skillsEnd-to-end testing patterns with Playwright for full-stack Python/React applications. Use when writing E2E tests for complete user workflows (login, CRUD, navig1.6Kskills.sh installs
2dbt-labs avataradding-dbt-unit-testdbt-labs/dbt-agent-skillsCreates unit test YAML definitions that mock upstream model inputs and validate expected outputs. Use when adding unit tests for a dbt model or practicing test-1.1Kskills.sh installs
3adobe avatarappbuilder-e2e-testingadobe/skillsUse this skill whenever the user wants browser-based end-to-end tests for an Adobe App Builder application. Covers Playwright E2E testing for ExC Shell SPAs, AE800skills.sh installs
4aj-geddes avatare2e-testing-automationaj-geddes/useful-ai-promptsBuild end-to-end automated tests that simulate real user interactions across the full application stack. Use for E2E test, Selenium, Cypress, Playwright, browse695skills.sh installs
5existential-birds avatarvitest-testingexistential-birds/beagleVitest testing framework patterns and best practices. Use when writing unit tests, integration tests, configuring vitest.config, mocking with vi.mock/vi.fn, usi471skills.sh installs
6umbraco avatarumbraco-e2e-testingumbraco/umbraco-cms-backoffice-skillsE2E testing for Umbraco backoffice extensions using Playwright and @umbraco-cms/acceptance-test-helpers380skills.sh installs