본문으로 건너뛰기
cccskills
무료GitHub에 공개

design-an-interface

Generate multiple radically different interface designs before implementation. Use when designing an API, module boundary, command surface, data contract, or when the user says "design it twice".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

design-an-interface

Design an interface before building it. This skill adapts the "Design It Twice" practice from A Philosophy of Software Design: the first plausible interface is rarely the best one, so produce several different shapes, compare them, and synthesize a recommendation.

This is a design-only workflow. Do not edit implementation files, add tests, or scaffold code while using this skill unless the user explicitly starts a separate implementation task.

When to use

  • A user asks to design an API, module, CLI, protocol, data shape, hook, component props interface, or agent contract.
  • A Beads issue or alignment document calls for interface design before coding.
  • The current implementation path feels unclear because multiple public shapes could work.
  • The user mentions "design it twice" or asks for alternatives/trade-offs.

Context first

Before proposing designs, load the smallest useful set of harness context:

  1. Read any task-specific alignment document in .tmp/work/.
  2. Inspect the relevant Beads issue with bd show <id> and note acceptance criteria, parent context, blockers, and scope limits.
  3. Read knowledge/_shared.yaml plus the relevant knowledge/repos/<repo>.yaml when the design touches a known repo.
  4. Check existing patterns before inventing a new shape: nearby interfaces, exported types, commands, hooks, components, and prior plan artifacts.
  5. If a contract file exists, treat it as authoritative. Do not rename exports, reorder parameters, or widen scope without calling out a deviation.

Ask clarifying questions only when a blocker prevents meaningful design work. Otherwise, state assumptions and continue.

Workflow

1. Gather requirements

Identify:

  • What problem the interface solves.
  • Who the callers are: humans, scripts, tests, modules, subagents, external systems.
  • The key operations and the minimum data each operation needs.
  • Compatibility, performance, security, persistence, and rollout constraints.
  • What complexity should be hidden inside versus exposed to callers.
  • How success will be verified: tests, acceptance criteria, evaluator rubric, or manual review.

Use this prompt when requirements are missing:

What does this interface need to let callers do, who will call it, and what should remain hidden behind the boundary?

2. Generate 3+ radically different designs

Create at least three alternatives with meaningfully different public shapes. Different names for the same method set do not count.

Use parallel subagents when they are available and appropriate for the environment. If subagents are unavailable, generate the alternatives yourself as separate passes and keep each pass anchored to a distinct design constraint.

Suggested constraints:

  • Minimal surface: 1-3 operations, narrow caller choices.
  • Flexible surface: composable primitives for many workflows.
  • Common-case surface: optimized for the path most callers will use.
  • Declarative surface: caller describes desired outcome, implementation chooses steps.
  • Protocol/object surface: lifecycle, state, or streaming modeled explicitly.
  • Existing-pattern surface: mirrors a local convention or well-known library.

Subagent prompt template:

Design an interface for: <module or boundary>

Requirements:
<requirements and constraints>

Existing context:
<Beads issue, alignment scope, knowledge notes, relevant local patterns>

Design constraint for this pass:
<one distinct constraint>

Return:
1. Interface signature or command/data shape
2. Usage example from a realistic caller
3. Complexity hidden behind the interface
4. Trade-offs and failure modes
5. Verification implications

Do not implement the interface.

3. Present designs sequentially

Show each design on its own before comparing them so the user can absorb the shape.

For each design include:

  • Interface signature, command surface, or data contract.
  • A short realistic usage example.
  • What the design hides internally.
  • What the caller must understand.
  • Trade-offs, including likely test and migration impact.

4. Compare in prose

Compare the alternatives using these criteria:

  • Interface simplicity: fewer concepts, methods, parameters, and special cases.
  • General-purpose shape: enough flexibility for likely future use without over-generalizing.
  • Implementation efficiency: whether the shape permits efficient internals or forces awkward workarounds.
  • Depth: a small interface hiding meaningful complexity is better than a broad shallow wrapper.
  • Ease of correct use vs misuse: the best design nudges callers toward valid states and makes invalid states hard to express.

Use prose instead of a large table unless the user asks for a matrix. Highlight the points where designs diverge most.

5. Synthesize and stop

Recommend one design or a small synthesis of multiple designs. Explain why it fits the requirements and where it intentionally rejects other options.

End with:

  • Recommended interface shape.
  • Key trade-offs accepted.
  • Open questions or risks.
  • Verification plan for a future implementation task.

Stop at the design recommendation. If implementation should proceed, create or update Beads work separately and follow the normal coding workflow.

Evaluation criteria

Good interface designs:

  • Minimize caller-facing concepts without hiding necessary control.
  • Make the common path obvious and the wrong path difficult.
  • Keep stable contracts small while allowing internals to evolve.
  • Reflect existing repo conventions unless there is a clear reason to diverge.
  • Preserve acceptance criteria and contract requirements from Beads or alignment docs.

Anti-patterns

  • Producing three variants of the same design.
  • Skipping Beads, alignment, knowledge, or existing-pattern context.
  • Choosing the easiest implementation when the caller-facing shape is weaker.
  • Treating comparison as a checklist instead of reasoning through trade-offs.
  • Implementing, scaffolding, or changing production code during the design workflow.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

add-bead

무료

Capture free-text work as a tracked Beads issue. Use when the user runs /add-bead or wants to quickly file a Beads issue.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jupes/agent-forge-harness22026년 10월 19일 업데이트

add-repo

무료

Register a new sub-repo in the knowledge base.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jupes/agent-forge-harness22026년 10월 19일 업데이트

Add focused Bun unit tests for mission-critical behavior and edge cases — not blanket coverage.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jupes/agent-forge-harness22026년 10월 19일 업데이트

ask

무료

Answer questions about the codebase from knowledge files. Use when the user runs /ask or asks a domain/knowledge question about the repos.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jupes/agent-forge-harness22026년 10월 19일 업데이트

Meta-skill for creating Agent Forge skills under .claude/skills/ with SKILL.md, optional references/ and scripts/, and Bun scaffolds. Use when the user wants to add or author a skill, scaffold a new skill folder, or align skill docs with harness conventions (JSON script output, Beads for tasks).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jupes/agent-forge-harness22026년 10월 19일 업데이트

Choose Beads issue priority (P0–P4, numeric, or named) from urgency, impact, and risk when creating or triaging work.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

jupes/agent-forge-harness22026년 10월 19일 업데이트

jupes의 스킬 모두 보기

이 스킬의 문제 신고