使用并行子代理为模块生成多个显著不同的接口设计。适用于用户想设计 API、探索接口选项、比较模块形状,或提到 “design it twice” 时。
design-an-interface is a Chinese-language (translated) planning skill, based on the "Design It Twice" principle from A Philosophy of Software Design, that generates multiple substantially different interface designs for a module and then compares them. The problem it solves is premature commitment: your first API idea is rarely the best, so the skill forces the exploration of several fundamentally different shapes before settling. It is a deprecated entry in the mattpocock-skills-zh-cn collection.
The workflow gathers requirements (what problem the module solves, who the callers are, key operations, constraints, what to hide versus expose), then uses the Task tool to spawn three or more parallel sub-agents, each assigned a deliberately different constraint—minimize method count, maximize flexibility, optimize for the common case, or draw on a specific paradigm/library. Each sub-agent returns an interface signature, a usage example, what it hides internally, and its trade-offs. The designs are presented sequentially, then compared along dimensions such as interface simplicity, general-purpose versus specialized, implementation efficiency, and module depth (a small interface hiding large complexity is good; a large interface over a thin implementation is shallow and to be avoided). Finally it synthesizes, often combining insights from multiple options.
It targets developers and API designers who want a rigorous, contrast-driven way to shape module interfaces. It is purely a discussion-and-comparison aid—its own anti-patterns note that it does not implement, only explores interface shape, and warns against letting sub-agents produce similar designs or skipping the comparison that carries the value.
When you want to design an API, explore interface options, compare module shapes, or when you invoke the 'design it twice' idea. It produces several radically different designs and compares them.
No. Its anti-patterns state explicitly that it discusses interface shape only and does not implement; the value is in the contrast between designs, not in code.
It uses the Task tool to run three or more parallel sub-agents, each given a deliberately different constraint so the resulting designs diverge sharply.
Interface simplicity, general-purpose versus specialized, implementation efficiency, module depth, and ease of correct use versus ease of misuse—drawn from A Philosophy of Software Design.
It lives under a deprecated path in a Chinese translation of the mattpocock skills collection, so treat it as a reference/pattern rather than a maintained tool.
Quick Setup:
.claude/skills/Repository
vinvcn/mattpocock-skills-zh-cn