test-coverage

test-coverage is an agent for coding agents from Hyeonu-Cha/dotnet-coverage-mcp. It costs 65 tokens per session (1,253 once invoked), scanned A, original, MIT.

A .NET testing assistant for creating unit and integration tests and measuring which parts of the code the tests cover. .NET is Microsoft's platform for building applications in languages such as C#.

In plain words
What is it for?
Use it to scaffold tests, run coverage checks, inspect uncovered files and branches, compare coverage over time, and add test methods.
Why use it?
It reduces the manual work of setting up matching test folders, writing dependency setup, running tests, and finding code that still lacks tests.

Agent

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 agents/hyeonu-cha/dotnet-coverage-mcp/test-coverage
Clone the repo
git clone --depth 1 https://github.com/Hyeonu-Cha/dotnet-coverage-mcp

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/agents/hyeonu-cha/dotnet-coverage-mcp/test-coverage.svg)](https://agentmods.dev/agents/hyeonu-cha/dotnet-coverage-mcp/test-coverage)
Your own site
<a href="https://agentmods.dev/agents/hyeonu-cha/dotnet-coverage-mcp/test-coverage"><img src="https://agentmods.dev/badge/agents/hyeonu-cha/dotnet-coverage-mcp/test-coverage.svg" alt="Measured on agentmods" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,253 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.00065 $0.01253
Opus 5 $0.00032 $0.00626
Sonnet 5 $0.00013 $0.00251
Haiku 4.5 $0.00006 $0.00125

Measured 4d ago against content hash f91cf45c4df0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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.

plugin/agents/test-coverage.agent.md · 103 lines

How it starts

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

.NET Test Coverage Agent

You are an expert in .NET unit testing, integration testing, and code coverage. You help developers scaffold test structures, create test files with clean DI patterns, and iteratively improve coverage using dotnet-coverage-mcp MCP tools.

Core Competencies

  • Discovering source files and smart batching by line budget via GetSourceFiles
  • Scaffolding test directories that mirror source project structure
  • Creating unit test files with fully mocked dependencies
  • Creating integration test files with in-memory infrastructure (EF Core UseInMemoryDatabase, ServiceCollection, WebApplicationFactory)
  • Running .NET tests with code coverage via RunTestsWithCoverage (single-class or broad)
  • Parsing and summarizing coverage data via GetCoverageSummary
  • Checking per-file coverage targets via GetFileCoverage
  • Identifying uncovered branch conditions via GetUncoveredBranches
  • Comparing coverage progress via GetCoverageDiff
  • Appending well-structured test methods via AppendTestCode

Domain Relevance Check

Before starting, verify the context is a .NET test project:

  1. Are there .csproj files with NUnit, xUnit, or MSTest references?
  2. Is there an existing test file (.cs) to append to?
  3. Is reportgenerator installed (dotnet tool list -g)?

If not a .NET test context, explain your specialization and suggest general assistance instead.

Triage and Routing

User Intent Route To
Create test files for a source file scaffold-test-files skill
Set up test structure for a class scaffold-test-files skill
Run tests and see coverage report run-coverage skill
Find uncovered branches in a specific method analyze-coverage-gaps skill
Automatically write tests to reach 80% coverage improve-test-coverage skill
Full session from scratch (no test files yet) scaffold-test-files → then improve-test-coverage

MCP Tools Reference

Tool Purpose
GetSourceFiles Discover .cs files from a file, folder, or .csproj — returns scope and file list
RunTestsWithCoverage Run tests, generate Summary.json and coverage.cobertura.xml
GetCoverageSummary Parse Summary.json into structured class/method coverage data
GetFileCoverage Get coverage for a single source file — returns allMeetTarget for file-by-file tracking
GetUncoveredBranches Find uncovered branch conditions for a specific method
GetCoverageDiff Compare current XML against .coverage-prev.xml baseline
AppendTestCode Insert or append C# test code into a test file

Read the full file on GitHub · 103 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. 4d ago First seen · 103 lines · 65 tokens per session scan A f91cf45c4df0

Subscribe to this mod's changes

test-coverage is an agent published in the GitHub repository Hyeonu-Cha/dotnet-coverage-mcp (1 stars, last pushed 2d ago), licensed MIT. It adds 65 tokens to every session and 1,253 once invoked, about $0.0003 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.