test-automator-agent

test-automator-agent is an agent for coding agents from dsifry/metaswarm. It costs 0 tokens per session (2,789 once invoked), scanned A, original, MIT.

An automated testing agent that writes unit tests for individual parts of a program and integration tests for connected parts. It follows TDD, or test-driven development, where tests are written before or alongside the code, and checks which code paths are covered.

In plain words
What is it for?
Use it to create and maintain tests, review test coverage, choose mocks, improve test quality, and update test data factories.
Why use it?
It reduces the risk of untested branches, error handling, and fallback behaviour being broken during development.

Agent

Part of the metaswarm plugin — 14 skills, 16 commands, 19 agents, 2 hooks shipped together

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/dsifry/metaswarm/test-automator-agent
Clone the repo
git clone --depth 1 https://github.com/dsifry/metaswarm

Or install metaswarm, the plugin that ships this one along with the rest of its 14 skills, 16 commands, 19 agents, 2 hooks.

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/dsifry/metaswarm/test-automator-agent.svg)](https://agentmods.dev/agents/dsifry/metaswarm/test-automator-agent)
Your own site
<a href="https://agentmods.dev/agents/dsifry/metaswarm/test-automator-agent"><img src="https://agentmods.dev/badge/agents/dsifry/metaswarm/test-automator-agent.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,789 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.00000 $0.02789
Opus 5 $0.00000 $0.01394
Sonnet 5 $0.00000 $0.00558
Haiku 4.5 $0.00000 $0.00279

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

Security

Grade A, and why

test-automator-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 5d 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/test-automator-agent.md · 440 lines

How it starts

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

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


Purpose

The Test Automator Agent writes tests following TDD principles and ensures adequate test coverage. It works alongside the Coder Agent to maintain the RED-GREEN-REFACTOR cycle.

Why 100% Coverage?

Coverage is a floor, not a ceiling. 100% doesn't mean correct — but <100% guarantees untested code paths. Every if branch, error handler, and fallback exists because someone thought it was necessary. If it's worth writing, it's worth testing. If it's not worth testing, delete it.

Coverage also serves as a deterministic safety net: when an agent working without full context breaks something, the coverage gap immediately reveals which code paths lost their tests.


Responsibilities

  1. Test Writing: Create unit and integration tests
  2. Coverage Analysis: Ensure adequate coverage
  3. Mock Strategy: Use appropriate mocking patterns
  4. Test Quality: Write meaningful, maintainable tests
  5. Factory Maintenance: Update mock factories as needed

Activation

Triggered when:

  • Coder Agent needs tests written first (TDD)
  • Coverage gaps identified
  • New mock factories needed

Workflow

Step 0: Knowledge Priming (CRITICAL)

BEFORE any other work, prime your context:

bd prime --work-type implementation --keywords "testing" "mock" "tdd"

Review the output for testing patterns, mock factory usage, and TDD requirements.

Step 1: Understand Requirements

# Get the task details
bd show <task-id> --json

# Get the implementation plan
# Read what functionality needs testing

Step 2: Analyze Test Requirements

For each component to test:

Component Type Focus Mock Strategy
Pure Service Logic, calculations No mocks needed
Persistence DB operations Mock Prisma
Orchestrator Coordination Mock all services
API Route HTTP handling Mock services
Adapter External API Mock HTTP client

Read the full file on GitHub · 440 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. 5d ago First seen · 440 lines · 0 tokens per session scan A 5679a78760c9

Subscribe to this mod's changes

test-automator-agent is an agent published in the GitHub repository dsifry/metaswarm (409 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,789 tokens. 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

Other agents, from other repositories

test-writer

Use this agent when you need to write comprehensive test suites for existing code or when implementing test-driven development. This includes creating unit tests, integration tests, or test scenarios for new features. The agent excels at identifying edge cases, writing clear test descriptions, and ensuring proper test…

PostHog/posthog · 373 tokens

test-writer

Use this agent when you need to write comprehensive test suites for existing code or when implementing test-driven development. This includes creating unit tests, integration tests, or test scenarios for new features. The agent excels at identifying edge cases, writing clear test descriptions, and ensuring proper test…

PostHog/posthog-foss · 373 tokens

test-engineer

Testing expert. Use for writing tests (unit, integration, e2e), TDD workflow, test coverage, debugging test failures. Triggers: test, pytest, unittest, coverage, tdd, testing, mock, fixture.

softspark/ai-toolkit · 51 tokens

NUnit.Agent

Assists with NUnit development, documentation, and CI configuration.

nunit/nunit · 16 tokens

delphi-tester

Subagente especializado em implementacao de testes unitarios DUnitX para projetos Delphi. Opera em dois modos: MODO EXPLICITO: Use quando o usuario solicitar /tdd, "crie testes", "implemente testes", "quero cobertura de testes", "teste unitario", "DUnitX". Nesse modo, analisa o projeto completo e gera a suite de…

adrianosantostreina/delphi-dev · 291 tokens

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