test-coverage

test-coverage is a skill for Claude Code from motlin/claude-code-plugins. It costs 72 tokens per session (1,426 once invoked), scanned A, original, Apache-2.0.

A testing helper that finds important code with weak test coverage and adds tests for its behavior. Test coverage measures which parts of a program are exercised by tests.

In plain words
What is it for?
It helps improve tests for a file, directory, or repository, focusing on code that changes often and has few tests.
Why use it?
It avoids raising a coverage percentage with tests that do not check useful behavior.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: mentions Claude Code; mentions Codex.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the code plugin — 12 skills, 2 commands shipped together

Good fit It helps improve tests for a file, directory, or repository, focusing on code that changes often and has few tests.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add motlin/claude-code-plugins
Claude Code
/plugin install code

Made for: Claude Code.

Or install code, the plugin that ships this one along with the rest of its 12 skills, 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-coverage

README.md
[![agentmods](https://agentmods.dev/badge/skills/motlin/claude-code-plugins/test-coverage/github.svg)](https://agentmods.dev/skills/motlin/claude-code-plugins/test-coverage)
Your own site
<a href="https://agentmods.dev/skills/motlin/claude-code-plugins/test-coverage"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/test-coverage/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for test-coverage

Your own site · 80×15
<a href="https://agentmods.dev/skills/motlin/claude-code-plugins/test-coverage"><img src="https://agentmods.dev/badge/skills/motlin/claude-code-plugins/test-coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,426 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00072 $0.01426
Opus 5.5 $0.00029 $0.00570
Sonnet 5.5 $0.00014 $0.00285
Haiku 4.5 $0.00007 $0.00143

Measured 18d ago against content hash 61f1bd5af728, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

test-coverage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 18d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/code/skills/test-coverage/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Coverage

Write tests that cover behavior nobody tested, in the code that changes most. Coverage is the measure, not the goal: a test that raises the number without checking behavior is worse than no test, because it hides the gap.

Load code:test-assertions, code:test-data and code:test-speed alongside this skill. New tests follow their shape: strict whole-value assertions, self-evidently fake literals, and extending an existing test file before creating one.

Resolve <plugin-root> first: in Claude Code use ${CLAUDE_PLUGIN_ROOT}; in Codex use the plugin root that contains this skills/test-coverage/SKILL.md file. The scripts below need Python 3.9 or later.

Arguments

  • Scope: a file, a directory, or the whole repo (the default). Only files in scope are ranked.
  • unattended: passed by callers such as burn. An unattended run asks the user nothing. Every question it would have asked becomes a queued finding instead (see Report).

Measure the baseline

Detect the coverage tooling, then run it once and save the normalized report:

python3 <plugin-root>/scripts/coverage_baseline.py --root . detect
python3 <plugin-root>/scripts/coverage_baseline.py --root . run > "$WORKDIR/coverage-before.json"

detect recognizes Vitest, Jest, pytest-cov, Go, cargo tarpaulin, JaCoCo through Maven or Gradle, plus any just coverage recipe that writes coverage/lcov.info, and prints the command it would run. Pass --ecosystem <name> to run to pick one when several are detected. Put $WORKDIR outside the repository so reports are never committed.

When the project uses a tool detect does not know, or needs different flags, run the project's own coverage command and normalize what it writes with coverage_baseline.py parse --format lcov|cobertura|gocover|jacoco <report>.... When the project has no coverage provider at all, add one temporarily, and revert the dependency and lockfile changes before committing. An interactive run asks before adding one; an unattended run queues the question and stops.

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 18d ago Changed 61f1bd5af728
  2. 20d ago First seen · 99 lines · 72 tokens per session scan A d8d69e694708

Subscribe to this mod's changes

test-coverage is a skill published in the GitHub repository motlin/claude-code-plugins (20 stars, last pushed 2d ago), licensed Apache-2.0. It adds 72 tokens to every session and 1,426 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-15.

Related

test-coverage compared with skills from other repositories

test-coverage next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-coveragemotlin/claude-code-pluginsSkill202d agoApache-2.0A72Claude Code
test-masterJeffallan/claude-skillsSkill13ktodayMITA104Claude Code
migrate-xunit-to-xunit-v3dotnet/skillsSkill6.5ktodayMITA149Claude Code
go-testingGentleman-Programming/gentle-aiSkill9.8ktodayMITA26Claude Code, Codex
dart-testdartsim/dartSkill1.2kyesterdayBSD-2-ClauseA18Claude Code, Codex
restore-internals-seams-in-finally-blocks-after-each-testZaxbyHub/opencode-swarmSkill555todayMITA26OpenCode
test-generatorrshankras/claude-code-apple-skillsSkill92726d agoMITA33Claude Code