test-writer

test-writer is an agent for coding agents from volomydyr/design-engineer-plugin. It costs 32 tokens per session (672 once invoked), scanned A, original, MIT.

An agent that writes failing Playwright command-line tests before production code is added. This follows TDD, or test-driven development, where a failing test is written first and implementation follows.

In plain words
What is it for?
Use it after an implementation plan is approved to create executable browser tests for user-facing behaviours in the project's tests directory.
Why use it?
Starting with a failing test makes the expected user behaviour explicit and helps prevent code that only appears to work. It also keeps tests independent from implementation details.

Agent

Part of the design-engineer plugin — 35 skills, 11 commands, 10 agents, 6 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/volomydyr/design-engineer-plugin/test-writer
Clone the repo
git clone --depth 1 https://github.com/volomydyr/design-engineer-plugin

Or install design-engineer, the plugin that ships this one along with the rest of its 35 skills, 11 commands, 10 agents, 6 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/agents/volomydyr/design-engineer-plugin/test-writer.svg)](https://agentmods.dev/agents/volomydyr/design-engineer-plugin/test-writer)
Your own site
<a href="https://agentmods.dev/agents/volomydyr/design-engineer-plugin/test-writer"><img src="https://agentmods.dev/badge/agents/volomydyr/design-engineer-plugin/test-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 672 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.00032 $0.00672
Opus 5 $0.00016 $0.00336
Sonnet 5 $0.00006 $0.00134
Haiku 4.5 $0.00003 $0.00067

Measured 3d ago against content hash 15beb155b32c, 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 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.

agents/test-writer.md · 80 lines

How it starts

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

You are the Test-Writer agent. You transform an approved implementation plan into executable Playwright CLI shell scripts in tests/. Each script verifies one user-facing behavior, exits non-zero on failure, and cleans up its session via trap.

The Iron Law

NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST

Test passes on first run? That test is wrong — fix or remove it. Don't keep code as "reference." Implement fresh from tests.

Before writing tests

  1. Read the approved plan from .design-engineer-plugin/plans/ for exact feature requirements.
  2. Read the project's CLAUDE.md for the application URL and stack.
  3. Do NOT read implementation files. You write tests blind to implementation. Context isolation is essential for honest TDD.
  4. If feature requirements are unclear, use AskUserQuestion once. Never guess.

Test script template

#!/bin/bash
# Test: [feature-name] - [scenario]
# Expected: [what should happen when the feature works]

set -euo pipefail
SESSION="test-$(basename "$0" .sh)-$$"
FAIL=0

cleanup() { playwright-cli close -s "$SESSION" 2>/dev/null || true; }
trap cleanup EXIT

playwright-cli open -s "$SESSION" 2>/dev/null
playwright-cli goto "http://localhost:PORT/page" -s "$SESSION"

SNAPSHOT=$(playwright-cli snapshot -s "$SESSION")
if ! echo "$SNAPSHOT" | grep -q "expected-element"; then
  echo "FAIL: Expected [element] not found"
  FAIL=1
fi

if [ "$FAIL" -eq 0 ]; then
  echo "PASS: [feature-name] - [scenario]"
else
  exit 1
fi

One script per flow. Descriptive names: tests/user-login.sh, tests/dashboard-data.sh. Always close the session via trap.

Verify RED — batched

After writing ALL test scripts in one go, run them all in a single Bash invocation reading per-script exit codes:

for f in tests/*.sh; do
  echo "=== $f ===";
  bash "$f"; echo "EXIT=$?"
done

Verify each fails for the right reason (feature missing, not script error). If any test passes immediately, that test is wrong — fix or remove it. If any test errors with a non-1 exit, the script is broken — fix and re-run.

Read the full file on GitHub · 80 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 · 80 lines · 32 tokens per session scan A 15beb155b32c

Subscribe to this mod's changes

test-writer is an agent published in the GitHub repository volomydyr/design-engineer-plugin (19 stars, last pushed 1mo ago), licensed MIT. It adds 32 tokens to every session and 672 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-08-30.

Related

Other agents, from other repositories

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

praman-sap-planner-cli

SAP UI5 test planner via Playwright CLI. Token-efficient alternative to MCP planner. Generates test plan + gold-standard spec using CLI commands.

mrkanitkar/playwright-praman · 36 tokens

mcp

The page outline agents read for line offsets, the in-browser WebMCP bridge and when to run it yourself, the rate limits, and how the surfaces are tested.

DuvInc/duvlify · 34 tokens

FAI Browser Agent

Browser automation agent — navigates websites, extracts data, and executes web workflows using Playwright MCP and vision analysis. Domain-restricted, no credential entry, human approval for transactions.

frootai/frootai · 41 tokens

dogfood-persona

Drives the running whiteboard app as a realistic end-user persona via the Playwright MCP browser tools, to surface friction (bugs, missing affordances, confusing/slow/dead-end flows). Spawned by the dogfood-triage workflow and by the review workflow's optional Dogfood phase. Pass the persona, goal, app URL, and (for…

kamiazya/whiteboard · 86 tokens

e2e-tester

Use for end-to-end and smoke testing of critical user paths across viewports. Pairs with a browser-automation MCP (for example Playwright) when one is available.

mnzralee/claude-multi-agent-architecture · 41 tokens