test-spec-writer

test-spec-writer is a command for Claude Code from TestAny-io/testany-agent-skills. It costs 40 tokens per session (490 once invoked), scanned A, original, MIT.

A process for turning approved product and technical documents into a complete set of software test cases. It produces a traceability matrix, which links requirements and risks to tests, plus instructions for running and automating them.

In plain words
What is it for?
Use it to create executable test packages from documents such as product requirements, API contracts, system designs, and test strategies.
Why use it?
It prevents important requirements, risks, and external behaviours from being missed or left without a clear test result.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the testany-eng plugin — 21 skills, 21 commands shipped together

Good fit Use it to create executable test packages from documents such as product requirements, API contracts, system designs, and test strategies.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/testany-io/testany-agent-skills/test-spec-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.

Clone the repo
git clone --depth 1 https://github.com/TestAny-io/testany-agent-skills

Made for: Claude Code.

Or install testany-eng, the plugin that ships this one along with the rest of its 21 skills, 21 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/test-spec-writer/github.svg)](https://agentmods.dev/commands/testany-io/testany-agent-skills/test-spec-writer)
Your own site
<a href="https://agentmods.dev/commands/testany-io/testany-agent-skills/test-spec-writer"><img src="https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/test-spec-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-spec-writer

Your own site · 80×15
<a href="https://agentmods.dev/commands/testany-io/testany-agent-skills/test-spec-writer"><img src="https://agentmods.dev/badge/commands/testany-io/testany-agent-skills/test-spec-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 490 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.00040 $0.00490
Opus 5 $0.00020 $0.00245
Sonnet 5 $0.00008 $0.00098
Haiku 4.5 $0.00004 $0.00049

Measured 10d ago against content hash 7356b93dbfa5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

test-spec-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 10d 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/testany-eng/commands/test-spec-writer.md · 45 lines

What it actually says

Test Spec Writer

启动测试规格与测试用例包撰写流程。基于批准的 Test Strategy 与 LLD 等基线,输出独立测试范围内完整、详细、可执行的 test case package。

使用方式

提供上游文档路径:

$ARGUMENTS

在研发流程中的位置

LLD → [Test Spec Writer] → Test Case Package → Test Reviewer

输出范围

  • test-spec-profile-v1TRACEABILITY-METADATA block
  • 追溯矩阵
  • 覆盖率摘要
  • 测试矩阵
  • 详细测试用例
  • 环境、数据、依赖与证据要求
  • 开发内建验证前置条件
  • 回归包、Smoke 包、自动化建议
  • Testany Automation Handoff(供 testany-bot /case-writing 消费)

核心原则

  • Package 优先:输出完整测试包,而非零散 case
  • Strategy 承接:只细化批准策略,不重写方法论
  • 追溯强制:需求、接口、风险必须能映射到测试项
  • 执行就绪:每个 case 都要可执行、可判定
  • 边界清晰:不展开 unit、code-level integration、provider-side contract 的详细 case
  • 覆盖率分项统计:按需求/风险/外部行为/场景/NFR 分项输出
  • 脚本自检:写完后先跑 trace-lint,再用 trace-build-rtm 联合 PRD/Test Strategy 检查全局 RTM

请提供 PRD、API Contract、HLD、LLD、Test Strategy 路径开始撰写。

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. 10d ago First seen · 45 lines · 40 tokens per session scan A 7356b93dbfa5

Subscribe to this mod's changes

test-spec-writer is a command published in the GitHub repository TestAny-io/testany-agent-skills (81 stars, last pushed yesterday), licensed MIT. It adds 40 tokens to every session and 490 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.