From mattpocock-skills
Generates multiple radically different interface designs using parallel sub-agents, based on 'A Philosophy of Software Design'. Useful when designing APIs, exploring interface options, or comparing module shapes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mattpocock-skills:design-an-interfaceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
基于 “A Philosophy of Software Design” 中的 “Design It Twice”:你的第一个想法很可能不是最好的。生成多个根本不同的 designs,然后比较。
基于 “A Philosophy of Software Design” 中的 “Design It Twice”:你的第一个想法很可能不是最好的。生成多个根本不同的 designs,然后比较。
设计前先理解:
询问:“这个 module 需要做什么?谁会使用它?”
使用 Task tool 同时生成 3+ 个 sub-agents。每个都必须产出根本不同的 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
每个 design 展示:
顺序展示 designs,让用户能在比较前吸收每个 approach。
展示所有 designs 后,按以下维度比较:
用 prose 讨论 trade-offs,不用 tables。突出 designs 分歧最大的地方。
最好的 design 往往结合多个 options 的 insights。询问:
来自 “A Philosophy of Software Design”:
Interface simplicity:更少 methods、更简单 params = 更容易学习和正确使用。
General-purpose:能不改动就处理未来 use cases。但要警惕 over-generalization。
Implementation efficiency:interface shape 是否允许高效 implementation?还是迫使 internals 变别扭?
Depth:小 interface 隐藏大量 complexity = deep module(好)。大 interface 配薄 implementation = shallow module(避免)。
npx claudepluginhub vinvcn/mattpocock-skills-zh-cnGenerates multiple radically different API/module interface designs using parallel sub-agents, then compares trade-offs. Use when exploring interface options or designing a module.
Design a module's interface using parallel sub-agents for radically different designs. Compare on depth, simplicity, and efficiency, then grill the synthesis. Use for new APIs, refactors, or interface decisions.
DEPRECATED. Guides interface design exploration by generating radical design alternatives in parallel, comparing trade-offs, and synthesizing insights.