[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MG2BRHK1RN7KMDNF2S5QH3":3,"skill-same:01M6MG2BRHK1RN7KMDNF2S5QH3":47},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"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":28,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M6MG2BRHK1RN7KMDNF2S5QH3","tdd",null,"hashgraph-online\u002Fawesome-codex-plugins","hashgraph-online","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160371962?v=4","01M6CNB6NRJVNNGN14TR01Q6D3","HOL (Hashgraph Online)","01M6JT1HSKKG9V68KQAQGBA7XP",1575,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FechoVic\u002Fboss-skill\u002Fskill\u002Fskills\u002Fshared\u002Ftdd\u002FSKILL.md",[],[5],"2026-11-10 10:12:30",false,"---\n\nname: shared\u002Ftdd\ndescription: 测试驱动开发（TDD）方法论，Red-Green-Refactor 循环，先写失败测试再写实现\nversion: 1.0.0\nagent: shared\ntype: methodology\nuser-invocable: false\nagent-invocable: true\ndependencies: []\ntriggers:\n- 实现新功能前\n- 修复 bug 前\n- 重构代码前\n- 任何行为变更前\n  metadata:\n  internal: true\n\n---\n\n# 测试驱动开发（TDD）\n\n## 核心铁律\n\n```\n没有失败的测试，就不写生产代码。\n```\n\n如果先写了实现代码，**必须删除**，从测试重新开始。不保留\"参考\"，不\"边写测试边改\"。\n\n## 适用场景\n\n**必须使用 TDD**：\n- 新功能实现\n- Bug 修复\n- 代码重构\n- 任何行为变更\n\n**例外（需用户明确同意）**：\n- 一次性原型代码\n- 纯配置文件\n- 自动生成的代码\n\n## Red-Green-Refactor 循环\n\n### ? RED — 写失败测试\n\n为**一个行为**写最小测试：\n- 一个测试只测一件事（名称里有 \"and\" 就拆开）\n- 名称描述行为，而非实现（`rejects empty email` 而非 `test1`）\n- 用真实代码，除非依赖外部服务才 mock\n- 展示你期望的 API 长什么样\n\n```typescript\n\u002F\u002F ✅ 好：测试真实行为\ntest('rejects empty email', () => {\n  expect(validateEmail('')).toBe(false);\n});\n\n\u002F\u002F ❌ 坏：测试 mock 而非代码\ntest('email works', () => {\n  const mock = jest.fn();\n  mock('');\n  expect(mock).toHaveBeenCalled();\n});\n```\n\n### 验证 RED — 必须看到它失败\n\n**这一步不可跳过。** 运行测试，确认：\n\n```bash\n# 前端\nnpx jest path\u002Fto\u002Ftest.test.ts\n# 后端\nnpm test -- path\u002Fto\u002Ftest.test.ts\n```\n\n确认三件事：\n1. 测试**失败**（不是通过）\n2. 失败原因是**功能缺失**（不是拼写错误、导入错误）\n3. 失败信息符合预期\n\n**如果测试直接通过** → 你在测已有行为，测试写错了，修正它。\n**如果测试报错（error）** → 修复错误（如导入路径），重跑直到它正确失败。\n\n### ? GREEN — 写最小实现\n\n写**刚好让测试通过**的最少代码：\n- 不添加测试未要求的功能\n- 不重构、不\"顺便优化\"\n- 不提前抽象\n\n```typescript\n\u002F\u002F ✅ 好：刚好通过\nfunction validateEmail(email: string): boolean {\n  return email.trim().length > 0;\n}\n\n\u002F\u002F ❌ 坏：过度工程\nfunction validateEmail(\n  email: string,\n  options?: { allowPlus?: boolean; domainWhitelist?: string[] },\n): boolean {\n  \u002F\u002F YAGNI\n}\n```\n\n### 验证 GREEN — 必须看到它通过\n\n运行测试，确认：\n1. 新测试通过\n2. **所有已有测试仍然通过**\n3. 输出干净（无报错、无意外警告）\n\n**如果新测试失败** → 修代码，不修测试。\n**如果其他测试失败** → 立即修复。\n\n### ? REFACTOR — 重构（仅在 GREEN 之后）\n\n测试全绿后才允许重构：\n- 消除重复\n- 改善命名\n- 提取辅助函数\n- **不新增行为**\n\n重构后必须重新跑全部测试，保持全绿。\n\n### 循环\n\n下一个行为 → 回到 RED。\n\n## Bug 修复 TDD\n\n修复 bug 时，先写一个**复现 bug 的失败测试**：\n\n```\n1. 写测试复现 bug → 确认失败（RED）\n2. 修复代码 → 确认通过（GREEN）\n3. 这个测试就是回归保护\n```\n\n**禁止**在没有复现测试的情况下修复 bug。\n\n## 验证清单\n\n标记任务完成前，逐项确认：\n- [ ] 每个新增函数\u002F方法都有对应测试\n- [ ] 每个测试都先看到它失败（RED 已验证）\n- [ ] 失败原因是功能缺失，而非拼写\u002F导入错误\n- [ ] 实现代码是让测试通过的最小集\n- [ ] 全部测试通过\n- [ ] 测试用真实代码（仅在不可避免时 mock）\n- [ ] 边界条件和错误路径已覆盖\n\n**任何一项打不了勾 → 你跳过了 TDD，回到 RED 重新开始。**\n\n## 常见借口与回应\n\n| 借口                     | 回应                                 |\n| ------------------------ | ------------------------------------ |\n| \"太简单了不用测\"         | 简单代码也会坏，测试只要 30 秒       |\n| \"我之后补测试\"           | 事后写的测试一跑就过，证明不了任何事 |\n| \"我手动测过了\"           | 手动测试无记录、不可复跑、容易漏     |\n| \"已经写了代码，删了浪费\" | 沉没成本。保留未验证的代码才是技术债 |\n| \"TDD 太慢\"               | TDD 比事后调试快，省的是未来的时间   |\n| \"这个不一样因为...\"      | 没有例外。删代码，从测试开始。       |\n\n## 卡住时\n\n| 问题          | 解法                            |\n| ------------- | ------------------------------- |\n| 不知道怎么测  | 先写你期望的 API 调用，再写断言 |\n| 测试太复杂    | 说明设计太复杂，简化接口        |\n| 什么都要 mock | 代码耦合太高，用依赖注入解耦    |\n| 测试设置庞大  | 提取辅助函数；仍复杂就简化设计  |\n","# 测试驱动开发（TDD）\n\n## 核心铁律\n\n```\n没有失败的测试，就不写生产代码。\n```\n\n如果先写了实现代码，**必须删除**，从测试重新开始。不保留\"参考\"，不\"边写测试边改\"。\n\n## 适用场景\n\n**必须使用 TDD**：\n- 新功能实现\n- Bug 修复\n- 代码重构\n- 任何行为变更\n\n**例外（需用户明确同意）**：\n- 一次性原型代码\n- 纯配置文件\n- 自动生成的代码\n\n## Red-Green-Refactor 循环\n\n### ? RED — 写失败测试\n\n为**一个行为**写最小测试：\n- 一个测试只测一件事（名称里有 \"and\" 就拆开）\n- 名称描述行为，而非实现（`rejects empty email` 而非 `test1`）\n- 用真实代码，除非依赖外部服务才 mock\n- 展示你期望的 API 长什么样\n\n```typescript\n\u002F\u002F ✅ 好：测试真实行为\ntest('rejects empty email', () => {\n  expect(validateEmail('')).toBe(false);\n});\n\n\u002F\u002F ❌ 坏：测试 mock 而非代码\ntest('email works', () => {\n  const mock = jest.fn();\n  mock('');\n  expect(mock).toHaveBeenCalled();\n});\n```\n\n### 验证 RED — 必须看到它失败\n\n**这一步不可跳过。** 运行测试，确认：\n\n```bash\n# 前端\nnpx jest path\u002Fto\u002Ftest.test.ts\n# 后端\nnpm test -- path\u002Fto\u002Ftest.test.ts\n```\n\n确认三件事：\n1. 测试**失败**（不是通过）\n2. 失败原因是**功能缺失**（不是拼写错误、导入错误）\n3. 失败信息符合预期\n\n**如果测试直接通过** → 你在测已有行为，测试写错了，修正它。\n**如果测试报错（error）** → 修复错误（如导入路径），重跑直到它正确失败。\n\n### ? GREEN — 写最小实现\n\n写**刚好让测试通过**的最少代码：\n- 不添加测试未要求的功能\n- 不重构、不\"顺便优化\"\n- 不提前抽象\n\n```typescript\n\u002F\u002F ✅ 好：刚好通过\nfunction validateEmail(email: string): boolean {\n  return email.trim().length > 0;\n}\n\n\u002F\u002F ❌ 坏：过度工程\nfunction validateEmail(\n  email: string,\n  options?: { allowPlus?: boolean; domainWhitelist?: string[] },\n): boolean {\n  \u002F\u002F YAGNI\n}\n```\n\n### 验证 GREEN — 必须看到它通过\n\n运行测试，确认：\n1. 新测试通过\n2. **所有已有测试仍然通过**\n3. 输出干净（无报错、无意外警告）\n\n**如果新测试失败** → 修代码，不修测试。\n**如果其他测试失败** → 立即修复。\n\n### ? REFACTOR — 重构（仅在 GREEN 之后）\n\n测试全绿后才允许重构：\n- 消除重复\n- 改善命名\n- 提取辅助函数\n- **不新增行为**\n\n重构后必须重新跑全部测试，保持全绿。\n\n### 循环\n\n下一个行为 → 回到 RED。\n\n## Bug 修复 TDD\n\n修复 bug 时，先写一个**复现 bug 的失败测试**：\n\n```\n1. 写测试复现 bug → 确认失败（RED）\n2. 修复代码 → 确认通过（GREEN）\n3. 这个测试就是回归保护\n```\n\n**禁止**在没有复现测试的情况下修复 bug。\n\n## 验证清单\n\n标记任务完成前，逐项确认：\n- [ ] 每个新增函数\u002F方法都有对应测试\n- [ ] 每个测试都先看到它失败（RED 已验证）\n- [ ] 失败原因是功能缺失，而非拼写\u002F导入错误\n- [ ] 实现代码是让测试通过的最小集\n- [ ] 全部测试通过\n- [ ] 测试用真实代码（仅在不可避免时 mock）\n- [ ] 边界条件和错误路径已覆盖\n\n**任何一项打不了勾 → 你跳过了 TDD，回到 RED 重新开始。**\n\n## 常见借口与回应\n\n| 借口                     | 回应                                 |\n| ------------------------ | ------------------------------------ |\n| \"太简单了不用测\"         | 简单代码也会坏，测试只要 30 秒       |\n| \"我之后补测试\"           | 事后写的测试一跑就过，证明不了任何事 |\n| \"我手动测过了\"           | 手动测试无记录、不可复跑、容易漏     |\n| \"已经写了代码，删了浪费\" | 沉没成本。保留未验证的代码才是技术债 |\n| \"TDD 太慢\"               | TDD 比事后调试快，省的是未来的时间   |\n| \"这个不一样因为...\"      | 没有例外。删代码，从测试开始。       |\n\n## 卡住时\n\n| 问题          | 解法                            |\n| ------------- | ------------------------------- |\n| 不知道怎么测  | 先写你期望的 API 调用，再写断言 |\n| 测试太复杂    | 说明设计太复杂，简化接口        |\n| 什么都要 mock | 代码耦合太高，用依赖注入解耦    |\n| 测试设置庞大  | 提取辅助函数；仍复杂就简化设计  |\n",{},"main","2b63f856ce19c2a797929cacabd9e0fc936812fa","plugins\u002FechoVic\u002Fboss-skill\u002Fskill\u002Fskills\u002Fshared\u002Ftdd",491,"https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins","https:\u002F\u002Fhol.org\u002Fplugins\u002Fbest-codex-plugins","https:\u002F\u002Fgithub.com\u002Fhashgraph-online","https:\u002F\u002Fhol.org","Open-source standards and developer tools for interoperable AI agents: discovery, identity, communication, payments, privacy and security.","2026-11-14 14:06:13",{"source":7,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add hashgraph-online\u002Fawesome-codex-plugins --skill tdd",{"tool":39,"command":40},"bunx","bunx skills add hashgraph-online\u002Fawesome-codex-plugins --skill tdd",{"tool":42,"command":43},"pnpm","pnpm dlx skills add hashgraph-online\u002Fawesome-codex-plugins --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002FechoVic\u002Fboss-skill\u002Fskill\u002Fskills\u002Fshared\u002Ftdd\u002FSKILL.md",true,[],[48,58,66,74,82,90],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":52,"licenseFileUrl":53,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M7DV332YQMGD8WTRJ9DZQXTB","worktable-review-with-annotations","Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.","MIT","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-review-with-annotations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":52,"licenseFileUrl":62,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":57},"01M7DV2YGHCZVBEB1AHYB6CGHE","worktable-find-and-synthesize-context","Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-find-and-synthesize-context\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":52,"licenseFileUrl":70,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":57},"01M7DV2TQN1H11ME2SAF9MXN7V","worktable-create-or-update-docs","Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-update-docs\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":52,"licenseFileUrl":78,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":57},"01M7DV2NE452NEA8TXATKSNAJH","worktable-create-or-manage-records","Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-records\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":52,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":57},"01M7DV2HENRBR2KSCVM064WH0Y","worktable-create-or-manage-interactive-html","Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-create-or-manage-interactive-html\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":52,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":57},"01M7DV2CADR5R7RQFFYPNAGR9Y","worktable-collaborate-threads","Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fhashgraph-online\u002Fawesome-codex-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fworktable\u002Fworktable-plugin\u002Fskills\u002Fworktable-collaborate-threads\u002FSKILL.md",[],[]]