agentleFS
allemaarallemaar/open-skills/skills/design-an-interface/SKILL.md

design-an-interface

Skill15 starsChanged 14 days agoApache-2.0View on GitHub

Generate multiple radically different interface designs for a module, then compare and synthesize. Use when the user wants to design an API, explore interface options, compare module shapes, or says "design it twice" / "give me options" / "what should this interface look like". Also trigger proactively when a user is about to implement something non-trivial and hasn't locked in an interface yet. Not /insight-explore (brainstorms approaches as prose) or /plan-create (turns a chosen design into a phased plan) — this produces concrete, comparable interface designs.

59 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ubiquitous-language, decision-mapping and 10 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.
  • kennethkeimSkill

    ubiquitous-language

    Extract a DDD-style ubiquitous language glossary from the current conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, create a ubiquitous language, or mentions "domain model" or "DDD".

    Also in 39 projects that use this

  • 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 22 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 22 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

  • +1 more from Lesani

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 55 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't proceed until you have real answers.

    line 39
  2. Distinctive:

    If the runtime provides fresh isolated worker contexts: spawn the three designs within its supported bounded controls.

    line 43
  3. Distinctive:

    Use these lenses to force divergence:

    line 49
  4. Distinctive:

    Add a 4th for domain-specific shapes (event-driven, streaming, builder, type-state) when relevant.

    line 57
  5. Distinctive:

    Write the synthesized design — concrete signatures, not description.

    line 88
  6. Distinctive:

    Use these during Step 3. Don't apply them during generation.

    line 97

“Common” is measured: kept by at least 6 in 10 of the 55 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

From "Design It Twice" (Ousterhout): your first idea is rarely the best. The value is in contrast — not in any single design.

Step 1 — Gather Requirements

Shallow intake produces shallow designs. Ask these specifically — not just "what does it do?":

  1. What is the one-sentence job of this module?
  2. Who are the callers? (other modules, end users, tests, CLI, external systems)
  3. Walk me through the happy path in code — what does the call site actually look like?
  4. What are the failure modes? What can go wrong, and who handles it?
  5. What must the interface hide? What should callers never need to know about?
  6. Any hard constraints? (performance, compatibility with existing patterns, language idioms)
  7. Is there a "most common case" that should be especially ergonomic?

Don't proceed until you have real answers. One vague sentence is not enough.

Step 2 — Generate Designs

If the runtime provides fresh isolated worker contexts: spawn the three designs within its supported bounded controls. Each agent gets the requirements plus its assigned lens and must produce a design that would surprise the others. Brief them to actively resist the obvious answer.

Without fresh contexts, produce the contrasting designs sequentially and complete each before the next. Label this a useful correlated same-context fallback; prior visible designs prevent a claim of independent generation.

Produce 3 radically different designs. Radically different means different information hiding boundaries — not just different method names or parameter orders. Three designs that all accept a config struct and return a result are not radically different, even if the method names differ.

Use these lenses to force divergence:

DesignConstraintCore question
Minimal1–3 operations maxWhat is the smallest surface that covers all cases?
Caller-empoweringExpose primitives; let caller composeWhat if we trust the caller with more control?
Common-case-firstOptimize the happy path to one lineWhat if the 95% case has zero friction, even if edge cases are awkward?

Add a 4th for domain-specific shapes (event-driven, streaming, builder, type-state) when relevant.

For each design, produce:

  • Interface — concrete method signatures, types, function signatures. Not schematic.
  • Usage example — real call-site code for: happy path, error case, one awkward case.
  • What this hides — complexity that lives inside, invisible to callers.
  • What this exposes — decisions or knowledge pushed onto the caller.
  • Where it shines / breaks down — 1–3 honest sentences.

Step 3 — Compare

Fill this table, then write prose.

DimensionDesign 1Design 2Design 3
# of operations
Caller knowledge requiredlow/med/high
Error handling locationinside / outside
Composabilityy/n
Fits most common case

The table shows what. The prose explains why it matters. Go deep on where the designs diverge most — depth, misuse resistance, evolution over time, and the awkward case each design can't handle cleanly. Don't soften it. Say which designs have real problems.

Apply the Evaluation Criteria from the Reference section below.

Step 4 — Synthesize

This is the highest-value output. Produce something concrete:

  1. State your recommendation and why, referencing the comparison.
  2. Write the synthesized design — concrete signatures, not description. If one design wins outright, restate it as a clean spec. If the answer is "take X's shape, borrow Y's error handling, add Z's escape hatch," write that out.
  3. Name the one thing to get right — the decision that, if wrong, causes the most pain later.

Close by asking: "Does this fit your primary use case? Anything from the other designs worth keeping?"


Reference

Use these during Step 3. Don't apply them during generation.

Evaluation Criteria (APOSD)

  • Interface simplicity — fewer methods, simpler params → easier to learn, harder to misuse.
  • Depth — small interface hiding large complexity = deep module (good). Large interface over thin implementation = shallow module (avoid).
  • General-purpose vs. specialized — can it handle adjacent use cases without changes? Beware over-generalization, but also beware interfaces that lock in today's assumptions.
  • Implementation efficiency — does the interface allow an efficient implementation, or force awkward internals?
  • Ease of correct use — the best interfaces make the right thing the natural thing.

Anti-Patterns

  • Convergent designs — if all three designs are the same module with different names, you've failed. Start over with harder constraints.
  • Skipping comparison — generating without comparing is just brainstorming. The value is in the contrast.
  • Implementing — this skill is about interface shape. Don't write internals.
  • Premature synthesis — don't merge designs during generation. Let them stay fully different until Step 4.
  • Vague trade-offs — "more flexible" means nothing. More flexible how, for whom, at what cost?

Human output. This skill's handler-facing output obeys the human-output contract (human-output/SKILL.md).

Next skills. On completion, run the Next Skills protocol (next-skills/SKILL.md): surface the next-skills recommendations from front-matter for the caller to pick. Offer only — never auto-invoke.

Self-improvement. On completion, run the Self-Improvement Protocol (self-improve/SKILL.md): apply its signal taxonomy and threshold to this run; surface any surviving proposal for handler approval. Conservative — silent otherwise. Never auto-apply.

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.