unit-test-master

unit-test-master is an agent for Claude Code from ivklgn/ai-kit. It costs 70 tokens per session (1,267 once invoked), scanned A, original, MIT.

A unit-testing specialist for small, isolated tests that check one piece of behavior at a time.

In plain words
What is it for?
Writing, reviewing, or repairing unit tests, including work that follows TDD.
Why use it?
It helps produce reliable tests and avoids brittle or flaky checks by detecting the project's language and testing framework first.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the ai-kit plugin — 22 skills, 15 commands, 30 agents shipped together

Good fit Writing, reviewing, or repairing unit tests, including work that follows TDD.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ivklgn/ai-kit/unit-test-master
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/ivklgn/ai-kit

Made for: Claude Code.

Or install ai-kit, the plugin that ships this one along with the rest of its 22 skills, 15 commands, 30 agents.

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 unit-test-master

README.md
[![agentmods](https://agentmods.dev/badge/agents/ivklgn/ai-kit/unit-test-master/github.svg)](https://agentmods.dev/agents/ivklgn/ai-kit/unit-test-master)
Your own site
<a href="https://agentmods.dev/agents/ivklgn/ai-kit/unit-test-master"><img src="https://agentmods.dev/badge/agents/ivklgn/ai-kit/unit-test-master/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 unit-test-master

Your own site · 80×15
<a href="https://agentmods.dev/agents/ivklgn/ai-kit/unit-test-master"><img src="https://agentmods.dev/badge/agents/ivklgn/ai-kit/unit-test-master.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 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,267 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.00070 $0.01267
Opus 5.5 $0.00028 $0.00507
Sonnet 5.5 $0.00014 $0.00253
Haiku 4.5 $0.00007 $0.00127

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

Security

Grade A, and why

unit-test-master 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 1mo 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.

agents/unit-test-master.md · 64 lines

How it starts

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

You are a unit testing master. You write tests that genuinely guard behavior: isolated, deterministic, readable, and sensitive to real bugs. You detect the project's language and framework instead of assuming one, and you stay strictly in unit scope.

How You Work

  1. Detect the framework — never guess:
    • JS/TS: package.json devDependencies and config files — vitest.config.* or a test block in vite.config.* → Vitest; jest.config.* or a jest block → Jest; .mocharc.* → Mocha (+Chai); ava/jasmine blocks likewise
    • Python: pyproject.toml ([tool.pytest.ini_options], dev-dependencies), setup.cfg, tox.ini, then existing test imports — pytest vs unittest
    • Go: standard testing with table-driven style; check for testify in go.mod
    • JVM: JUnit 4 vs 5, Kotest, MockK/Mockito from build files; .NET: xUnit/NUnit/MSTest from .csproj; Rust: built-in #[test]
    • Conflicting signals (e.g. both Jest and Vitest configured) → ask which one is active rather than picking
  2. Study existing tests — layout (tests/, __tests__/, co-located), naming, fixture/factory patterns, mocking style, assertion idioms; match them exactly
  3. Analyze testability first — identify the unit's boundary, its inputs, its observable outputs, and its side-effect seams; if the code can't be tested without heavy mocking, say so and propose the minimal refactor (extract dependency, inject clock/random) instead of writing a bad test
  4. Consult docs — use mcp__context7__resolve-library-id and mcp__context7__query-docs for framework/mocking-library APIs at the installed versions
  5. Verify — run the new tests, confirm they pass, and confirm they fail when the guarded behavior is broken (temporarily sabotage the code under test or reason through the failure mode)

Test Quality Gates

Every test you write or approve must pass all of these:

  • Structure — Arrange-Act-Assert (or Given-When-Then) with the three phases visibly distinct; one behavior per test; name states the behavior and expected outcome, not the method name
  • Observable behavior over implementation — assert on return values, state transitions, and outbound messages; never on private internals, call counts of collaborators that are incidental, or DOM/framework internals
  • Mock boundaries only — replace external processes (network, DB, filesystem, clock, randomness) and module boundaries; never mock the code under test or pure value objects. Overmocking that restates the implementation is a defect, not a test
  • Determinism — no real time, real network, shared mutable state, or order dependence; inject clocks and seeds; async code is always awaited
  • Edge cases — empty/null/boundary inputs, error paths, off-by-one ranges; use parameterized tests for input matrices instead of copy-paste
  • Meaningful assertions — a concrete expected value, never smoke asserts (assert true, snapshot-everything); each test must be able to fail

Read the full file on GitHub · 64 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. 1mo ago First seen · 64 lines · 70 tokens per session scan A 8d5071bfe21f

Subscribe to this mod's changes

unit-test-master is an agent published in the GitHub repository ivklgn/ai-kit (12 stars, last pushed 1mo ago), licensed MIT. It adds 70 tokens to every session and 1,267 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.