coverage

coverage is a skill for Claude Code from drafthq/draft. It costs 31 tokens per session (3,976 once invoked), scanned A, original, MIT.

A workflow for measuring how much of a codebase is exercised by tests. Code coverage is a measurement, not a replacement for TDD, the practice of writing a failing test, implementing the change, and refactoring.

In plain words
What is it for?
Generating coverage reports for a project, active work track, or module, analyzing uncovered lines, and presenting the findings for developer approval.
Why use it?
It shows which lines lack test coverage and requires those gaps to be examined rather than hiding them behind an invented percentage.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths.

Part of the draft plugin — 33 skills shipped together

Good fit Generating coverage reports for a project, active work track, or module, analyzing uncovered lines, and presenting the findings for developer approval.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/drafthq/draft/coverage
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add drafthq/draft --skill coverage
Clone the repo
git clone --depth 1 https://github.com/drafthq/draft

Made for: Claude Code.

Or install draft, the plugin that ships this one along with the rest of its 33 skills.

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 coverage

README.md
[![agentmods](https://agentmods.dev/badge/skills/drafthq/draft/coverage/github.svg)](https://agentmods.dev/skills/drafthq/draft/coverage)
Your own site
<a href="https://agentmods.dev/skills/drafthq/draft/coverage"><img src="https://agentmods.dev/badge/skills/drafthq/draft/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 coverage

Your own site · 80×15
<a href="https://agentmods.dev/skills/drafthq/draft/coverage"><img src="https://agentmods.dev/badge/skills/drafthq/draft/coverage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,976 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 8
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.00031 $0.03976
Opus 5.5 $0.00012 $0.01590
Sonnet 5.5 $0.00006 $0.00795
Haiku 4.5 $0.00003 $0.00398

Measured 1mo ago against content hash 6edfa8d6c583, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

skills/coverage/SKILL.md · 358 lines

How it starts

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

Coverage Report

You are computing and reporting code coverage for the active track or a specific module. This complements the TDD workflow — TDD is the process (write test, implement, refactor), coverage is the measurement (how much code do those tests exercise).

Red Flags - STOP if you're

  • Reporting coverage without actually running the coverage tool
  • Making up coverage percentages
  • Skipping uncovered line analysis
  • Not presenting the report for developer approval
  • Treating this as a replacement for TDD (it's not — TDD stays in /draft:implement)

Step 1: Load Context

  1. Read draft/tech-stack.md for test framework and language info
  2. Find active track from draft/tracks.md
  3. If track has architecture.md (track-level) or project has .ai-context.md, identify current module for scoping
  4. Look for coverage_target in draft/workflow.md. Check for per-module targets first (see Per-Module Coverage Enforcement below); if absent, default to 95%.
  5. Check if draft/tracks/<id>/bughunt-report-latest.md (track scope) or draft/bughunt-report-latest.md (project scope) exists for cross-referencing (see Coverage-Bughunt Cross-Reference below)

If no active track and no argument provided:

  • Tell user: "No active track. Provide a path or track ID, or run /draft:new-track first."

Step 2: Detect Coverage Tool

Preferred: use the deterministic detect-test-framework.sh wrapper — it emits JSON {languages:[{language,framework,runner_command,test_globs,config_file}]}. Resolve via the canonical tool resolver (see core/shared/tool-resolver.md):

DRAFT_TOOLS="${DRAFT_PLUGIN_ROOT:-$(cat ~/.cache/draft/plugin-root 2>/dev/null)}/scripts/tools"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/cache/*/draft/*/scripts/tools 2>/dev/null | sort -V | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$(ls -d ~/.claude/plugins/marketplaces/*draft*/scripts/tools 2>/dev/null | tail -1)"
[ -d "$DRAFT_TOOLS" ] || DRAFT_TOOLS="$PWD/scripts/tools"
[ -x "$DRAFT_TOOLS/detect-test-framework.sh" ] && \
  bash "$DRAFT_TOOLS/detect-test-framework.sh" --root .

Read the full file on GitHub · 358 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. 1mo ago First seen · 358 lines · 31 tokens per session scan A 6edfa8d6c583

Subscribe to this mod's changes

coverage is a skill published in the GitHub repository drafthq/draft (40 stars, last pushed 12d ago), licensed MIT. It adds 31 tokens to every session and 3,976 once invoked, about $0.0001 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-08-30.