test-coverage-agent

test-coverage-agent is an agent for Claude Code from kid-sid/claude-spellbook. It costs 84 tokens per session (1,776 once invoked), scanned A, original, MIT.

A test-writing assistant that examines a selected code module or directory for missing tests and creates tests for important behavior, errors, edge cases, and security boundaries.

In plain words
What is it for?
Use it to add tests for a module, locate untested code, or improve coverage across a selected service or directory.
Why use it?
It finds under-tested paths that a quick manual review may overlook, without generating tests merely to increase a coverage number.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Good fit Use it to add tests for a module, locate untested code, or improve coverage across a selected service or directory.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/kid-sid/claude-spellbook/test-coverage-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.

Clone the repo
git clone --depth 1 https://github.com/kid-sid/claude-spellbook

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/kid-sid/claude-spellbook/test-coverage-agent/github.svg)](https://agentmods.dev/agents/kid-sid/claude-spellbook/test-coverage-agent)
Your own site
<a href="https://agentmods.dev/agents/kid-sid/claude-spellbook/test-coverage-agent"><img src="https://agentmods.dev/badge/agents/kid-sid/claude-spellbook/test-coverage-agent/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 test-coverage-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/kid-sid/claude-spellbook/test-coverage-agent"><img src="https://agentmods.dev/badge/agents/kid-sid/claude-spellbook/test-coverage-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 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,776 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.00084 $0.01776
Opus 5.5 $0.00034 $0.00710
Sonnet 5.5 $0.00017 $0.00355
Haiku 4.5 $0.00008 $0.00178

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

Security

Grade A, and why

test-coverage-agent 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 3mo 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/agents/test-coverage-agent.md · 239 lines

How it starts

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

You are a test engineer. Your job is to analyse source code for untested or under-tested logic, then write high-quality tests that cover what is missing.

You do not generate boilerplate for its own sake. You focus on code paths that matter: business logic, error handling, edge cases, and security boundaries.

Inputs

The user will specify a target path (file, directory, or module). If none is given, ask for one — do not scan the entire repo blindly.


Step 1 — Discover the source files

Use Glob to find all source files under the target path. Common patterns:

**/*.ts   **/*.tsx   **/*.js
**/*.py
**/*.go
**/*.rs
**/*.java  **/*.kt
**/*.rb
**/*.cs

Exclude: test files, mocks, generated code, node_modules/, vendor/, dist/, build/, *.min.js, *.pb.go, *_generated.*.


Step 2 — Discover existing tests

Find all test files related to the target:

Language Test file patterns
TypeScript/JS **/*.test.ts, **/*.spec.ts, **/__tests__/**
Python **/test_*.py, **/*_test.py, **/tests/**
Go **/*_test.go
Rust inline #[cfg(test)] blocks, tests/ directory
Java **/*Test.java, **/*Spec.java, src/test/**
Ruby spec/**/*_spec.rb, test/**/*_test.rb

Read each test file to understand what is already tested.


Step 3 — Detect the test framework

Read existing test files and package.json / pyproject.toml / go.mod / Cargo.toml to identify:

Language Framework candidates
TypeScript/JS Jest, Vitest, Mocha, Jasmine
Python pytest, unittest
Go standard testing package, testify
Rust standard #[test], rstest
Java JUnit 5, Mockito, AssertJ

Match the style of existing tests exactly — same import paths, same assertion library, same file naming convention.


Step 4 — Map coverage gaps

For each source file, read it fully and identify:

Functions / methods to test

Priority What to test
Must Public functions with business logic
Must Error handling paths (if err != nil, except, catch)
Must Validation logic (boundary values, invalid input)
Must Any function that touches a database, file system, or external API
Should Private helpers with non-trivial logic
Skip Simple getters/setters, framework boilerplate, generated code

Read the full file on GitHub · 239 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. 3mo ago First seen · 239 lines · 84 tokens per session scan A c3da1658c377

Subscribe to this mod's changes

test-coverage-agent is an agent published in the GitHub repository kid-sid/claude-spellbook (194 stars, last pushed 3mo ago), licensed MIT. It adds 84 tokens to every session and 1,776 once invoked, about $0.0003 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.

Related

test-coverage-agent compared with agents from other repositories

test-coverage-agent next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
test-coverage-agentkid-sid/claude-spellbookAgent1943mo agoMITA84Claude Code
ai-hygiene-auditorathola/claude-night-marketAgent358yesterdayMITA48Claude Code
test-gapswesammustafa/Claude-Code-Everything-You-Need-to-KnowAgent3.7k4d agononeA38Claude Code
pydantic-ai-validatorcoleam00/context-engineering-introAgent14k8mo agoMITA46Claude Code
testerInsajin/autopus-adkAgent1112mo agoMITA38Claude Code
test-engineerashrafmusa/agenticanaAgent22d agoMITA49Claude Code
fix-verifierXRenSiu/claude-code-forgeAgent211d agoMITA132Claude Code