[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AJAEXKNNK38D7EAPQC1HTJ":3,"skill-same:01M7AJAEXKNNK38D7EAPQC1HTJ":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7AJAEXKNNK38D7EAPQC1HTJ","tdd",null,"测试驱动开发。适用于用户想用先写测试的方式构建功能或修复缺陷、提到 “red-green-refactor”，或需要集成测试时。","limbo947\u002Fdsh-recall-plugin","limbo947","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F267408385?v=4","01M7AJ97PM2MZC4BZ3VEFK5KPZ","01M7AJ97QB6S04S49C2M9X80SX",55,"MIT","https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftdd\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tdd\ndescription: 测试驱动开发。适用于用户想用先写测试的方式构建功能或修复缺陷、提到 “red-green-refactor”，或需要集成测试时。\n---\n\n# 测试驱动开发\n\nTDD 是 red -> green loop。这个 skill 是让该 loop 产出值得保留的 tests 的 reference：什么是好 test、tests 应该放在哪里、anti-patterns，以及 loop 的规则。每个 cycle 前和 cycle 中都要参考这些内容，而不是事后才看。\n\n探索 codebase 时，读取 `GLOSSARY.md`（如果存在），让 test names 和 interface vocabulary 与项目 domain language 对齐，并尊重你触碰区域的 ADRs。\n\n## 什么是好 test\n\nTests 应通过 public interfaces 验证 behavior，而不是 implementation details。代码可以完全改变；tests 不该随之改变。一个好 test 读起来像 specification：\"user can checkout with valid cart\" 能清楚说明存在什么能力；因为它不关心 internal structure，所以能承受 refactors。\n\n示例见 [tests.md](tests.md)，mocking 规则见 [mocking.md](mocking.md)。\n\n## Seams：tests 放在哪里\n\n**Seam** 是你测试的 public boundary：可以观察 behavior、但不伸手进入内部的 interface。Tests 放在 seams 上，绝不针对 internals。\n\n**只测试预先认可的 seams。** 写任何 test 前，先写下要测试的 seams 并与用户确认。未经确认的 seam 不写 test。你无法测试所有东西；提前认可 seams，才能把测试精力放在 critical paths 和复杂 logic 上，而不是每个 edge case。\n\n询问：\"What's the public interface, and which seams should we test?\"\n\n当 interface 的形状本身就是问题所在时（module 该多深、seam 该放在哪里、interface 应该暴露什么），调用 Skill 工具并指定 `codebase-design` 获取词汇。它是 module、interface、depth、seam、adapter、leverage 和 locality 这些术语的共享来源，是供查阅的 reference，而不是要运行的 session。\n\n## 反模式\n\n- **Implementation-coupled**：mock internal collaborators、测试 private methods，或通过 side channel 验证（例如不用 interface 而直接查询 database）。特征是 refactor 时 test 失败，但 behavior 没变。\n- **Tautological**：assertion 以和代码相同的方式重新计算 expected value（`expect(add(a, b)).toBe(a + b)`、手工按同一逻辑生成 snapshot、把 constant 断言等于它自己），因此天然 pass，永远无法与代码 disagree。Expected values 必须来自独立 source of truth：known-good literal、worked example 或 spec。\n- **Horizontal slicing**：先写所有 tests，再写所有 implementation。批量 tests 验证的是 _想象中的_ behavior：你测试的是东西的 _shape_，不是 user-facing behavior；tests 会对真实变化迟钝，并在理解 implementation 前承诺 test structure。改用 **vertical slices**：一个 test -> 一个 implementation -> repeat，每个 test 都是回应上一轮学习的 **tracer bullet**。\n\n## Loop 的规则\n\n- **Red before green.** 先写 failing test，再只写足够让它通过的代码。不要预判未来 tests，也不要添加 speculative features。\n- **One slice at a time.** 每个 cycle 只处理一个 seam、一个 test、一个 minimal implementation。\n- **Refactoring is not part of the loop.** Refactoring 属于 review stage（见 `code-review` skill），不属于 red -> green implementation cycle。\n","# 测试驱动开发\n\nTDD 是 red -> green loop。这个 skill 是让该 loop 产出值得保留的 tests 的 reference：什么是好 test、tests 应该放在哪里、anti-patterns，以及 loop 的规则。每个 cycle 前和 cycle 中都要参考这些内容，而不是事后才看。\n\n探索 codebase 时，读取 `GLOSSARY.md`（如果存在），让 test names 和 interface vocabulary 与项目 domain language 对齐，并尊重你触碰区域的 ADRs。\n\n## 什么是好 test\n\nTests 应通过 public interfaces 验证 behavior，而不是 implementation details。代码可以完全改变；tests 不该随之改变。一个好 test 读起来像 specification：\"user can checkout with valid cart\" 能清楚说明存在什么能力；因为它不关心 internal structure，所以能承受 refactors。\n\n示例见 [tests.md](tests.md)，mocking 规则见 [mocking.md](mocking.md)。\n\n## Seams：tests 放在哪里\n\n**Seam** 是你测试的 public boundary：可以观察 behavior、但不伸手进入内部的 interface。Tests 放在 seams 上，绝不针对 internals。\n\n**只测试预先认可的 seams。** 写任何 test 前，先写下要测试的 seams 并与用户确认。未经确认的 seam 不写 test。你无法测试所有东西；提前认可 seams，才能把测试精力放在 critical paths 和复杂 logic 上，而不是每个 edge case。\n\n询问：\"What's the public interface, and which seams should we test?\"\n\n当 interface 的形状本身就是问题所在时（module 该多深、seam 该放在哪里、interface 应该暴露什么），调用 Skill 工具并指定 `codebase-design` 获取词汇。它是 module、interface、depth、seam、adapter、leverage 和 locality 这些术语的共享来源，是供查阅的 reference，而不是要运行的 session。\n\n## 反模式\n\n- **Implementation-coupled**：mock internal collaborators、测试 private methods，或通过 side channel 验证（例如不用 interface 而直接查询 database）。特征是 refactor 时 test 失败，但 behavior 没变。\n- **Tautological**：assertion 以和代码相同的方式重新计算 expected value（`expect(add(a, b)).toBe(a + b)`、手工按同一逻辑生成 snapshot、把 constant 断言等于它自己），因此天然 pass，永远无法与代码 disagree。Expected values 必须来自独立 source of truth：known-good literal、worked example 或 spec。\n- **Horizontal slicing**：先写所有 tests，再写所有 implementation。批量 tests 验证的是 _想象中的_ behavior：你测试的是东西的 _shape_，不是 user-facing behavior；tests 会对真实变化迟钝，并在理解 implementation 前承诺 test structure。改用 **vertical slices**：一个 test -> 一个 implementation -> repeat，每个 test 都是回应上一轮学习的 **tracer bullet**。\n\n## Loop 的规则\n\n- **Red before green.** 先写 failing test，再只写足够让它通过的代码。不要预判未来 tests，也不要添加 speculative features。\n- **One slice at a time.** 每个 cycle 只处理一个 seam、一个 test、一个 minimal implementation。\n- **Refactoring is not part of the loop.** Refactoring 属于 review stage（见 `code-review` skill），不属于 red -> green implementation cycle。\n",{"name":5,"description":7},"main","df80442fbb1b598026c75b6b699f7d0ecdc2ced7",".agents\u002Fskills\u002Ftdd",7,"https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin","https:\u002F\u002Fgithub.com\u002Flimbo947","2026-11-06 01:16:56",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add limbo947\u002Fdsh-recall-plugin --skill tdd",{"tool":36,"command":37},"bunx","bunx skills add limbo947\u002Fdsh-recall-plugin --skill tdd",{"tool":39,"command":40},"pnpm","pnpm dlx skills add limbo947\u002Fdsh-recall-plugin --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftdd\u002FSKILL.md",true,[44,50,54],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"agents\u002Fopenai.yaml","REFERENCE","参考文档",91,"https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftdd\u002Fagents\u002Fopenai.yaml",{"path":51,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":52,"sourceHtmlUrl":53},"mocking.md",1519,"https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftdd\u002Fmocking.md",{"path":55,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":56,"sourceHtmlUrl":57},"tests.md",2212,"https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftdd\u002Ftests.md",[59,66,73,80,87,94],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7AJAH5ZM0CATVKNJESYF19S","trim-cot-leakage","审计或修复「读起来像泄漏推理转录」的散文时使用——死设计会话引用（(decision 7)、审计项代码、未提交草稿的 §N）、变更叙述（「以前」「不再」「本版」）、栈\u002F审阅视角（「本栈的后一个 PR」「评审中被拒」）、对审查者说理的辩护、控制流叙述与注释、JSDoc、文档、计划记录里的规划残留；用户说「清理 CoT 泄漏」「审计文档措辞」时适用。","https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrim-cot-leakage\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7AJACGA7J9R71JESX32HDPD","speed-up-perf","调查或优化本插件性能时使用——每条用户消息的快照开销（win32 上 spawn pwsh\u002Fgit 尤其贵）、串行队列吞吐、启动预热、gc 节拍、大工作区 diff\u002Frollback、client 快照树渲染；用户说「让它更快」「这里好慢」时适用，把抱怨变成可复现的测量与小步、保行为的修复。","https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fspeed-up-perf\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7AJAA4C6HMC3GN35HSFX389","research","对照高可信一手来源调研问题，并把发现保存为仓库中的 Markdown 文件。适用于用户想调研主题、收集文档或 API 事实，或把阅读工作委托给后台代理时。","https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fresearch\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7AJA6WDD84YJKY4NN8CVXKE","prose-standard","撰写、审查、精简或审计本仓库的文字时使用——Markdown 文档与 README、注释与 JSDoc、配置说明、诊断文案、client UI 字符串；用户说「润色文档」「审查 README」「这段文案行不行」时适用。拥有文档结构、行文规则与文档质量判据。","https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprose-standard\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M7AJA3WBPXAE84EZE01JRF8W","pre-push-checks","git push、打 tag、发 npm 包或声称「检查通过」之前使用——按外发 diff 的改动面选最小检查集而非条件反射跑全量；test:probe 与 verify:host 不进 CI，发布前必须在本地跑过。","https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fpre-push-checks\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M7AJA2ARPXRB4FE6NJH8M4TN","grilling","围绕计划、decision 或 idea 持续追问用户。适用于用户想对自己的思路做压力测试，或使用任何 “grill” 触发措辞时。","https:\u002F\u002Fgithub.com\u002Flimbo947\u002Fdsh-recall-plugin\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fgrilling\u002FSKILL.md",[],[]]