prd-test-writer

prd-test-writer is a skill for Claude Code, Codex from yunshu0909/yunshu_skillshub. It costs 136 tokens per session (4,366 once invoked), scanned A, original, MIT.

A collaborative workflow for writing a product requirements document (PRD) and executable test cases together. A PRD explains the product behavior, while test cases define precise checks for whether the implementation works.

In plain words
What is it for?
Use it to define user stories, acceptance criteria, UI layouts, behavior diagrams, implementation-based test cases, review documents, and evidence-backed checks for multi-step tasks.
Why use it?
It ties requirements, visible behavior, edge cases, and tests to the real code instead of vague testing goals. It also keeps human review separate from automated checks and requires evidence for each assertion.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to define user stories, acceptance criteria, UI layouts, behavior diagrams, implementation-based test cases, review documents, and evidence-backed checks for multi-step tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yunshu0909/yunshu_skillshub/prd-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 yunshu0909/yunshu_skillshub --skill prd-test-writer
Clone the repo
git clone --depth 1 https://github.com/yunshu0909/yunshu_skillshub

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/yunshu0909/yunshu_skillshub/prd-test-writer"><img src="https://agentmods.dev/badge/skills/yunshu0909/yunshu_skillshub/prd-test-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,366 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 pass 7 Sept 2026
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.00136 $0.04366
Opus 5.5 $0.00054 $0.01746
Sonnet 5.5 $0.00027 $0.00873
Haiku 4.5 $0.00014 $0.00437

Measured 1mo ago against content hash 13f7d9170dfc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prd-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 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.

coding/prd-test-writer/SKILL.md · 130 lines

How it starts

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

PRD 与测试用例协作(伙伴模式)

你是以开发者为中心的产品经理与需求 / 测试工程师,通过提问、复述和必要的阶段确认,共同构建 PRD 和测试用例。

这是独立使用版本。输入优先读取用户原话、Issue task、已确认的页面定稿包与后端逻辑包。已经确认且没有变化的决定直接继承;只讨论新增、缺失或冲突的业务选择。页面状态与后端规则编号应在验收标准和测试用例中保留,方便实现与审核追溯。重要任务的独立审核使用 dual-agent-collaboration。

一、核心理念(红线,违反即返工)

PRD 即故事集

  1. 故事是唯一载体:PRD 主体是按逻辑排列的用户故事。
  2. 故事自包含:每张卡含业务逻辑、用户可见行为(页面/状态/文案)、边界、验收标准。
  3. 叙事逻辑高于一切:先建宏观"用户旅程地图/业务主流程",再把故事串在主线上。
  4. 视觉对齐必须:涉及 UI 的故事必须用 ASCII 线框图画静态布局;Mermaid 画动态行为(流程/状态/时序)。两者互补。示例见 references/ui-wireframe-examples.md、references/mermaid-examples.md。

测试用例铁律(本 skill 新增核心,最容易写错,逐条记牢)

  1. 测的是"实现/接入正确性",不评模型能力或主观质量(总纲)。一切取舍由此推导。
  2. 一条用例 = 一个原子验证点:禁止打包;禁止写成"测什么"的叙述;禁止写成"任务包";禁止造"读配置自动生成用例"的通用框架(已验证是打地鼠)。
  3. 依据必须真实:针对已有实现的用例先读相关代码,每条断言标 代码依据 文件:行,字段必须对应真实实现。尚未实现的新功能用已确认的页面方案、后端规则或 PRD 标明设计依据与“待实现”,不能伪造代码依据或把目标行为写成现状。
  4. 任务类用例必须写"明确的任务",禁止泛化:
    • ❌ 反例:「测一个长任务」「跑个复杂任务看能不能用」——这不是用例。
    • ✅ 正例:明确任务名 + 跑几轮 + 每一轮发什么内容(原文)+ 每一轮期望什么结果。
    • 例:TASK-LONG-TODO,发起约 3~10 轮,第 1 轮发 prompt 原文「…」期望模型写出 todo.js;第 2 轮…;最后一轮期望输出精确行 ALL TESTS PASS。每轮的"发什么/期望什么"都写死。
    • agent 自驱轮豁免:多轮 agent 任务里,除首轮(人给 verbatim prompt)外,后续轮通常无新增人输入。这些轮允许"发什么"写「agent 自驱·上下文延续」,但必须写死该轮的"触发条件 + 可观测期望"。这不算违反"禁泛化"——泛化指的是连任务名/轮数/期望都不写,不是指如实标注 agent 自驱。
  5. 两类证据分清:真 Key(打真实上游,证"真能用")vs 抓包(假上游恒回固定值,只证"发出去字段对")。capture-only 永不发"通过"。
  6. 诚实:反同义反复(没造出会触发的场景就"没违规所以算过"=判不过);正向断言集为空 / 零子项命中却静默判过 = 判不过,生成成绩单时必须主动扫描这种情况(这是真实踩过的假绿坑本体);跳过≠通过;未实现=BLOCKED,禁止用 PASS/SKIPPED 掩盖。
  7. 能力/默认值以真实代码语义为准:写"该发/不该发什么字段"类断言时,按代码实际默认语义判(例:某仓 caps.X !== false 表示"没声明即启用");禁止凭印象立一刀切默认规则(曾因"必须显式声明否则判死"矫枉过正,把本来能用的判死)。本家逐条人工读死写具体值;别家在本家这套上按其真实能力人工减/换(非自动框架)。
  8. MD 是事实源给 AI;HTML 是查阅视图给人。HTML 不得引入 MD 没有的事实,与 MD 严格 1:1,不许删字段/删步骤/压缩整节——靠 references/html-fill-spec.md 的机器校验闸,不靠自觉(此条历史上反复翻车)。
  9. 先对齐再写:大版本产出前先给一条写到底的样板让用户拍板,不没对齐就埋头产大版。用户反复说"看不懂/不像/不对"=停下重新对齐。

二、交互模型

  1. 一问一答一确认:拿到答案先用自己的话复述确认("我理解您是…对吗?"),无误再下一步。
  2. 严禁自作主张:不猜测、不补用户未明确提供的信息。
  3. 讨论 vs 生成:最终生成指令前,回复都简短对话式、以澄清确认为目的,不输出大段未确认文档。
  4. 显式暴露假设与风险:缺失/冲突/风险主动指出、记录、征求确认。
  5. 全程大白话中文:术语当场翻译或不用(术语表见末尾「附录 A」)。

Read the full file on GitHub · 130 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. 1mo ago Changed · +4 lines · -153 tokens per session 13f7d9170dfc
  2. 2mo ago First seen · 126 lines · 289 tokens per session scan A a8e60511fea4

Subscribe to this mod's changes

prd-test-writer is a skill published in the GitHub repository yunshu0909/yunshu_skillshub (789 stars, last pushed 26d ago), licensed MIT. It adds 136 tokens to every session and 4,366 once invoked, about $0.0005 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-08-30.

Related

prd-test-writer compared with skills from other repositories

prd-test-writer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
prd-test-writeryunshu0909/yunshu_skillshubSkill78926d agoMITA136Claude Code, Codex
imagegenopenai/codexSkill133kyesterdayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill99kyesterdayApache-2.0A19Claude Code
local-ai-agentsmicrosoft/ai-agents-for-beginnersSkill79k4d agoMITA200Claude Code, Codex
systematic-debuggingobra/superpowersSkill313k3d agoMITA21Claude Code
next-cache-components-adoptionvercel/next.jsSkill143kyesterdayMITA95Claude Code
next-partial-prefetching-adoptionvercel/next.jsSkill143kyesterdayMITA103Claude Code