tdd SKILL.md skillA

tdd from shumingyang-opencode/mattpocock-skills-zh-tw is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add shumingyang-opencode/mattpocock-skills-zh-tw/tdd@git:20261007.5695450

Pins git:20261007.5695450 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 17 of 17 checks passed
Kind
SKILL.md skill
Repository
shumingyang-opencode/mattpocock-skills-zh-tw
Path
skills/engineering/tdd/SKILL.md
Versions recorded
6
Latest version
git:20261007.5695450, committed Oct 7, 2026
First version recorded
Jun 30, 2026
Size
3,304 bytes
Repository stars
3
License
MIT

測試驅動開發。當使用者想以測試優先的方式建立功能或修 bug、提到「red-green-refactor」、或想要整合測試時使用。.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# 測試驅動開發

TDD 就是紅 → 綠的迴圈。本技能是讓這個迴圈產出值得保留之測試的參考文件:什麼是好測試、測試放哪裡、反模式,以及迴圈的規則。每個章節在每個循環都適用——在迴圈之前和之中查閱它們,而不是事後。

探索程式碼時,先讀 `GLOSSARY.md`(如果存在),讓測試名稱和介面詞彙符合專案的領域語言,並尊重你要觸及區域中的 ADR。

## 什麼是好測試

測試透過公開介面驗證行為,而不是實作細節。程式碼可以完全改變;測試不應該。好測試讀起來像規格說明——「使用者可以用有效的購物車結帳」確切告訴你存在什麼能力——而且能安然度過重構,因為它不在乎內部結構。

範例見 [tests.md](tests.md),模擬指引見 [mocking.md](mocking.md)。

## 接縫——測試放哪裡

**接縫**是你測試所處的公開邊界:你在那裡觀察行為而不伸進內部。測試放在接縫,絕不對著內部。

**只在事前約定的接縫上測試。** 寫任何測試之前,先寫下將被測試的接縫並與使用者確認。不會在未確認的接縫上寫測試。你不可能測試一切——事先約定接縫,就是讓測試心力落在關鍵路徑與複雜邏輯上,而不是每個邊緣案例。

問:「公開介面是什麼,我們該測試哪些接縫?」

當那個介面的形狀本身有疑問時——模組要多深、接縫該放哪裡、介面該暴露什麼——用 `/codebase-design` 技能取得詞彙。它是模組、介面、深度、接縫、轉接器、槓桿收益與局部性這些術語的共同來源,而且是要查閱的參考文件,不是要執行的會話。

## 反模式

- **耦合實作細節**——模擬內部協作者、測試私有方法,或透過側通道驗證(查資料庫而不是用介面)。特徵:重構時測試壞掉,但行為沒有改變。
- **同義反覆**——斷言用跟程式碼相同的方式重新計算期望值(`expect(add(a, b)).toBe(a + b)`、用手以同樣方式導出的快照、跟自己比較的常數),所以它依構造而通過、永遠不會與程式碼意見不合。期望值必須來自獨立的真實來源——已知良好的常數、實際算過的範例、規格。
- **水平切片**——先寫全部測試,再寫全部實作。大量測試驗證的是_想像中_的行為:你測試的是東西的_形狀_而不是使用者可見的行為,測試對真實變動變得不敏感,而且你在理解實作之前就承諾了測試結構。改用**垂直切片**——一個測試 → 一個實作 → 重複,每個測試都是一顆回應上一循環所學的**曳光彈**。

## 迴圈的規則

- **先紅後綠。** 先寫失敗測試,然後只寫足以讓它通過的程式碼。不要預期未來的測試或加投機性的功能。
- **一次一個切片。** 每個循環一個接縫、一個測試、一個最小實作。
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add shumingyang-opencode/mattpocock-skills-zh-tw/tdd@sha256:6252691124bfaaea

