mattpocock/skills

design-an-interface

用并行子Agent为同一模块设计明显不同的接口,再比较简单性、灵活度、实现效率、封装深度与误用可能。这里的interface指代码模块的调用方式,不是网页视觉界面。

  • 历史版本 SKILL.md
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

design-an-interface 是什么?

用并行子Agent为同一模块设计明显不同的接口,再比较简单性、灵活度、实现效率、封装深度与误用可能。这里的interface指代码模块的调用方式,不是网页视觉界面。

中文说明由本站依据来源整理;英文原文保留在页面下方。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 design-an-interface,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 design-an-interface

请在 Codex 的当前工作环境中安装并检查 design-an-interface 这个 Skill。

项目身份:mattpocock/skills / design-an-interface
来源:https://github.com/mattpocock/skills/blob/3e3ca9b9fa007614c65fab70469127b25841881d/skills/deprecated/design-an-interface/SKILL.md
已定位的源文件:skills/deprecated/design-an-interface/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 给出模块解决的问题、调用者、关键操作、兼容和性能限制,以及需要隐藏的复杂度;环境需支持并行子Agent。

会得到什么

  • 多套有调用示例的接口方案及综合取舍。

实际使用顺序

  1. 先明确需求,让不同Agent分别按最少方法、最大灵活性、常见场景优先等不同约束设计。
  2. 每个方案给签名、真实调用示例、内部隐藏内容和取舍,先逐个展示再比较。
  3. 用文字说明设计分歧和正确使用难度,询问哪个方案最贴合主要场景,再综合有价值的部分,不立即实现。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

教学示例:用design-an-interface为Skills检索模块比较接口。需要分类、关键词、排序和分页,让不同Agent分别优化最少方法、扩展性与最常用调用。展示签名和用法,先比较,不写实现。
预期结果

预期得到结构不同而非改名重复的方案,最后由真实需求选取;本例未运行。

使用前先看这些限制

使用条件与边界

  • 这是历史版流程,工具名称和子Agent能力须按当前客户端核对。
  • 源文明确不进入实现,不能把方案比较说成代码开发完成。
针对这个 Skill 的疑问

常见问题

为什么要多Agent?

来源希望不同约束产出明显不同的思路,价值在设计差异的比较;几个几乎相同的签名不会增加判断依据。

需要核对时再展开原文

来源原文与资料状态

来源版本
历史源文件(2026-04-28T09:23:06+01:00);原目录已变更,本页解释所链接的历史版本,不代表当前安装方式。
源文件
已保存 SKILL.md,抓取于 2026-11-17T10:52:11.422Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/deprecated/design-an-interface/SKILL.md · 抓取时间 2026-11-17T10:52:11.422Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

查看源文件章节 / Source sections
  • 原文:Design an Interface
  • 工作流程 / Workflow
  • 原文:1. Gather Requirements
  • 原文:2. Generate Designs (Parallel Sub-Agents)
  • 原文:3. Present Designs
  • 原文:4. Compare Designs
  • 原文:5. Synthesize
  • 原文:Evaluation Criteria
  • 原文:Anti-Patterns
原文:Design an Interface

Based on "Design It Twice" from "A Philosophy of Software Design": your first idea is unlikely to be the best. Generate multiple radically different designs, then compare.

原文:1. Gather Requirements

Before designing, understand: - [ ] What problem does this module solve? - [ ] Who are the callers? (other modules, external users, tests) - [ ] What are the key operations? - [ ] Any constraints? (performance, compatibility, existing patterns) - [ ] What should be hidden inside vs exposed? Ask: "What does this module need to do? Who will use it?"

原文:2. Generate Designs (Parallel Sub-Agents)

Spawn 3+ sub-agents simultaneously using Task tool. Each must produce a **radically different** approach. ``` Prompt template for each sub-agent: Design an interface for: [module description] Requirements: [gathered requirements] Constraints for this design: [assign a different constraint to each agent] - Agent 1: "Minimize method count - aim for 1-3 methods max" - Agent 2: "Maximize flexibility - support many use cases" - Agent 3: "Optimize for the most common case" - Agent 4: "Take inspiration from [specific paradigm/library]" Output format: 1. Interface signature (types/methods) 2. Usage example (how caller uses it) 3. What this design hides internally 4. Trade-offs of this approach ```

原文:3. Present Designs

Show each design with: 1. **Interface signature** - types, methods, params 2. **Usage examples** - how callers actually use it in practice 3. **What it hides** - complexity kept internal Present designs sequentially so user can absorb each approach before comparison.

原文:4. Compare Designs

After showing all designs, compare them on: - **Interface simplicity**: fewer methods, simpler params - **General-purpose vs specialized**: flexibility vs focus - **Implementation efficiency**: does shape allow efficient internals? - **Depth**: small interface hiding significant complexity (good) vs large interface with thin implementation (bad) - **Ease of correct use** vs **ease of misuse** Discuss trade-offs in prose, not tables. Highlight where designs diverge most.

原文:5. Synthesize

Often the best design combines insights from multiple options. Ask: - "Which design best fits your primary use case?" - "Any elements from other designs worth incorporating?"

文件 SHA256:a2596e9fa2d50e23ba014f64a5b8f9df4eb56b846a52cad152899ef5eb97b085

仓库许可证记录:未提供;not-established,查看来源。

Skills.sh收录简介 · 2026-07-28

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface…

查看历史简介来源

这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。

历史收录数据

Skill标识design-an-interface
来源仓库mattpocock/skills
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次129
快照累计安装量186214

历史资料说明

  • 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源