跳到正文
cccskills
免费在 GitHub 公开

design-it-twice

Use when asked to design a module interface, seam, or testable boundary. Not for UI direction picking: use design. No source or remote-system changes.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(2)

  • SKILL.md6.3 KB
  • agents/openai.yaml141 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Design it twice

Contract

FieldBound contract
TriggerDesign a module interface, seam, or testable boundary.
AuthorityRead-only. No file, VCS, credential, paid, published, deployed, or remote mutation. Design guidance only.
Side effectNone. No artifacts are written; output is a design comparison and recommendation in chat.
DoneThe design uses explicit deep-module vocabulary and deliberately placed seams.

Inputs

  • A module, cluster, or boundary to design, named by the user or identified from context. Required.
  • The codebase's primary language and any second language family the project owns. Optional, but needed for cross-language interface sketches.
  • Existing callers and dependencies of the target. Optional; improves constraint framing.

Procedure

Use these terms exactly. Do not substitute "component," "service," "API," or "boundary."

  • Module: anything with an interface and an implementation: a function, class, package, crate, or tier-spanning slice.
  • Interface: everything a caller must know to use the module correctly: type signature, invariants, ordering constraints, error modes, required configuration, and performance characteristics.
  • Implementation: the body of code inside a module.
  • Depth: power at the interface: the amount of behaviour a caller can exercise per unit of interface they must learn. Deep = much behaviour behind a small interface; shallow = interface nearly as complex as implementation.
  • Seam: a place where behaviour can be altered without editing in that place. The location at which a module's interface lives; choosing where to put the seam is a design decision separate from the implementation.
  • Adapter: a concrete thing that satisfies an interface at a seam; describes role, not substance.
  • Leverage: what callers get from depth: more capability per unit of interface learned.
  • Locality: what maintainers get from depth: change, bugs, and verification concentrate in one place rather than spreading across callers.

Before designing, classify the target's dependencies. The category determines how the deepened module is tested across its seam.

  1. In-process: pure computation, in-memory state, no I/O. Always deepenable; merge the modules and test through the new interface directly. No adapter needed.
  2. Local-substitutable: dependencies with local test stand-ins (PGLite, in-memory filesystem, Testcontainers). Deepenable when the stand-in exists; the seam stays internal.
  3. Remote but owned: owned services across a network boundary. Define a port at the seam; inject the transport as an adapter. In-memory adapter in tests, HTTP/gRPC/queue adapter in production.
  4. True external: third-party services the team does not control. Take the dependency as an injected port; tests provide a mock adapter.

Seam discipline: one adapter means a hypothetical seam; two adapters mean a real one. Do not introduce a port unless at least two adapters are justified.

  1. Frame the problem space. Write a user-facing explanation of the chosen target: the constraints any new interface must satisfy, the dependencies it relies on and which category each falls into, and a rough illustrative code sketch that makes the constraints concrete, not a proposal. Use the codebase's primary language; for polyglot projects, sketch in each owned language family. Show this to the user. Done when: the framing states constraints, per-dependency categories, and a concrete sketch shown to the user.

  2. Spawn three or more parallel alternative designs. Each must produce a radically different interface for the module. Give each a separate technical brief: file paths, coupling details, dependency category, and what sits behind the seam. Give each a distinct design constraint:

    • Minimize the interface: one to three entry points maximum, maximise leverage per entry point.
    • Maximise flexibility: support many use cases and extension.
    • Optimise for the most common caller: make the default case trivial.
    • Design around ports and adapters for cross-seam dependencies, when applicable.

    Each design outputs: (a) the interface, types, methods, params, invariants, ordering, error modes, expressed in the codebase's language; (b) a usage example showing how callers use it; (c) what the implementation hides behind the seam; (d) dependency strategy and adapters; (e) trade-offs, where leverage is high, where it is thin. Done when: three or more designs are produced, each radically different and carrying all five output fields.

  3. Present and compare. Present the designs sequentially so the user can absorb each one, then compare them in prose. Contrast by depth (power at the interface), locality (where change concentrates), and seam placement. Done when: designs are presented sequentially and compared by depth, locality, and seam placement.

  4. Recommend. Give an opinionated recommendation that names the strongest design and explains why. If elements from different designs would combine well, propose a hybrid. Be decisive: deliver a strong read, not a menu. Done when: one recommendation names the strongest design or a hybrid with its reason.

Failure and recovery

  • Ambiguous target. If the user does not name a module or boundary to design, stop and ask which target to design. Do not invent a target.
  • Unclassifiable dependencies. If a dependency category cannot be determined from available context, state which category is unknown and design conservatively: treat an unknown external dependency as true-external with an injected port.
  • Convergent designs. If the parallel designs are not radically different, re-dispatch with sharper, more divergent constraints. A menu of near-identical designs fails the done predicate.
  • Non-mutation. This skill writes nothing. If any step would require editing a file, stop; the output is design guidance only.

Output

A design comparison in chat: problem-space framing, three or more radically different interface designs, a prose comparison by depth, locality, and seam placement, and one opinionated recommendation: ordered frame → diverge → compare → recommend, with no files written.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

af-xdp

免费

Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

agents-md

免费

Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.

中文简介正在准备中。当前显示原文说明。

OutlineDriven/odin-claude-plugin372026年9月29日 更新

查看 OutlineDriven 的全部技能

报告此技能的问题