coverage-analyzer

coverage-analyzer is a skill for Claude Code from bestdeejay-design/agent-skills. It costs 78 tokens per session (1,802 once invoked), scanned A, original, MIT.

A tool that reads a coverage.py XML report, which records how much of a Python project’s code tests execute, and turns it into a readable analysis.

In plain words
What is it for?
Use it to report line and branch coverage, find files with no coverage, rank the ten weakest files, measure change over time, and produce a pass or fail result for continuous integration.
Why use it?
It makes gaps in test coverage easier to find and can compare results with a saved baseline or check them against a required threshold.

Skill for Claude Code

Written for Claude Code: when-to-use in frontmatter. Also seen: mentions OpenCode.

Good fit Use it to report line and branch coverage, find files with no coverage, rank the ten weakest files, measure change over time, and produce a pass or fail result for continuous integration.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bestdeejay-design/agent-skills/coverage-analyzer
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 bestdeejay-design/agent-skills --skill coverage-analyzer
Clone the repo
git clone --depth 1 https://github.com/bestdeejay-design/agent-skills

Made for: Claude Code.

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-analyzer

README.md
[![agentmods](https://agentmods.dev/badge/skills/bestdeejay-design/agent-skills/coverage-analyzer.svg)](https://agentmods.dev/skills/bestdeejay-design/agent-skills/coverage-analyzer)
Your own site
<a href="https://agentmods.dev/skills/bestdeejay-design/agent-skills/coverage-analyzer"><img src="https://agentmods.dev/badge/skills/bestdeejay-design/agent-skills/coverage-analyzer.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,802 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.00078 $0.01802
Opus 5 $0.00039 $0.00901
Sonnet 5 $0.00016 $0.00360
Haiku 4.5 $0.00008 $0.00180

Measured 7d ago against content hash 4bf92e9f92e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

coverage-analyzer 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 7d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/coverage_analyzer.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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-analyzer/SKILL.md · 162 lines

How it starts

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

Coverage Analyzer — coverage.py XML → readable analysis

Load this skill when you need to turn a coverage.xml report into a human-readable coverage analysis: overall line/branch percent, files with zero coverage, the 10 worst-covered files, a delta vs a previously stored baseline, and a PASS/FAIL verdict against a threshold for CI.

The analyzer is pure Python 3 stdlib (xml.etree.ElementTree, json, argparse) — no dependencies, no network. It reads the exact XML format that coverage.py emits via coverage xml (Cobertura-style DTD), so it works with any tool that produces that format (pytest-cov --cov-report=xml, coverage run -m pytest && coverage xml).


The analyzer script

scripts/coverage_analyzer.py — pure Python 3 stdlib (no dependencies).

Mode Command
Basic analysis python3 coverage_analyzer.py --xml coverage.xml
Delta vs stored baseline python3 coverage_analyzer.py --xml coverage.xml --baseline baseline.json
Threshold gate (CI) python3 coverage_analyzer.py --xml coverage.xml --threshold 80
Store current totals as baseline python3 coverage_analyzer.py --xml coverage.xml --save-baseline baseline.json

Output sections

  • Totalline-rate (and branch-rate when branches were actually measured; a branch-rate="0" with branches-valid="0" is treated as "not measured", not as 0%), file count, files_with_zero_lines (files with line-rate == 0) with their names
  • Worst 10 files — lowest line-rate first, ascending
  • Delta vs baseline — per-file before → after → Δ table plus a total row; files absent from the baseline are marked new
  • VerdictPASS/FAIL when --threshold is given

Exit codes

Code Meaning
0 analysis succeeded (threshold PASS, or no threshold)
1 parse/read error, or threshold FAIL
2 internal error

Usage example (typical)

# 1. Produce the XML (coverage.py installed):
coverage run -m pytest && coverage xml

# 2. Analyze:
python3 coverage_analyzer.py --xml coverage.xml

# 3. Store a baseline on the first run:
python3 coverage_analyzer.py --xml coverage.xml --save-baseline baseline.json

# 4. On later runs, diff against the baseline and gate CI:
python3 coverage_analyzer.py --xml coverage.xml --baseline baseline.json --threshold 80

Read the full file on GitHub · 162 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 162 lines · 78 tokens per session scan A 4bf92e9f92e2

Subscribe to this mod's changes

coverage-analyzer is a skill published in the GitHub repository bestdeejay-design/agent-skills (5 stars, last pushed 2d ago), licensed MIT. It adds 78 tokens to every session and 1,802 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

armada-verification

Mandatory pre-completion verification and evidence checklist before reporting done.

rafmacalaba/armada · 17 tokens

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work.

browser-use/browser-use · 26 tokens

benchmark-workflow

Run, diagnose, or change Xberg extraction benchmarks, quality scoring, benchmark fixtures, artifact contracts, and independently sourced ground truth. Load for the Benchmarks workflow or benchmark-harness work, not ordinary unit tests.

xberg-io/xberg · 47 tokens

config-evals

Builds and maintains configuration-based evaluations on a workflow with the eval-config tool. Use when the user asks to set up, add, view, change, or remove an evaluation, score, grade, or judge a workflow's output, or measure answer quality against a test dataset. This is the only eval form Instance AI handles — it…

n8n-io/n8n · 80 tokens

workflow

Use when a task is too large for turn-by-turn orchestration and should run through the big-task workflow lane: system-wide changes, large migrations, repo-wide audits, high-confidence verification, or tasks explicitly asking to run a workflow. Claude Code uses native dynamic workflows; Codex, OpenCode, and Grok use…

jeremylongshore/tons-of-skills-marketplace · 101 tokens

skill-compiler

Automatic solved-to-skill compiler — detects novel task completions and autonomously drafts new SKILL.md files. Stolen from Hermes Agent's learning loop (NousResearch, 2026-05-11).

winstonkoh87/Athena-Public · 46 tokens