test-coverage

test-coverage is a skill for Claude Code from c9r-io/orchestrator. It costs 49 tokens per session (1,071 once invoked), scanned A, original, MIT.

A procedure for running unit tests and measuring test coverage in backend and frontend projects. Test coverage shows which parts of the code are exercised by tests.

In plain words
What is it for?
It is for discovering the project's test commands, running tests, measuring coverage, identifying gaps, and adding tests where project requirements call for them.
Why use it?
It helps find untested behavior and important missing branches instead of relying only on whether the existing tests pass.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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/c9r-io/orchestrator/test-coverage
Any agent
npx skills add c9r-io/orchestrator --skill test-coverage
Clone the repo
git clone --depth 1 https://github.com/c9r-io/orchestrator

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 test-coverage

README.md
[![agentmods](https://agentmods.dev/badge/skills/c9r-io/orchestrator/test-coverage.svg)](https://agentmods.dev/skills/c9r-io/orchestrator/test-coverage)
Your own site
<a href="https://agentmods.dev/skills/c9r-io/orchestrator/test-coverage"><img src="https://agentmods.dev/badge/skills/c9r-io/orchestrator/test-coverage.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,071 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.1 $0.00049 $0.01071
Opus 5 $0.00024 $0.00535
Sonnet 5 $0.00010 $0.00214
Haiku 4.5 $0.00005 $0.00107

Measured 6d ago against content hash ad8404337edb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 6d 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.

.claude/skills/test-coverage/SKILL.md · 138 lines

How it starts

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

Test Coverage Skill

Run tests and measure coverage in a project-agnostic way, preferring existing project commands and conventions.

In this repository, measure the Rust workspace from the root and the React/Vite frontend under gui/. For other targets, discover their commands and exclusions first.

Workflow

  1. Discover the test commands already defined by the project.
  2. Run unit tests first (fast feedback).
  3. If coverage is requested: run coverage tooling and identify high-value gaps.
  4. Improve tests focusing on behavior and critical branches, not raw percentages.
  5. Re-run tests and coverage to confirm improvement.

Discover Existing Commands

From repo root, look for:

  • Backend:
    • Rust: core/Cargo.toml
    • Workspace commands: root Cargo.toml and package manifests under crates/
  • Frontend:
    • gui/package.json

Prefer running existing scripts over inventing new ones.

Backend (Rust, if core/ exists)

Unit Tests

cargo test --workspace

Coverage

Prefer cargo llvm-cov if the project uses it (or has Makefile wrappers). Typical options:

cargo llvm-cov
cargo llvm-cov --html

Why llvm-cov over tarpaulin? tarpaulin has known issues with #[async_trait] macros (reports dramatically lower coverage for async trait code). cargo-llvm-cov uses LLVM's instrumentation and correctly tracks async trait coverage.

If a Makefile defines coverage targets, use those instead:

make coverage
make coverage-html

Notes:

  • Coverage exclusions (migrations, generated code, thin wiring) are project-specific. Follow the project's existing exclusions if present.
  • Document coverage exclusions so reviewers understand why files are skipped:
Example Exclusion Typical Reason
repository/*.rs Thin data mapping layer (ORM-equivalent), no business logic
main.rs Program entry point
migration/*.rs Database migration scripts
src/index.ts Barrel re-export, no logic
src/types/**/*.ts Pure type definitions, no runtime code

Read the full file on GitHub · 138 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. 6d ago First seen · 138 lines · 49 tokens per session scan A ad8404337edb

Subscribe to this mod's changes

test-coverage is a skill published in the GitHub repository c9r-io/orchestrator (21 stars, last pushed 4d ago), licensed MIT. It adds 49 tokens to every session and 1,071 once invoked, about $0.0002 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.