tdd
測試驅動開發,紅—綠—重構。當要以測試先行的方式建置功能或修 bug、當使用者提到 "TDD"、"red-green"、「紅綠」,或要求寫出能撐過重構的測試時使用。
Skill by Luca0x5755
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/luca0x5755-tdd
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/tdd
What's inside
- Skill name
tdd- Description
- 測試驅動開發,紅—綠—重構。當要以測試先行的方式建置功能或修 bug、當使用者提到 "TDD"、"red-green"、「紅綠」,或要求寫出能撐過重構的測試時使用。
- License
- MIT
- Instructions
- 55 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Test-Driven Development Red → green → repeat, one behaviour at a time. ## The loop 1. **Red** — write one failing test for the next behaviour. Run it. See it fail, and see it fail *for the reason you expect*. A test that passes before the code exists is testing nothing. 2. **Green** — the least code that passes it. Ugly is allowed here. 3. **Refactor** — clean up with the test holding the behaviour still. Optional; skip it when there is nothing to clean. Never write all the tests up front. Batching them produces tests of *imagined* behaviour: they pin the shape you guessed at, and go numb to the shape you actually built. Each cycle should be informed by what the previous one taught you. The first cycle is a **tracer bullet** — one test proving a single path works end to end, before building outward. ## What a good test is **Tested through the public interface.** Code should be able to change entirely without the tests moving. A test that breaks on a rename is a test of implementation. **Named as a specification.** `user can check out with a valid cart` — reading the test names should tell you what the system does. **Expected values from an independent source.** A known-good literal, a worked example, the spec. Never recomputed the way the code computes it — that test passes by construction and is **tautological**: it will pass just as happily when the code is wrong. **One behaviour per test.** A test asserting five things fails without telling you which one broke. ## Seams A **seam** is the boundary where behaviour is observable without reaching inside. Tests live at seams. Pick the seam before the first test. Too deep and every refactor breaks the suite; too shallow and failures stop being diagnostic. The right seam is usually the interface another part of the system already calls. The loop does not change at a module boundary. A test at the seam between two modules — real collaborators on both sides — is an integration test, written red-first like any other; the layer is a property of where the seam sits, not a different ritual. Which seams deserve tests is a project decision, not a per-test guess. Take the list from the project's `docs/test-blueprint.md` when one exists — it names the seams and the promise each serves. Otherwise the boundary `/implement` declared; failing both, the heuristic above. ## Mocking Default to **not** mocking. A test with four mocks is testing the mocks. Mock only what you do not own and cannot make fast or deterministic: third-party network calls, the clock, randomness, the filesystem when it is genuinely slow. Your own modules are not on that list — if they are hard to use in a test, that is a design finding, not a mocking problem. In-memory fakes beat mocks. A fake repository backed by a map exercises real logic; a mocked one asserts you called a method. ## Anti-patterns - **Testing internals** — private functions, internal state. Rename-fragile, refactor-hostile. - **Tautological tests** — expected value computed by the code under test. - **Assertion-free tests** — "it runs without throwing" is not a specification. - **Shared mutable fixtures** — order-dependent suites that pass alone and fail together. - **Coverage as the goal** — coverage measures which lines ran, not which behaviours are pinned. ## Bugs A bug fix starts with a test that reproduces it and goes red. Fix, watch it go green, keep the test. A fix without that test is a fix that comes back.
From Luca0x5755/luca-skills, MIT.
More from Luca0x5755/luca-skills
- 0.601score
frontend-spec
Luca0x5755
為有 UI 的規格定前端真相:路由表、四態頁面與 style tokens 寫進前端合訂本(docs/05_frontend_spec.md,章節標能力)、.pen mockup 常駐 docs/mockup/ — 都在 feature branch 上改,與程式碼同 PR 合併。/to-spec…
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
consolidate-docs
Luca0x5755
對專案內凌散的規格文件動一次 brownfield 手術:全量盤點→提案報告(目標樹、映射表、衝突表)→核准後按 capability 分批遷移成 docs/specs/ 真相層,原檔進 archive 不刪。日常維護走管線,不重跑這把刀。
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
code-review
Luca0x5755
沿三條軸審查自某個定點以來的 diff — Standards(有沒有遵守這個 repo 的規範?)、Spec(有沒有做到票要求的事?)與 Reuse(倉庫裡有沒有現成的?)。當使用者要審查一個分支、一個 PR 或進行中的工作時使用,也對應 "code review"、"review this…
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
setup-skills
Luca0x5755
為這個 repo 設定工程技能所需的組態 — 議題追蹤器、領域文件位置、git 護欄 hook,以及本機議題用的 CI 檢查。初始化跑一次;重跑可換追蹤器或補裝、更新護欄。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
diagnosing-bugs
Luca0x5755
對付硬 bug、間歇性失敗與效能回歸的紀律迴圈 — 重現、最小化、立假說、下探針、修好、補回歸測試。當東西壞了而原因不明顯時使用,也對應 "flaky"、"regression"、「時好時壞」、「找不到原因」等說法。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
domain-modeling
Luca0x5755
建立並磨利一個專案的領域語言 — 挑戰模糊術語、拆開超載的詞、把難以回頭的決策寫成 ADR。當討論程式庫術語、直接撰寫或編輯 GLOSSARY.md 或 ADR、命名含糊、或同一個詞在不同地方意思不同時使用。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
grilling
Luca0x5755
就一個計畫、決策或想法窮追不捨地拷問使用者。當使用者想壓力測試自己的思路、想被質疑一個設計,或說出 "grill"、「拷問我」、「戳破我」這類觸發語時使用。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
browser-evidence
Luca0x5755
把既定案例清單跑成可交付的證據 — 截圖或原始回應、網路紀錄與被測版本 manifest。瀏覽器是預設通道,無 UI 案例走 api/cli,卡人一步由操作者接手;落在 docs/uat/,走 evidence 分支 PR 合回基底分支。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
implement-spec
Luca0x5755
依規格與票的阻塞圖,在隔離工作樹平行建置整份規格並整合至單一分支;支援已設定的追蹤器,可由操作者介入,PR 視需要建立。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
prototype
Luca0x5755
做一個用完即丟的原型來回答一個設計問題 — 狀態與邏輯用可執行的程式,UI 則做幾個可切換的變體。當一個設計問題在紙上定不下來時使用,也對應 "prototype"、"spike"、「先做個雛形看看」等說法。
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
retro
Luca0x5755
檢討編碼 session,依嚴重性提出代理環境的改善候選:導航、機械檢查、審查規範、工具成本與資訊存取。
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
handoff
Luca0x5755
把當前對話壓縮成一份交接文件,讓全新的 session 能接手這份工作。
SkillAFreshness: A★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Aug 8, 2026 (2 months ago)
- Last release
- Oct 8, 2026 (21 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/Luca0x5755/luca-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from Luca0x5755
- 0.601score
code-review
Luca0x5755
沿三條軸審查自某個定點以來的 diff — Standards(有沒有遵守這個 repo 的規範?)、Spec(有沒有做到票要求的事?)與 Reuse(倉庫裡有沒有現成的?)。當使用者要審查一個分支、一個 PR 或進行中的工作時使用,也對應 "code review"、"review this…
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
frontend-spec
Luca0x5755
為有 UI 的規格定前端真相:路由表、四態頁面與 style tokens 寫進前端合訂本(docs/05_frontend_spec.md,章節標能力)、.pen mockup 常駐 docs/mockup/ — 都在 feature branch 上改,與程式碼同 PR 合併。/to-spec…
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
consolidate-docs
Luca0x5755
對專案內凌散的規格文件動一次 brownfield 手術:全量盤點→提案報告(目標樹、映射表、衝突表)→核准後按 capability 分批遷移成 docs/specs/ 真相層,原檔進 archive 不刪。日常維護走管線,不重跑這把刀。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
browser-evidence
Luca0x5755
把既定案例清單跑成可交付的證據 — 截圖或原始回應、網路紀錄與被測版本 manifest。瀏覽器是預設通道,無 UI 案例走 api/cli,卡人一步由操作者接手;落在 docs/uat/,走 evidence 分支 PR 合回基底分支。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
setup-skills
Luca0x5755
為這個 repo 設定工程技能所需的組態 — 議題追蹤器、領域文件位置、git 護欄 hook,以及本機議題用的 CI 檢查。初始化跑一次;重跑可換追蹤器或補裝、更新護欄。
SkillAFreshness: A★ 3Claude Code +9 - 0.598score
diagnosing-bugs
Luca0x5755
對付硬 bug、間歇性失敗與效能回歸的紀律迴圈 — 重現、最小化、立假說、下探針、修好、補回歸測試。當東西壞了而原因不明顯時使用,也對應 "flaky"、"regression"、「時好時壞」、「找不到原因」等說法。
SkillAFreshness: A★ 3Claude Code +9
Cite this page
tdd skill. Agent Mart. https://agentmart.dev/skills/luca0x5755-tdd (last updated 2026-10-24)