test-spec-writer

test-spec-writer is a skill for Claude Code, Codex from TestAny-io/testany-agent-skills. It costs 72 tokens per session (4,893 once invoked), scanned A, original, MIT.

A test-specification writing assistant that turns approved product and technical documents into a complete package of test cases and supporting records. It covers what must be checked, the required setup and data, how to judge results, and how tests trace back to requirements.

In plain words
What is it for?
Use it after the test strategy is approved to create test matrices, traceability records, API contract checks, regression and smoke groups, detailed cases, and execution instructions.
Why use it?
It reduces the risk of scattered test cases, missing coverage, or tests that cannot be run because their prerequisites and evidence are unclear. It keeps test design separate from test results and release decisions.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: names the AskUserQuestion tool.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **语言规则**:默认跟随用户输入语言;用户显式指定时以用户指定为准;不要因为本 `SKILL.md` 是中文而强制输出中文;`TRACEABILITY-METADATA` 的字段名、枚举值、ID、comment markers 始终保持英文。若本 skill 使用模板或派发子任务,继续传递同一个 `output_la.

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

Good fit Use it after the test strategy is approved to create test matrices, traceability records, API contract checks, regression and smoke groups, detailed cases, and execution instructions.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/TestAny-io/testany-agent-skills
agentmods
npx agentmods add skills/testany-io/testany-agent-skills/test-spec-writer

Made for: Claude Code, Codex.

Or install testany-eng, the plugin that ships this one along with the rest of its 24 skills, 24 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/skills/testany-io/testany-agent-skills/test-spec-writer/github.svg)](https://agentmods.dev/skills/testany-io/testany-agent-skills/test-spec-writer)
Your own site
<a href="https://agentmods.dev/skills/testany-io/testany-agent-skills/test-spec-writer"><img src="https://agentmods.dev/badge/skills/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/skills/testany-io/testany-agent-skills/test-spec-writer"><img src="https://agentmods.dev/badge/skills/testany-io/testany-agent-skills/test-spec-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,893 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.00072 $0.04893
Opus 5.5 $0.00029 $0.01957
Sonnet 5.5 $0.00014 $0.00979
Haiku 4.5 $0.00007 $0.00489

Measured 1mo ago against content hash 4ff81a56d852, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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/skills/test-spec-writer/SKILL.md · 416 lines

How it starts

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

Test Spec Writer

执行前读取 工作流执行约定:先取证再提问、按实际工具能力回退,并从本次安装位置定位资源。

语言规则:默认跟随用户输入语言;用户显式指定时以用户指定为准;不要因为本 SKILL.md 是中文而强制输出中文;TRACEABILITY-METADATA 的字段名、枚举值、ID、comment markers 始终保持英文。若本 skill 使用模板或派发子任务,继续传递同一个 output_language。详见 ../../references/language-policy.md。

你是测试规格与测试用例包写作助手。你的目标是基于批准的 Test Strategy 与 PRD/API/HLD/LLD 基线,产出完整、准确、详细、无关键漂移的 test case package。

先选工作模式

  • formal_design:用户要求完整新功能文档或正式全量准出,执行下文完整流程、模板、追溯和适用门禁。
  • bounded_change(amendment):在已有有效基线和明确授权的变更范围内,读取 有限增量规则,直接执行“读取基线与授权 -> 核对影响边界 -> 修改获授权增量 -> 检查差异与验证 -> 交付范围限定的结果”。不回补全套历史文档,不把草稿或自检升级为批准。
  • 模式由实际职责、信任、契约、失败语义与批准范围决定,不按行数/文件数判断。“两行修改”改变权限边界仍需对应有权 Owner 决策。

下文全量模板、全局覆盖矩阵与整套前置文档是 formal_design 的要求;有限增量沿用既有工件格式、有效批准及相关追溯,不因缺某种历史文件格式自动改成新项目启动。

核心原则

原则 说明
Package 而非零散 Case 输出完整测试包,包含矩阵、追溯、详细 case、数据与执行说明
Strategy 承接 只细化已批准的独立测试策略,不重写测试方法论
追溯强制 In-scope 需求、接口、架构决策、关键风险必须可追溯到测试项
执行就绪 每个测试项都应具备前置条件、数据、依赖、判定方式
边界克制 不输出测试结果,不代替发布准出
边界清晰 unit、code-level integration 只作为上游前置条件;批准 API Contract 的黑盒验证必须在 test case package 中展开。若存在 provider-side contract suite,仅作为补充证据,不能替代 QA 结论
覆盖率分项统计 覆盖率必须按需求/风险/外部行为/场景/NFR 分项统计,不允许用单一总百分比代替
元数据强制 输出必须包含符合 test-spec-profile-v1 的 TRACEABILITY-METADATA block,并通过脚本校验

内容边界

应该包含

  • 基线引用与包范围
  • 追溯矩阵
  • 覆盖率摘要与未覆盖项清单
  • 测试矩阵(按层次/场景/风险分组)
  • API Contract 验证矩阵、覆盖摘要与详细 case
  • 详细测试用例
  • 环境、数据、依赖、观测与证据要求
  • 回归包、Smoke 包、执行顺序建议
  • 开发内建验证前置条件
  • 假设、豁免、待确认项

不应该包含

  • 重新定义 PRD/HLD/API 需求
  • 高层测试策略重写
  • 测试执行结果或缺陷报告
  • 发布 Go/No-Go 结论
  • unit、code-level integration 的详细测试设计
  • provider-side contract harness / 白盒契约自动化的实现设计

正式工件的 Traceability Metadata(强制)

产出的 Test Spec / Test Case Package 必须内嵌 traceability metadata block,并遵循以下参考:

  • ../../references/traceability-schema/traceability-schema-v1.md
  • ../../references/traceability-schema/test-spec-profile-v1.example.yaml
  • ../../references/traceability-schema/trace-lint-contract-v1.md
  • ../../references/traceability-schema/trace-build-rtm-contract-v1.md

Read the full file on GitHub · 416 lines

Files

What ships with it

6 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. 1mo ago Changed · +10 lines · +14 tokens per session 4ff81a56d852
  2. 1mo ago First seen · 406 lines · 58 tokens per session scan A 086878a5036c

Subscribe to this mod's changes

test-spec-writer is a skill published in the GitHub repository TestAny-io/testany-agent-skills (82 stars, last pushed yesterday), licensed MIT. It adds 72 tokens to every session and 4,893 once invoked, about $0.0003 per session on Opus 5.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-09-08.