Test Case Writer logo

Test Case Writer

Community
skinnerlee1225
test-case-writer

測試案例產生器 — 把 PRD 的驗收標準(Acceptance Criteria)與規則,轉成 QA 可直接執行的 測試案例:正常路徑、邊界值、異常路徑、併發/冪等、權限與安全。 當使用者說「幫我寫測試案例」、「這份 PRD 的 test case」、「QA 測試計畫」、「幫我補測試」、 「這功能怎麼測」、「寫測試」、「test cases」、「test plan」、「QA checklist」時, 一定要使用這個 skill。即使使用者只是丟一份 PRD、一段 AC、一個功能描述說 「幫我想想怎麼驗收」、「工程做完了要測什麼」,也應觸發此 skill。 這個 skill 輸入 PRD / AC,輸出結構化測試案例;不寫 PRD、不寫程式碼,只負責「怎麼驗證」。 接力關係:enterprise-prd-writer / prd-writer 產出 AC → 本 skill 把 AC 展開成測試案例 → QA 據以執行。PRD 的每條 Given/When/Then 是輸入,測試案例是輸出。

Overview

Publisherskinnerlee1225
Repositoryenterprise-prd-toolkit
Skill nametest-case-writer
Stars
45
Forks
4
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by skinnerlee1225 on GitHub. Read the source before you install it.

Installation

Install the Test Case Writer AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/skinnerlee1225/enterprise-prd-toolkit/tree/main/skills/test-case-writer
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/skinnerlee1225/enterprise-prd-toolkit.git /tmp/enterprise-prd-toolkit
mkdir -p .claude/skills
cp -r /tmp/enterprise-prd-toolkit/skills/test-case-writer .claude/skills/test-case-writer
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Test Case Writer in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Test Case Writer on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Test Case Writer is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

測試案例產生器(Test Case Writer)

在流程的位置

prd-writer / enterprise-prd-writer  ──→  AC(Given/When/Then + Edge Case)
                                              ↓
                                    【test-case-writer】← 展開成可執行測試案例
                                              ↓
                                          QA 執行 / 自動化

分工界線:

Skill負責不負責
enterprise-prd-writer定義需求與 AC不展開逐條測試步驟
test-case-writer把 AC 展開成可執行測試案例不改需求、不寫測試程式碼

如果輸入的 PRD 沒有 AC,先提醒使用者「這份缺 AC,測試案例會不完整」, 再就現有資訊盡量產出,並標出哪些是因缺 AC 而假設的。


核心原則

1. 每條 AC 至少展開成一組正常 + 邊界 + 異常

一條 Given/When/Then 不等於一個測試案例。它至少要拆成:

  • 正常路徑(Happy Path):條件成立,預期結果發生
  • 邊界值(Boundary):剛好在門檻上、門檻 ±1、最小/最大值
  • 異常路徑(Negative):條件不成立、輸入非法、前置失敗

PRD 的 AC 若已附 Edge Case,每個 Edge Case 至少對應一個測試案例。

2. 每個測試案例都可獨立執行、可判定通過與否

一個合格的測試案例,QA 拿到不必再問任何人就能跑。所以每條必須有:

  • 前置條件(Precondition):具體到可以建立的資料狀態
  • 測試步驟(Steps):一步一動作
  • 預期結果(Expected):明確、可觀察、可判定 pass/fail

禁止「驗證功能正常」這種無法判定的預期結果。

3. 用 PRD 的具體數值,不要自己發明

AC 的 Given 有數值(如「起點權益 10,000、上限 5%」),測試案例就用那些數值, 並補上邊界值(=門檻、門檻 ±1)。PRD 沒給的數值標 TBD,不要憑空填。

4. 覆蓋這幾類,缺一要說明

正常、邊界、異常之外,金融/後台類需求還要覆蓋:

  • 併發 / 冪等:同請求送兩次、兩人搶同資源
  • 權限:不同角色、未授權存取
  • 安全:越權、繞過前置檢查
  • 狀態機:非法狀態轉換、同時觸發多規則的優先級

某類不適用要寫「本功能無此類(因為…)」,不要默默略過。


執行流程

Step 0:讀 PRD,盤點 AC 與規則

讀完輸入的 PRD / AC,列出所有 R-xx 規則與 AC-xx。若沒有編號,自己編。 確認每條 AC 的 Given 有沒有具體數值——沒有的先標記,測試案例會受影響。

