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.
npx agentmods add agents/kid-sid/claude-spellbook/test-coverage-agentgit clone --depth 1 https://github.com/kid-sid/claude-spellbookWrote 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.
[](https://agentmods.dev/agents/kid-sid/claude-spellbook/test-coverage-agent)<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="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00084 | $0.01776 |
| Opus 5 | $0.00042 | $0.00888 |
| Sonnet 5 | $0.00017 | $0.00355 |
| Haiku 4.5 | $0.00008 | $0.00178 |
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 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.
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 |
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.
- 4d ago First seen · 239 lines · 84 tokens per session scan A c3da1658c377
test-coverage-agent is an agent published in the GitHub repository kid-sid/claude-spellbook (187 stars, last pushed 29d ago), licensed MIT. It adds 84 tokens to every session and 1,776 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-30.
Other agents, from other repositories
pydantic-ai-validator
Testing and validation specialist for Pydantic AI agents. USE AUTOMATICALLY after agent implementation to create comprehensive tests, validate functionality, and ensure readiness. Uses TestModel and FunctionModel for thorough validation.
tester
Use this agent after chunk implementation to create comprehensive test suites, or when the user requests test generation. Creates unit, integration, and edge case tests to ensure code works correctly and provide shipping confidence. Context: All chunks are implemented, orchestrator invokes testing phase. user: "All…
test-writer
Expert test writer for Go unit/integration tests. Generates comprehensive, maintainable tests. Use PROACTIVELY after code-writer completes.
phpt-author
Use to write new .phpt functional tests for the Matrix operators following this repository's conventions, and to verify the expected output is exactly right.
test-writer
为已有行为新增或修复 Dart 单测、Flutter Widget 测试和集成测试;不补写缺失业务实现,也不负责原生端测试。触发词:缺测试、flaky、mocktail、testWidgets、integrationtest。.
test-writer
Auto-generates tests for existing code. Unit tests, integration tests, coverage gaps.