coverage-analysis

A guide for measuring test coverage, meaning which parts and decision paths in the code are exercised by tests.

In plain words
What is it for?
Use it after tests pass to generate Python, Jest, or Vitest coverage reports, inspect uncovered lines and branches, and set coverage thresholds.
Why use it?
It shows where tests are missing and helps decide which untested areas deserve attention first, especially higher-risk branches.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/vladkesler/initrunner/coverage-analysis
Any agent
npx skills add vladkesler/initrunner --skill coverage-analysis
Clone the repo
git clone --depth 1 https://github.com/vladkesler/initrunner

Made for: Claude Code, Codex.

Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 738 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.00738
Opus 5 $0.00013 $0.00369
Sonnet 5 $0.00005 $0.00148
Haiku 4.5 $0.00003 $0.00074

Measured 2d ago against content hash 7a23e42dfa35, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

coverage-analysis 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 2d 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.

examples/roles/unit-tester/skills/coverage-analysis/SKILL.md · 95 lines

How it starts

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

Coverage analysis for identifying and prioritizing untested code.

When to activate

Use this skill after tests pass, or when asked to analyze coverage gaps and determine which untested code should be covered next.

Python coverage

  • Run: pytest --cov=<package> --cov-report=term-missing
  • The MISS column shows uncovered line ranges (e.g. 45-52, 78).
  • Configure in .coveragerc or pyproject.toml under [tool.coverage]: set omit to exclude vendored code, migrations, and test files from the report.
  • Branch coverage: add --cov-branch to detect branches where only one path is tested.
  • HTML report: --cov-report=html generates htmlcov/index.html for visual inspection.

JavaScript coverage

  • Jest: npx jest --coverage -- outputs a table and generates coverage/ directory.
  • Vitest: npx vitest run --coverage -- requires @vitest/coverage-v8 or @vitest/coverage-istanbul.
  • Interpret the table: % Stmts, % Branch, % Funcs, % Lines, and Uncovered Line #s.
  • Configure in jest.config.* or vitest.config.* with coverageThreshold to enforce minimums.

Interpreting results

  • Focus on uncovered branches, not just uncovered lines -- a line can be "covered" while half its branches are not.
  • Identify high-risk uncovered code: error handlers, input validators, authentication checks, and security-sensitive paths.
  • Ignore generated code, __init__.py files that only re-export, and vendored third-party code.
  • Look for patterns: if every error handler is uncovered, that signals a systematic gap in error-path testing.

Gap prioritization

Rank uncovered code by risk, not by line count:

  1. Security-sensitive -- authentication, authorization, input sanitization, cryptographic operations.
  2. Business logic -- core domain rules, financial calculations, state transitions.
  3. Utilities -- parsing, formatting, data transformation helpers.
  4. Boilerplate -- logging setup, CLI argument wiring, import guards.

Read the full file on GitHub · 95 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. 2d ago First seen · 95 lines · 26 tokens per session scan A 7a23e42dfa35

Subscribe to this mod's changes

coverage-analysis is a skill published in the GitHub repository vladkesler/initrunner (41 stars, last pushed 4d ago), licensed Apache-2.0. It adds 26 tokens to every session and 738 once invoked, about $0.0001 per session on Opus 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.