Step 1:為每條 AC 展開測試案例

依「正常 → 邊界 → 異常」逐條展開。每個測試案例給一個 ID(TC-<AC>-<序號>)。

Step 2:補跨 AC 的整合與非功能測試

  • 整合流程:跨多條規則的完整 user flow 走一遍
  • 併發/冪等/權限/安全:依核心原則 4 補上

Step 3:標優先級與類型

  • 優先級:P0(阻斷發布)/ P1(重要)/ P2(次要)
  • 類型:正常 / 邊界 / 異常 / 併發 / 權限 / 安全 / 整合

Step 4:輸出(見下方格式)+ 覆蓋率自檢


輸出格式

測試案例表(每個功能區塊一張)

### 提現 — 新地址鎖定(對應 AC-01 / R-03)

| TC ID | 類型 | 前置條件 | 步驟 | 預期結果 | Pri |
|---|---|---|---|---|---|
| TC-01-1 | 正常 | 用戶 10:00 新增地址 X | 20:00 對 X 發起提現 | 拒絕,提示隔日 10:00 解鎖;記錄稽核 | P0 |
| TC-01-2 | 邊界 | 地址 X 新增剛滿 24h | 對 X 發起提現 | 放行 | P0 |
| TC-01-3 | 邊界 | 地址 X 新增差 1 分鐘滿 24h | 對 X 發起提現 | 拒絕 | P0 |
| TC-01-4 | 異常 | 刪除 X 後再重新加入 | 對 X 發起提現 | 依 Open Q 定義(標 TBD) | P1 |

欄位規範:

  • 前置條件:具體到 QA 能照著建資料
  • 步驟:一步一動作,用祈使句
  • 預期結果:可觀察、可判定 pass/fail
  • 類型 / Pri:見上方定義

覆蓋率摘要(表格之後)

## 測試覆蓋率摘要

| 規則 / AC | 正常 | 邊界 | 異常 | 併發 | 權限 | 備註 |
|---|---|---|---|---|---|---|
| R-03 新地址鎖定 | ✅ | ✅ | ✅ | N/A | N/A | 冪等不適用 |

未覆蓋 / 待補:
- [因缺 AC 而無法展開的項目]
- [標 TBD 的數值,待 PRD 定案後補測試]

缺口提示(必要)

明確列出:① PRD 缺 AC 的功能 ② Given 沒有具體數值的 AC ③ 標 Open Question 尚未定案、因而測試案例只能標 TBD 的項目。


語言與格式偏好

  • 一律繁體中文,專有名詞保留英文
  • 表格優先;老花友善:段落短、重點粗體
  • P0 用粗體標示

輸出載體

  • 預設輸出在對話中(QA 拿去即用的工作稿)
  • 測試案例超過 30 條,或使用者要求「整理成文件 / 看板」時, 改用 interactive-html-report 輸出成可篩選(依類型/優先級/狀態)、可勾選追蹤的互動報告

Frequently asked questions

What does the Test Case Writer AI skill do?

測試案例產生器 — 把 PRD 的驗收標準(Acceptance Criteria)與規則,轉成 QA 可直接執行的 測試案例:正常路徑、邊界值、異常路徑、併發/冪等、權限與安全。 當使用者說「幫我寫測試案例」、「這份 PRD 的 test case」、「QA 測試計畫」、「幫我補測試」、 「這功能怎麼測」、「寫測試」、「test cases」、「test plan」、「QA checklist」時, 一定要使用這個 skill。即使使用者只是丟一份 PRD、一段 AC、一個功能描述說 「幫我想想怎麼驗收」、「工程做完了要測什麼」,也應觸發此 skill。 這個 skill 輸入 PRD / AC,輸出結構化測試案例;不寫 PRD、不寫程式碼,只負責「怎麼驗證」。 接力關係:enterprise-prd-writer / prd-writer 產出 AC → 本 skill 把 AC 展開成測試案例 → QA 據以執行。PRD 的每條 Given/When/Then 是輸入,測試案例是輸出。

Why use Test Case Writer on TypingMind?

Because you install it once and use it with any model. Test Case Writer is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Test Case Writer in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/skinnerlee1225/enterprise-prd-toolkit/tree/main/skills/test-case-writer. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Test Case Writer?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Test Case Writer?

As many as you like. As long as a model supports skills, you can use Test Case Writer with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Test Case Writer AI skill free?

Yes. It is published on GitHub by skinnerlee1225 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