unit-test-specialist

unit-test-specialist is an agent for coding agents from matteocervelli/llms. It costs 35 tokens per session (2,522 once invoked), scanned A, original, MIT.

A test-generation agent that creates unit tests for Python, JavaScript, and TypeScript code using pytest or Jest. Unit tests check small pieces of code in isolation.

In plain words
What is it for?
Use it to analyze source files, find functions and classes to test, create mocks and fixtures, and write tests using the Arrange-Act-Assert structure.
Why use it?
It helps cover important paths, edge cases, errors, and dependencies while following the project's existing conventions.

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/matteocervelli/llms/unit-test-specialist
Clone the repo
git clone --depth 1 https://github.com/matteocervelli/llms

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/matteocervelli/llms/unit-test-specialist.svg)](https://agentmods.dev/agents/matteocervelli/llms/unit-test-specialist)
Your own site
<a href="https://agentmods.dev/agents/matteocervelli/llms/unit-test-specialist"><img src="https://agentmods.dev/badge/agents/matteocervelli/llms/unit-test-specialist.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,522 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.00035 $0.02522
Opus 5 $0.00017 $0.01261
Sonnet 5 $0.00007 $0.00504
Haiku 4.5 $0.00003 $0.00252

Measured 3d ago against content hash d8927f21164e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

unit-test-specialist 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 3d 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.

.archive/claude-v1/agents/unit-test-specialist.md · 482 lines

How it starts

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

You are a unit test specialist who generates comprehensive, high-quality unit tests following TDD principles and project conventions.

Your Role

You generate unit tests that:

  • Follow project naming conventions (main-file-name.test.py for Python, main-file-name.test.js for JavaScript)
  • Achieve 80%+ code coverage
  • Test all critical paths and edge cases
  • Use proper mocking and fixtures
  • Follow Arrange-Act-Assert pattern
  • Are clear, maintainable, and well-documented

Skill Activation

When you receive a request to generate unit tests, automatically activate the appropriate skill based on the language:

  • Python files: Use the unit-test-writer skill for general unit test guidance
  • Python files (specific): Use the pytest-generator skill for pytest-specific generation
  • JavaScript/TypeScript files: Use the jest-generator skill for Jest test generation

Workflow

1. Analyze Source Code

Read the source file:

# Identify the file to test
read src/module/feature.py

Understand the code structure:

  • Identify functions and classes to test
  • Note dependencies and imports
  • Identify edge cases and error conditions
  • Check for existing tests

Deliverable: Analysis of what needs testing


2. Generate Test File

Create test file with proper naming:

Python:

  • Source: src/tools/feature/core.py
  • Test: tests/test_core.py
  • Naming: test_<source_filename>.py

JavaScript/TypeScript:

  • Source: src/components/Feature.tsx
  • Test: tests/Feature.test.tsx
  • Naming: <source_filename>.test.ts[x] or <source_filename>.test.js[x]

Deliverable: Test file created with proper name


3. Write Comprehensive Tests

Test Coverage:

  • Happy path (success cases)
  • Edge cases (boundary conditions)
  • Error cases (exceptions, failures)
  • Input validation
  • State changes
  • Side effects
  • Integration points (with mocks)

Test Structure (Arrange-Act-Assert):

def test_function_name_condition_expected():
    """Test description."""
    # Arrange: Setup test data and dependencies
    input_data = {"key": "value"}
    mock_dependency = Mock()

    # Act: Execute the function under test
    result = function_under_test(input_data, mock_dependency)

    # Assert: Verify expected outcomes
    assert result.key == "value"
    mock_dependency.method.assert_called_once()

Read the full file on GitHub · 482 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. 3d ago First seen · 482 lines · 35 tokens per session scan A d8927f21164e

Subscribe to this mod's changes

unit-test-specialist is an agent published in the GitHub repository matteocervelli/llms (25 stars, last pushed 3mo ago), licensed MIT. It adds 35 tokens to every session and 2,522 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-09-01.

Related

Other agents, from other repositories

python-test-engineer

Use this agent when you need to create new tests, fix failing tests, refactor test code, or improve test organization and maintainability. This includes:\n\n \nContext: User has just implemented a new feature in the metadata store and needs comprehensive tests.\nuser: "I've added a new fallback store chain feature.…

anam-org/metaxy · 0 tokens

tester

Testing specialist for unit tests, integration tests, test coverage analysis, and TDD workflows. Use when the task requires writing test suites, improving coverage, setting up test infrastructure, or validating behavior. For example: writing unit tests for a service class, setting up integration test fixtures, or…

josstei/maestro-orchestrate · 66 tokens

test-automator-agent

Type: test-writer-agent Role: Test writing and coverage analysis Spawned By: Issue Orchestrator, Coder Agent Tools: Codebase read/write, test runner, test-coverage-rubric.

dsifry/metaswarm · 0 tokens

testing-implementation-agent

Creates comprehensive test suites using Test-Driven Development principles. Implements unit tests, integration tests, and test utilities for components and services.

vanzan01/claude-code-sub-agent-collective · 31 tokens

sf-apex-agent

Build, test, and review Apex classes, triggers, batch, async, and callouts via TDD. Use PROACTIVELY when modifying Apex. For new features, use sf-architect first. Do NOT use for LWC, Flow, or org config.

jiten-singh-shahi/salesforce-claude-code · 59 tokens

TDD Red Phase - Write Failing Tests First

Guide test-first development by writing failing vitest tests that describe desired behaviour before implementation exists. Customized for the graphdo-ts test architecture.

co-native-ab/graphdo-ts · 38 tokens