test-writer

test-writer is a skill for Claude Code, Codex from MountainUnicorn/add. It costs 18 tokens per session (2,579 once invoked), scanned A, original, MIT.

A test-writing tool that turns a feature specification into runnable tests that initially fail. TDD, or test-driven development, means writing these tests before the code that makes them pass.

In plain words
What is it for?
Creating tests from acceptance criteria and user test cases while following the project's chosen testing framework.
Why use it?
It makes the required behavior explicit and shows which acceptance criteria and user scenarios still need implementation.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside the plugin that ships it — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed.

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 skills/mountainunicorn/add/test-writer
Any agent
npx skills add MountainUnicorn/add --skill test-writer
Clone the repo
git clone --depth 1 https://github.com/MountainUnicorn/add

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/mountainunicorn/add/test-writer.svg)](https://agentmods.dev/skills/mountainunicorn/add/test-writer)
Your own site
<a href="https://agentmods.dev/skills/mountainunicorn/add/test-writer"><img src="https://agentmods.dev/badge/skills/mountainunicorn/add/test-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,579 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.00018 $0.02579
Opus 5 $0.00009 $0.01290
Sonnet 5 $0.00004 $0.00516
Haiku 4.5 $0.00002 $0.00258

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

Security

Grade A, and why

test-writer 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.

core/skills/test-writer/SKILL.md · 337 lines

How it starts

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

ADD Test Writer Skill v{{VERSION}}

Generate comprehensive failing tests from a feature specification. This is the RED phase of TDD — write tests before implementation.

Overview

Test Writer converts acceptance criteria and user test cases from a spec into failing, runnable tests. The output is test files that:

  • Compile and execute but fail (RED state)
  • Have clear, descriptive names mapped to ACs
  • Cover all acceptance criteria and user test cases
  • Follow the project's test conventions
  • Are production-quality (good error messages, clear assertions)

Pre-Flight Checks

  1. Verify spec file exists and is readable

    • Read the spec at the provided path
    • Extract frontmatter: feature name, version, status
  2. Parse acceptance criteria

    • Read the Acceptance Criteria section
    • Extract each AC with its ID (AC-001, AC-002, etc.)
    • Extract the criteria description and conditions
  3. Parse user test cases

    • Read the User Test Cases section (if present)
    • Extract each UT with ID (UT-001, UT-002, etc.)
    • Note the setup, actions, and expected outcomes
  4. Load test framework configuration

    • Read .add/config.json
    • Identify test.framework (jest, pytest, vitest, mocha, pytest, etc.)
    • Load test.convention (naming pattern, directory structure, imports)
    • Check test.type to determine default test type
  5. Identify test file location

    • Determine target directory from config (typically tests/ or __tests__/)
    • Determine file naming from convention
    • Check if test file already exists; if so, append new tests
  6. Check for session handoff — per the Session-Handoff Preflight in ${CLAUDE_PLUGIN_ROOT}/references/skill-epilogue.md

Execution Steps

Step 1: Analyze Acceptance Criteria

For each acceptance criterion:

  1. Extract the requirement statement
  2. Break down into testable assertions
  3. Identify input conditions, actions, and expected outputs
  4. Note any data setup required
  5. Consider both happy path and edge cases

Read the full file on GitHub · 337 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. 4d ago First seen · 337 lines · 18 tokens per session scan A 9311f0c7842b

Subscribe to this mod's changes

test-writer is a skill published in the GitHub repository MountainUnicorn/add (11 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 2,579 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

maestro-work

Drive one accepted implementation unit test-first - smallest falsifiable behavior, minimum edits, evidence that names the real falsifier.

ReinaMacCredy/maestro · 28 tokens

red-green-refactor

Guides the red-green-refactor TDD workflow: write a failing test first, implement the minimum code to make it pass, then refactor while keeping tests green. Use when a user asks to practice TDD, write tests first, follow red-green-refactor, do test-driven development, write failing tests before code, or phrases like…

rohitg00/skillkit · 90 tokens

superpowers-zh

Use when constraining AI coding with Chinese TDD methodology, systematic debugging, code review, and verification workflows. Superpowers-zh: Chinese adaptation of the Superpowers AI-assisted programming skills and methodologies.

znlgis/opengis-skills · 45 tokens

absolute-work

End-to-end, phase-gated SDLC for AI coding agents: relentless design interview → reviewed spec → dependency-graphed task board → safe-wave TDD execution → verification → converge. Handles features, bugs, refactors, greenfield projects, planning breakdowns, and migrations. Triggers on "absolute work", "build this…

maddhruv/absolute · 104 tokens

writing-skills

Methodology for creating effective skills using TDD principles. Use when creating new skills, editing existing skills, or authoring plugin components. Triggers on: 'create skill', 'write skill', 'new skill', 'skill authoring'.

TechDufus/oh-my-claude · 52 tokens

simple-tdd

Test-driven development methodology — write the failing test first, then the minimum code to pass it.

SylphAI-Inc/atskills · 22 tokens