The line at the top of this page pins the label git:20261007.5695450, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_gcund6b5utf5rwjh.svg)](https://markdownregistry.com/a/art_gcund6b5utf5rwjh)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 6 versions of this file, between Jun 30, 2026 and Oct 7, 2026, about one every 20 days.

versioncommittedcommitsizeaudit
git:20261007.5695450 latest2026-10-07 5695450 3,304 BA view · diff
git:20260806.5bfe60b2026-08-06 5bfe60b 3,303 BA view · diff
git:20260805.8a475c42026-08-05 8a475c4 3,568 BA view · diff
git:20260703.bd453a62026-07-03 bd453a6 3,213 BA view · diff
git:20260630.80e9dcc2026-06-30 80e9dcc 3,208 BA view · diff
git:20260630.e81f9762026-06-30 e81f976 3,317 BA view

Audit of the latest version

A  17 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (3304 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

shumingyang-opencode/mattpocock-skills-zh-tw · 3 stars · license MIT · pushed 2026-10-07 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_gcund6b5utf5rwjh
GET https://markdownregistry.com/api/v1/resolve?ref=shumingyang-opencode/mattpocock-skills-zh-tw/tdd
GET https://markdownregistry.com/api/v1/blob/6252691124bfaaea699fc75d1d74821d4784828c62ff0a6ab85c34fe0959c33a

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from shumingyang-opencode/mattpocock-skills-zh-tw

AGENTS.md AGENTS.md file
shumingyang-opencode/mattpocock-skills-zh-tw · AGENTS.md
git:20260713.697d4ce · audit B · 3 stars
CLAUDE.md CLAUDE.md file
shumingyang-opencode/mattpocock-skills-zh-tw · CLAUDE.md
git:20260806.5bfe60b · audit A · 3 stars
ask-matt SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/ask-matt/SKILL.md · 詢問哪個技能或流程最符合你的情況。這個 repo 中技能的路由器。
git:20261007.5695450 · audit A · 3 stars
code-review SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/code-review/SKILL.md · 沿兩軸審查自某個固定點(commit、分支、標籤或合併基點)以來的變更——規範(軸)(程式碼是否符合此 repo 記錄的編碼規範?)與規格(軸)(程式碼是否符合原始…
git:20260806.5bfe60b · audit A · 3 stars
codebase-design SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/codebase-design/SKILL.md · 設計深模組的共用詞彙。當使用者想設計或改進模組的介面、找深化的機會、決定接縫放哪裡、讓程式碼更容易測試或對 AI 更容易導覽,或另一個技能需要深模組詞彙時使用。
git:20260806.5bfe60b · audit A · 3 stars
diagnosing-bugs SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/diagnosing-bugs/SKILL.md · 硬 bug 與效能回歸的診斷迴圈。當使用者說「diagnose」/「debug this」,或回報東西壞了/拋錯/失敗/很慢時使用。
git:20261007.5695450 · audit A · 3 stars
domain-modeling SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/domain-modeling/SKILL.md · 建立並磨利專案的領域模型。當使用者想釐清領域術語或通用語言、記錄架構決策,或另一個技能需要維護領域模型時使用。
git:20261007.5695450 · audit A · 3 stars
grill-with-docs SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/grill-with-docs/SKILL.md · 鍥而不捨的訪談,磨利計畫或設計,過程中同時建立文件(ADR 與詞彙表)。
git:20260806.5bfe60b · audit A · 3 stars
implement SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/implement/SKILL.md · 依規格說明或一組 tickets 實作一份工作。
git:20260806.5bfe60b · audit A · 3 stars
improve-codebase-architecture SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/improve-codebase-architecture/SKILL.md · 掃描程式碼庫找出深化機會,以視覺 HTML 報告呈現,然後對你挑選的那個進行 grilling。
git:20261007.5695450 · audit A · 3 stars
prototype SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/prototype/SKILL.md · 建立一次性原型來回答設計問題。當使用者想確認某個狀態模型或邏輯是否合理,或想探索 UI 應該長什麼樣子時使用。
git:20260806.5bfe60b · audit A · 3 stars
research SKILL.md skill
shumingyang-opencode/mattpocock-skills-zh-tw · skills/engineering/research/SKILL.md · 針對高可信度的主要來源調查問題,並把發現寫成 repo 中的 Markdown 檔案。當使用者想要研究某主題、蒐集文件或 API 事實,或想把閱讀的苦差事委派給背景代理時使用。
git:20260806.5bfe60b · audit A · 3 stars

Every file in shumingyang-opencode/mattpocock-skills-zh-tw

Other files named tdd

tdd SKILL.md skill
yeachan-heo/oh-my-claudecode · skills/tdd/SKILL.md · Test-first at pre-agreed seams — one test, one implementation, tracer-bullet red/green; independent expected values…
git:20261009.7b270a4 · audit A · 40,148 stars
tdd SKILL.md skill
cursor/plugins · pstack/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
git:20260923.b0b9c7a · audit A · 13,494 stars
tdd SKILL.md skill
cursor/plugins · harness/pstack/claude-code/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
git:20261016.182f2ce · audit A · 13,494 stars
tdd SKILL.md skill
vinvcn/mattpocock-skills-zh-cn · skills/engineering/tdd/SKILL.md · 测试驱动开发。适用于用户想用先写测试的方式构建功能或修复缺陷、提到 “red-green-refactor”,或需要集成测试时。
git:20261008.5be0dc1 · audit A · 5,110 stars
tdd SKILL.md skill
wesammustafa/claude-code-everything-you-need-to-know · examples/intermediate/01-first-skill/dot-claude/skills/tdd/SKILL.md · TODO
git:20261006.11cadf7 · audit A · 3,462 stars
tdd SKILL.md skill
michael-denyer/pstack-claude · plugins/pstack/skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
git:20260923.4a3ef20 · audit A · 3,263 stars
tdd SKILL.md skill
rohitg00/pro-workflow · skills/tdd/SKILL.md · Drive a change through a red-green-refactor loop - failing test first, minimal code to pass, then clean up. Use when…
git:20260718.7f7209d · audit A · 2,922 stars
tdd SKILL.md skill
backnotprop/pstack · skills/tdd/SKILL.md · Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious…
git:20261004.c0c3f13 · audit A · 2,481 stars

Browse by kind, by grade A, or by owner.