agentleFS
chiruu12chiruu12/claude-skills-template/.claude/skills/design-an-interface/SKILL.md

design-an-interface

Skill0 starsChanged 7 months agoMITView on GitHub

Generate multiple radically different interface designs for a module using parallel sub-agents, then compare on simplicity, depth, and correctness of use. Based on "Design It Twice" from A Philosophy of Software Design. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

63 other projects use a version of this, 58 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use decision-mapping, batch-grill-me and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • FabienDehopreSkill

    decision-mapping

    Turn a loose idea into a sequenced map of investigation tickets, then drive them to resolution one at a time.

    Also in 5 projects that use this

  • boyingliu01Skill

    batch-grill-me

    A relentless interview that asks every frontier question at once, round by round. Thin alias of `grilling` (#540) — upstream mattpocock/skills absorbed this protocol into grilling; XP-Gate keeps this name as the sprint-flow Phase 2 entry point so orchestration docs stay stable.

    Also in 5 projects that use this

  • LesaniSkill

    writing-beats

    Shape an article as a journey of beats, choose-your-own-adventure style. The user picks a starting beat from the raw material, you write only that beat, then offer options for where to pivot next, beat by beat, until the article reaches a natural end. Use when the user has raw material and wants to assemble it as a narrative rather than an argument.

    Also in 23 projects that use this

  • LesaniSkill

    writing-shape

    Take a markdown file of raw material and shape it into an article through a conversational session — drafting candidate openings, growing the piece paragraph by paragraph, arguing about format (lists, tables, callouts, quotes) at each step. Use when the user has a pile of notes, fragments, or a rough draft and wants help turning it into something publishable.

    Also in 23 projects that use this

  • HK-hubSkill

    prd-to-plan

    Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in ./plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".

    Also in 6 projects that use this

  • RoentekSkill

    loop-me

    Grill me about specs for the workflows I want to build, within this workspace.

    Also in 15 projects that use this

  • +1 more from Lesani

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 59 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    NOT: when the interface already exists (use request-refactor-plan)

    line 19
  2. Very specific:

    NOT: when user needs implementation (use tdd)

    line 20
  3. Distinctive:

    NOT: when there's only one reasonable approach — don't force exploration for its own sake

    line 21

“Common” is measured: kept by at least 6 in 10 of the 59 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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. The value isn't in any single design — it's in the contrast that reveals which trade-offs actually matter.

When to Use

  • User needs to design an API, module interface, or public contract
  • User says "design it twice", "explore interface options", or "what are my options?"
  • A module shape is being debated and multiple approaches seem viable
  • NOT when the interface already exists (use request-refactor-plan)
  • NOT when user needs implementation (use tdd)
  • NOT when there's only one reasonable approach — don't force exploration for its own sake

Process

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?

2. Generate Designs (Parallel Sub-Agents)

Spawn 3+ sub-agents simultaneously. Each must produce a radically different approach:

  • 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]"

Each produces: interface signature, usage example, what it hides, trade-offs.

3. Present Designs

Show each design with signature, usage examples, and what it hides. Present sequentially so user can absorb each before comparison.

4. Compare Designs

Compare on:

  • Interface simplicity: fewer methods, simpler params
  • Depth: small interface hiding significant complexity (good) vs large interface with thin implementation (bad)
  • Ease of correct use vs ease of misuse
  • General-purpose vs specialized: flexibility vs focus

Discuss in prose. Highlight where designs diverge most.

5. Synthesize

The best design often combines insights from multiple options. Ask:

  • "Which design best fits your primary use case?"
  • "Any elements from other designs worth incorporating?"

Common Rationalizations

ShortcutWhy It Fails
"I already know the right design"You don't know it's right until you've seen what you're giving up. Alternatives reveal trade-offs invisible from a single vantage point.
"These designs are too different to compare"That's the point. Similar designs teach nothing. Radical difference exposes the fundamental tension.
"Let's just go with the simplest one"Simplest interface doesn't mean best. A 1-method interface that forces complex caller setup has merely moved complexity.
"We can always change the interface later"Once callers depend on your interface, changing it requires migrating all of them. Get it right before the first caller commits.

Red Flags

  • Sub-agents produce variations on the same theme — enforce radical difference
  • Comparison focuses on "which is easiest to implement" — caller experience matters, not implementation effort
  • User picks a design without articulating WHY
  • Synthesis adds methods from every design — that's a kitchen sink, not synthesis

Verification Checklist

  • Requirements gathered before any design work
  • 3+ designs generated, each radically different
  • Each design includes: signature, usage example, what it hides, trade-offs
  • Designs compared on simplicity, depth, flexibility, and ease of correct use
  • User articulated which trade-offs they're accepting

Anti-patterns

  • DO NOT let sub-agents produce similar designs — enforce divergent constraints
  • DO NOT skip comparison — the value is in contrast
  • DO NOT implement anything — this is purely about interface shape
  • DO NOT evaluate based on implementation effort — what matters is caller experience
  • DO NOT recommend a winner — present trade-offs and let the user decide

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.