Skip to content
Development
Skill

/coverage-check

Run the repo's unit tests with coverage and verify that every file touched in the current change keeps line, branch, and function coverage at or above 95%. Language- and framework-agnostic. Use before committing, before PR creation, or when the user asks about coverage.

From plugin
fullstack-dev-kit
1714 skills9 agents5 commands3 hooks
+1

Claude Code

$ npx -y skills add theam/claude-dev-kit --skill coverage-check --agent claude-code

SKILL.md

coverage-check.SKILL.md
name: coverage-check
description: Run the repo's unit tests with coverage and verify that every file touched in the current change keeps line, branch, and function coverage at or above 95%. Language- and framework-agnostic. Use before committing, before PR creation, or when the user asks about coverage.

Coverage Check

Enforce the team's coverage gate: **every touched file must stay ≥ 95%** (line, branch, function). This skill is stack-agnostic — it runs whatever the consuming repo declares and parses whatever standard report the run produces.

1. Find the touched files

`git diff --name-only` against the base branch, plus staged and unstaged changes. Exclude, by convention: generated/vendored code, database migrations, and the test files themselves. Group the remaining files by the module/project they belong to so you can run the narrowest useful test set first.

2. Determine the coverage command(s)

In order of preference:

1. **Declared in config** — read `.claude/dev-kit.json` (`test.coverageCommands`) and the consuming repo's `CLAUDE.md`. If a command is declared, use it verbatim. 2. **Declared by the repo's tooling** — a `test:coverage` script in `package.json`, a `Makefile`/`Taskfile` target, a `coverage` task in the build file. 3. **From the stack profile** — if `.claude/dev-kit.json` has `stacks` (or you detect one), read `instructions/stacks/<id>.md` for the stack's coverage command, report path, and format, plus any prerequisite (e.g. PHP needs Xdebug/PCOV; without it, report that rather than 0%). 4. **Detected from the stack** — infer from the project files present, e.g.:

| Stack signal | Typical coverage command | Report produced | |---|---|---| | `*.csproj` / `*.sln` | `dotnet test --collect:"XPlat Code Coverage"` | Cobertura XML | | `package.json` (jest/vitest) | `npm test -- --coverage` | lcov / json-summary | | `angular.json` | `ng test --watch=false --code-coverage` | lcov | | `pom.xml` / `build.gradle` | `mvn test` / `gradle test jacocoTestReport` | JaCoCo XML | | `pyproject.toml` / `setup.py` | `pytest --cov --cov-report=xml` | coverage.py XML | | `go.mod` | `go test ./... -coverprofile=cover.out` | Go coverprofile | | `Cargo.toml` | `cargo llvm-cov --lcov` | lcov |

A monorepo may need several commands (one per language/area). Run each and merge the per-file results.

If you detect the command by inference (not from config), **offer to persist it** to `.claude/dev-kit.json` under `test.coverageCommands` so the next run is deterministic.

3. Run and parse

Run the command(s), then parse the produced report for per-file line/branch/function metrics. Handle the common formats: **Cobertura XML, lcov (`lcov.info`), JaCoCo XML, coverage.py XML, Go coverprofile, and json-summary**. Map each report path back to the touched source files from step 1.

4. Verdict

Report a table, worst offenders first:

| File | Lines | Branches | Functions | Verdict |
|------|-------|----------|-----------|---------|
| src/payments/payment_service.<ext>      | 97.2% | 95.0% | 100%  | PASS |
| src/payments/payment-list.component.<ext> | 88.4% | 71.0% | 90.0% | FAIL |
  • **The bar is the project's own** (adaptive — see `instructions/testing-standards.md`). Use the project's configured threshold or `gates.coverage.min` in `.claude/dev-kit.json`; **default ≥ 95%** when none is set. Also **FAIL on a regression** (a touched file dropping below its pre-change coverage) even if it's above the bar.
  • **N/A, not FAIL, when the project has no test/coverage setup.** If there is no test suite or coverage tooling, report `NOT APPLICABLE — no coverage setup` with a recommendation to add tests (and offer to set it up) — do **not** invent a failure or a number. Only enforce a hard gate when `gates.coverage` is `required`.
  • **FAIL** (when the gate applies) if any touched file is below the bar or regresses; list the uncovered lines/branches and propose the specific missing test cases, and don't mark work complete / open a PR while it fails.
  • If tests themselves fail, report the failures verbatim — never report coverage from a failing run as authoritative.
  • If a metric is genuinely unavailable for a stack (e.g. a runner reports no branch coverage), state that plainly rather than reporting a fabricated number.
Read more
@theam
Ships withfullstack-dev-kit

An open-source Claude Code plugin by The Agile Monkeys: a stack-agnostic issue-to-PR workflow with enforced quality gates. Also runs on OpenAI Codex, Cursor, and other Agent Plugins 1.0.0 clients.

1714 skills9 agents3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
17
Star history of theam/claude-dev-kit on GitHub, a chart by star-history.com

Other skills on fullstack-dev-kit.

work-story

work-story

Work a user story end to end — fetch the ticket, plan (with approval), implement, verify the applicable gates, self-review, open…

create-pr

create-pr

Create a branch, commit the work, and open a pull request for a completed user story, after all quality gates pass. Use when the…

delegate-backlog

delegate-backlog

Delegate an approved backlog to a real async coding agent (GitHub Copilot coding agent) so several stories are worked in parallel…

dev-kit-setup

dev-kit-setup

First-use bootstrap for the dev kit. Detects the team's issue tracker, discovers what it can via MCP/CLI, asks only what cannot…

e2e-generate

e2e-generate

Create or update end-to-end tests for a user-facing flow that changed, using whatever e2e framework the repo already uses. Use…

figma-fetch

figma-fetch

Extract frame/component structure and all visible text from a Figma design URL. Use whenever a prompt or a fetched issue contains…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about coverage-check.

Which coding agents can use coverage-check?
coverage-check installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.