unit-test-specialist

unit-test-specialist is an agent for Claude Code 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 for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit 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.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/matteocervelli/llms/unit-test-specialist
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/matteocervelli/llms

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/matteocervelli/llms/unit-test-specialist/github.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/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-specialist

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. 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.00035 $0.02522
Opus 5.5 $0.00014 $0.01009
Sonnet 5.5 $0.00007 $0.00504
Haiku 4.5 $0.00003 $0.00252

Measured 3mo ago against content hash d8927f21164e, 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-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 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.

.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. 3mo 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 6mo ago), licensed MIT. It adds 35 tokens to every session and 2,522 once invoked, about $0.0001 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-09-01.

Related

unit-test-specialist compared with agents from other repositories

unit-test-specialist next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
unit-test-specialistmatteocervelli/llmsAgent256mo agoMITA35Claude Code
test-automator-agentdsifry/metaswarmAgent442yesterdayMITA22Claude Code
test-writerPostHog/posthogAgent41ktodaynoneA359Claude Code
test-writerPostHog/posthog-fossAgent734todayMITA359Claude Code
jasmine-expert0xfurai/claude-code-subagentsAgent1.0k25d agoMITA55Claude Code
test-engineersoftspark/ai-toolkitAgent18014d agoApache-2.0A51Claude Code
testerjosstei/maestro-orchestrateAgent4931mo agoApache-2.0A66Claude Code