[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79FZ9ZAXPBEW7YAVZKS6PDA":3,"skill-same:01M79FZ9ZAXPBEW7YAVZKS6PDA":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M79FZ9ZAXPBEW7YAVZKS6PDA","design-an-interface",null,"使用并行子智能体为模块生成多个截然不同的接口设计。当用户想设计 API、探索接口选项、比较模块形态，或提到“设计两次”时使用。","15102045545\u002Fskills-cn","15102045545","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F168414493?v=4","01M79FZ671W8T1KPST7GRYEG3T","xiaokeer","01M79FZ67MMMDE1RZYSQGCPWK9",1,"MIT","https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fdeprecated\u002Fdesign-an-interface\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: design-an-interface\ndescription: 使用并行子智能体为模块生成多个截然不同的接口设计。当用户想设计 API、探索接口选项、比较模块形态，或提到“设计两次”时使用。\n---\n\n# 设计接口\n\n本技能以《A Philosophy of Software Design》中的“Design It Twice”为依据：你的第一个想法不太可能是最佳方案。先生成多个截然不同的设计，然后进行比较。\n\n## 工作流\n\n### 1. 收集需求\n\n开始设计前，先了解：\n\n- [ ] 该模块解决什么问题？\n- [ ] 调用方是谁？（其他模块、外部用户、测试）\n- [ ] 关键操作有哪些？\n- [ ] 是否存在约束？（性能、兼容性、现有模式）\n- [ ] 哪些内容应当隐藏在内部，哪些应当公开？\n\n询问：“这个模块需要做什么？谁会使用它？”\n\n### 2. 生成设计（并行子智能体）\n\n使用 Task 工具同时启动 3 个以上的子智能体。每个子智能体都必须提出一种**截然不同**的方法。\n\n```\n每个子智能体的提示词模板：\n\n为以下内容设计接口：[module description]\n\n需求：[gathered requirements]\n\n此设计的约束：[assign a different constraint to each agent]\n- 智能体 1：“尽量减少方法数量——最多以 1–3 个方法为目标”\n- 智能体 2：“最大限度提高灵活性——支持多种用例”\n- 智能体 3：“针对最常见情况进行优化”\n- 智能体 4：“从 [specific paradigm\u002Flibrary] 中汲取灵感”\n\n输出格式：\n1. 接口签名（类型\u002F方法）\n2. 使用示例（调用方如何使用）\n3. 此设计在内部隐藏的内容\n4. 此方法的权衡\n```\n\n### 3. 展示设计\n\n展示每项设计，并包含：\n\n1. **接口签名**——类型、方法、参数\n2. **使用示例**——调用方在实践中如何实际使用\n3. **隐藏的内容**——保留在内部的复杂度\n\n依次展示各项设计，让用户先理解每种方法，再进行比较。\n\n### 4. 比较设计\n\n展示所有设计后，从以下方面进行比较：\n\n- **接口简洁性**：方法更少、参数更简单\n- **通用与专用**：灵活性与专注度\n- **实现效率**：这种形态是否支持高效的内部实现？\n- **深度**：小型接口隐藏大量复杂度（好），还是大型接口只有单薄实现（差）\n- **易于正确使用**与**易于误用**\n\n使用文字而不是表格讨论权衡。突出各项设计分歧最大的部分。\n\n### 5. 综合\n\n最佳设计通常会结合多个选项的洞见。询问：\n\n- “哪项设计最符合你的主要用例？”\n- “其他设计中是否有值得吸收的元素？”\n\n## 评估标准\n\n依据《A Philosophy of Software Design》：\n\n**接口简洁性**：方法更少、参数更简单 = 更容易学习并正确使用。\n\n**通用性**：无需更改即可处理未来用例。但要警惕过度泛化。\n\n**实现效率**：接口形态支持高效实现，还是会迫使内部实现变得别扭？\n\n**深度**：小型接口隐藏大量复杂度 = 深模块（好）。大型接口只有单薄实现 = 浅模块（应避免）。\n\n## 反模式\n\n- 不要让子智能体产出相似设计——必须保证截然不同\n- 不要跳过比较——价值来自对比\n- 不要实现——本技能只关注接口形态\n- 不要根据实现工作量进行评估\n","# 设计接口\n\n本技能以《A Philosophy of Software Design》中的“Design It Twice”为依据：你的第一个想法不太可能是最佳方案。先生成多个截然不同的设计，然后进行比较。\n\n## 工作流\n\n### 1. 收集需求\n\n开始设计前，先了解：\n\n- [ ] 该模块解决什么问题？\n- [ ] 调用方是谁？（其他模块、外部用户、测试）\n- [ ] 关键操作有哪些？\n- [ ] 是否存在约束？（性能、兼容性、现有模式）\n- [ ] 哪些内容应当隐藏在内部，哪些应当公开？\n\n询问：“这个模块需要做什么？谁会使用它？”\n\n### 2. 生成设计（并行子智能体）\n\n使用 Task 工具同时启动 3 个以上的子智能体。每个子智能体都必须提出一种**截然不同**的方法。\n\n```\n每个子智能体的提示词模板：\n\n为以下内容设计接口：[module description]\n\n需求：[gathered requirements]\n\n此设计的约束：[assign a different constraint to each agent]\n- 智能体 1：“尽量减少方法数量——最多以 1–3 个方法为目标”\n- 智能体 2：“最大限度提高灵活性——支持多种用例”\n- 智能体 3：“针对最常见情况进行优化”\n- 智能体 4：“从 [specific paradigm\u002Flibrary] 中汲取灵感”\n\n输出格式：\n1. 接口签名（类型\u002F方法）\n2. 使用示例（调用方如何使用）\n3. 此设计在内部隐藏的内容\n4. 此方法的权衡\n```\n\n### 3. 展示设计\n\n展示每项设计，并包含：\n\n1. **接口签名**——类型、方法、参数\n2. **使用示例**——调用方在实践中如何实际使用\n3. **隐藏的内容**——保留在内部的复杂度\n\n依次展示各项设计，让用户先理解每种方法，再进行比较。\n\n### 4. 比较设计\n\n展示所有设计后，从以下方面进行比较：\n\n- **接口简洁性**：方法更少、参数更简单\n- **通用与专用**：灵活性与专注度\n- **实现效率**：这种形态是否支持高效的内部实现？\n- **深度**：小型接口隐藏大量复杂度（好），还是大型接口只有单薄实现（差）\n- **易于正确使用**与**易于误用**\n\n使用文字而不是表格讨论权衡。突出各项设计分歧最大的部分。\n\n### 5. 综合\n\n最佳设计通常会结合多个选项的洞见。询问：\n\n- “哪项设计最符合你的主要用例？”\n- “其他设计中是否有值得吸收的元素？”\n\n## 评估标准\n\n依据《A Philosophy of Software Design》：\n\n**接口简洁性**：方法更少、参数更简单 = 更容易学习并正确使用。\n\n**通用性**：无需更改即可处理未来用例。但要警惕过度泛化。\n\n**实现效率**：接口形态支持高效实现，还是会迫使内部实现变得别扭？\n\n**深度**：小型接口隐藏大量复杂度 = 深模块（好）。大型接口只有单薄实现 = 浅模块（应避免）。\n\n## 反模式\n\n- 不要让子智能体产出相似设计——必须保证截然不同\n- 不要跳过比较——价值来自对比\n- 不要实现——本技能只关注接口形态\n- 不要根据实现工作量进行评估\n",{"name":5,"description":7},"master","a7a44e6effe5a404eb8b622483896d79904f0c69","skills\u002Fdeprecated\u002Fdesign-an-interface",0,"https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn","https:\u002F\u002Fgithub.com\u002F15102045545","软件开发工程师","2026-07-23 11:44:15",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add 15102045545\u002Fskills-cn --skill design-an-interface",{"tool":38,"command":39},"bunx","bunx skills add 15102045545\u002Fskills-cn --skill design-an-interface",{"tool":41,"command":42},"pnpm","pnpm dlx skills add 15102045545\u002Fskills-cn --skill design-an-interface","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fdeprecated\u002Fdesign-an-interface\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"agents\u002Fopenai.yaml","REFERENCE","参考文档",99,"https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fdeprecated\u002Fdesign-an-interface\u002Fagents\u002Fopenai.yaml",[53,60,67,74,81,88],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M79G19FBV713ADE9Q95Y4D8E","writing-great-skills","出色编写和编辑技能的参考资料——让技能具备可预测性的词汇与原则。","https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fproductivity\u002Fwriting-great-skills\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M79G1888W4AQP8N9D2X0XYV4","teach","在此工作区内向用户教授新的技能或概念。","https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fproductivity\u002Fteach\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M79G15Z3NX0EJBP03A6VC3GJ","handoff","将当前对话压缩成交接文档，以便另一个智能体接手。","https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M79G14SKDFSWTADQZMQSCN9Q","grilling","围绕计划、决策或想法对用户进行不留情面的深度追问。当用户想对自己的思路进行压力测试，或使用任何“深度追问”触发措辞时使用。","https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79G12NEZDVFGG45SP50P37Q","grill-me","通过不留情面的深度追问打磨计划或设计。","https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fproductivity\u002Fgrill-me\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M79G1198KAG4PE1YADT2G30R","obsidian-vault","使用 wikilink 和索引笔记搜索、创建和管理 Obsidian 仓库中的笔记。当用户想要在 Obsidian 中查找、创建或整理笔记时使用。","https:\u002F\u002Fgithub.com\u002F15102045545\u002Fskills-cn\u002Fblob\u002Fmaster\u002Fskills\u002Fpersonal\u002Fobsidian-vault\u002FSKILL.md",[],[]]