test-writer

test-writer is a skill for Claude Code from ondrej-svec/heart-of-gold-toolkit. It costs 68 tokens per session (1,582 once invoked), scanned A, original, MIT.

A test-planning skill that writes tests from user stories and architecture documents, leaving them intentionally failing. TDD, or test-driven development, starts with failing tests that describe the required behavior before implementation.

In plain words
What is it for?
Use it to create behavioral acceptance tests and architecture conformance tests, run the suite, and establish the RED stage without writing implementation code.
Why use it?
It defines what “done” means before code is written and checks both user-visible behavior and required architecture.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the marvin plugin — 13 skills, 3 agents, 2 hooks shipped together

Good fit Use it to create behavioral acceptance tests and architecture conformance tests, run the suite, and establish the RED stage without writing implementation code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ondrej-svec/heart-of-gold-toolkit/test-writer
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.

Any agent
npx skills add ondrej-svec/heart-of-gold-toolkit --skill test-writer
Clone the repo
git clone --depth 1 https://github.com/ondrej-svec/heart-of-gold-toolkit

Made for: Claude Code.

Or install marvin, the plugin that ships this one along with the rest of its 13 skills, 3 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-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/ondrej-svec/heart-of-gold-toolkit/test-writer/github.svg)](https://agentmods.dev/skills/ondrej-svec/heart-of-gold-toolkit/test-writer)
Your own site
<a href="https://agentmods.dev/skills/ondrej-svec/heart-of-gold-toolkit/test-writer"><img src="https://agentmods.dev/badge/skills/ondrej-svec/heart-of-gold-toolkit/test-writer/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 test-writer

Your own site · 80×15
<a href="https://agentmods.dev/skills/ondrej-svec/heart-of-gold-toolkit/test-writer"><img src="https://agentmods.dev/badge/skills/ondrej-svec/heart-of-gold-toolkit/test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,582 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 23
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00068 $0.01582
Opus 5 $0.00034 $0.00791
Sonnet 5 $0.00014 $0.00316
Haiku 4.5 $0.00007 $0.00158

Measured 12d ago against content hash 7b8c53c56c70, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, 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 12d 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.

plugins/marvin/skills/test-writer/SKILL.md · 179 lines

How it starts

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

Test Writer

Write failing tests that define what "done" means. Behavioral tests verify acceptance criteria. Conformance tests verify the architecture is followed — not faked.

Boundaries

This skill MAY: read stories and architecture docs, write test files, run the test suite. This skill MAY NOT: write implementation code, modify existing source files, fix failing tests by changing expectations.

ALL tests must FAIL when this skill completes. That's the point — RED state.

Common Rationalizations

Shortcut Why It Fails The Cost
"Write tests that pass with mocks" Tests that pass with mocks prove nothing about real behavior False confidence → bugs in production
"Skip conformance tests — unit tests are enough" Unit tests don't verify architecture compliance Stubs pass tests, real deps aren't wired
"Relax assertions — they're too strict" Loose assertions let wrong implementations pass Tests are decoration, not verification
"Test the happy path only" Edge cases are where bugs hide Happy path works, edge cases crash

Step 1: Read Stories

If $STORIES_PATH is set (pipeline mode):

  1. Read the stories file at $STORIES_PATH
  2. Extract all stories with their acceptance criteria and edge cases

If no env var (standalone mode):

  1. Search docs/stories/ for recent story files
  2. If found: Use AskUserQuestion (header: "Stories", question: "Found stories: [list]. Which should I write tests for?") with each as an option
  3. If not found: Use AskUserQuestion (header: "Stories", question: "Where are the stories? Provide a path, or describe what to test.")

Exit: Stories loaded, acceptance criteria extracted.


Step 2: Read Architecture Doc

If $ARCH_PATH is set (pipeline mode):

  1. Read the architecture doc at $ARCH_PATH
  2. Extract: dependencies, integration pattern, file structure

If no env var (standalone mode):

  1. Look for *.architecture.md near the stories file
  2. If found: Read it automatically
  3. If not found: Use AskUserQuestion (header: "Architecture", question: "Is there an architecture doc? Provide path or skip.") with options: "Skip (behavioral tests only)" and "Provide path"

Read the full file on GitHub · 179 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 179 lines · 68 tokens per session scan A 7b8c53c56c70

Subscribe to this mod's changes

test-writer is a skill published in the GitHub repository ondrej-svec/heart-of-gold-toolkit (19 stars, last pushed 22d ago), licensed MIT. It adds 68 tokens to every session and 1,582 once invoked, about $0.0003 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.