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.
mdr add shumingyang-opencode/mattpocock-skills-zh-tw/tdd@git:20261007.5695450Pins 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
mdr add shumingyang-opencode/mattpocock-skills-zh-tw/tdd@sha256:6252691124bfaaeaThe 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.
[](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.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261007.5695450 latest | 2026-10-07 | 5695450 | 3,304 B | A | view · diff |
| git:20260806.5bfe60b | 2026-08-06 | 5bfe60b | 3,303 B | A | view · diff |
| git:20260805.8a475c4 | 2026-08-05 | 8a475c4 | 3,568 B | A | view · diff |
| git:20260703.bd453a6 | 2026-07-03 | bd453a6 | 3,213 B | A | view · diff |
| git:20260630.80e9dcc | 2026-06-30 | 80e9dcc | 3,208 B | A | view · diff |
| git:20260630.e81f976 | 2026-06-30 | e81f976 | 3,317 B | A | view |
Audit of the latest version
- 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
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
Every file in shumingyang-opencode/mattpocock-skills-zh-tw