design
Skill4 starsChanged 24 days agoMITView on GitHub
Use when designing or improving a module's interface, deciding where a seam goes, making code more testable or navigable, or pinning down domain terminology. Provides the deep-module vocabulary other skills lean on.
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 172 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Use these terms exactly — consistent language is the whole point.
- Distinctive: line 63
When designing an interface, ask: can I reduce the number of methods?
- Distinctive: line 79
Don't introduce a seam unless something actually varies across it.
- Very specific: line 130
When the work involves pinning down domain terminology, recording an architectural decision, or stress-testing concept boundaries, see …
“Common” is measured: kept by at least 6 in 10 of the 172 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.
Files
Design
Part of the Plan/Build phases — see the workflow skill for tiers and sequencing.
Design deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. The aim is leverage for callers, locality for maintainers, and testability for everyone. Mostly T2/T3 territory.
Glossary
Use these terms exactly — consistent language is the whole point.
Module — anything with an interface and an implementation. Deliberately scale-agnostic: a function, class, package, or tier-spanning slice. Avoid: unit, component, service.
Interface — everything a caller must know to use the module correctly: the type signature, but also invariants, ordering constraints, error modes, required configuration, performance characteristics. Avoid: API, signature (too narrow — type-level surface only).
Implementation — what's inside a module. Distinct from Adapter: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake).
Depth — leverage at the interface: how much behaviour a caller (or test) can exercise per unit of interface they must learn. Deep = lots of behaviour behind a small interface; shallow = interface nearly as complex as the implementation.
Seam (Michael Feathers) — a place where you can alter behaviour without editing in that place; where a module's interface lives. Where to put the seam is its own design decision, distinct from what goes behind it. Avoid: boundary (overloaded with DDD's bounded context).
Adapter — a concrete thing satisfying an interface at a seam. Describes role, not substance.
Leverage — what callers get from depth: one implementation pays back across N call sites and M tests.
Locality — what maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place. Fix once, fixed everywhere.
Deep vs shallow
Deep (aim for this): Shallow (avoid):
┌───────────────┐ ┌───────────────────────────────┐
│ Small interface│ │ Large interface │
├───────────────┤ ├───────────────────────────────┤
│ │ │ Thin implementation │
│ Deep implemen- │ └───────────────────────────────┘
│ tation │
└───────────────┘When designing an interface, ask: can I reduce the number of methods? simplify the parameters? hide more complexity inside?
Principles
- Depth is a property of the interface, not the implementation. A deep module can be internally composed of small, swappable parts — they just aren't part of the interface. Internal seams (private, used by the module's own tests) can coexist with the external seam.
- The deletion test. Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.
- The interface is the test surface. Callers and tests cross the same seam. If you want to test past the interface, the module is probably the wrong shape.
- One adapter means a hypothetical seam; two adapters means a real one. Don't introduce a seam unless something actually varies across it.
- Design it twice. For a non-obvious interface, sketch 2–3 radically different shapes before committing, and compare on depth, locality, and seam placement. The first design is rarely the best one.
Designing for testability
- Accept dependencies, don't create them.
// Testable function processOrder(order, paymentGateway) {} // Hard to test function processOrder(order) { const gateway = new StripeGateway(); } - Return results, don't produce side effects.
// Testable function calculateDiscount(cart): Discount {} // Hard to test function applyDiscount(cart): void { cart.total -= discount; } - Small surface area. Fewer methods = fewer tests; fewer params = simpler setup.
Relationships
A Module has exactly one Interface. Depth is measured against that interface. A Seam is where the interface lives; an Adapter sits at a seam and satisfies the interface. Depth produces Leverage for callers and Locality for maintainers.
Rejected framings
- Depth as implementation-lines ÷ interface-lines: rewards padding. Use depth-as-leverage.
- "Interface" = the TypeScript
interfacekeyword / public methods: too narrow — interface includes every fact a caller must know. - "Boundary": say seam or interface.
UI component checklist
A component isn't designed until, per component, you've named its states (default, hover, focus, active, disabled, loading, error, empty — each needs visual and a11y treatment), its variants as a managed enum set (not boolean-prop explosions), its props API (minimal required props; children over content-props; composition over configuration), and its a11y path (semantic elements, keyboard navigable, visible focus, ARIA only where HTML falls short).
Going deeper
When the work involves pinning down domain terminology, recording an
architectural decision, or stress-testing concept boundaries, see
references/domain-modeling.md.
To deepen a cluster of shallow modules safely, see references/deepening.md.
Adapted from mattpocock-skills (MIT, © 2026 Matt Pocock) and rampstack-skills (MIT, © 2026 RampStack Co.); see ATTRIBUTION.md.
Other versions193 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 193
- nextlevelbuilder/ui-ux-pro-max-skill★ 144ksame name
- Yeachan-Heo/oh-my-codex★ 34ksame name
- tokio-rs/toasty★ 3.2ksame name
- PaulWoitaschek/Voice★ 3.2ksame name
- joye61/pic-smaller★ 2.9ksame name
- oxsecurity/megalinter★ 2.6ksame name
- Infisical/agent-vault★ 2.5ksame name
- static-web-server/static-web-server★ 2.4ksame name
- SethGammon/Citadel★ 927same name
- Ohh-889/skyroc-admin★ 795same name
183 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use banner-design, ui-styling 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.
lithStudySkillbanner-design
Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter/X, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.
Also in 32 projects that use this
MicrosoftSkillui-styling
Guide for the visual style, structure, and shared building blocks used by Semantic Link Labs interactive UI tools (HTML widgets and anywidget-based widgets). Use this when adding a new interactive UI, modifying an existing one, or adding shared visual components.
Also in 33 projects that use this
lithStudySkillbrand
Brand voice, visual identity, messaging frameworks, asset management, brand consistency. Activate for branded content, tone of voice, marketing assets, brand compliance, style guides.
Also in 37 projects that use this
mayankjain1815-commitsSkillinfra-audit
Reads docker-compose, env files, ORM configs, and connection strings to map current infrastructure. Flags missing layers (cache, queue, analytics) based on observed access patterns. Outputs a structured infrastructure manifest.
Also in 3 projects that use this
JetBrainsSkillslides
Create and edit presentation slide decks (`.pptx`) with PptxGenJS and render/validation utilities. Use when tasks involve building a new PowerPoint deck, recreating slides from screenshots/PDFs/reference decks, modifying slide content while preserving editable output, adding charts/diagrams/visuals, or diagnosing layout issues such as overflow, overlaps, and font substitution.
Also in 36 projects that use this
henrikthome-archSkillinfra
Manage all infrastructure for the Volos school project — Render (API backend), Cloudflare (DNS + Pages frontend), PostgreSQL database, and GitHub Actions workflows.
Also in 3 projects that use this
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

