codebase-design

Design deep modules with small interfaces, clean seams, and testable adapters.

1|Updated Sep 13, 2026
One-click install
npx skills add https://github.com/silentFellow/public-dotfiles --skill codebase-design-silentfellow
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/silentFellow/public-dotfiles/tree/main/agents/skills/codebase-design
Command: npx skills add https://github.com/silentFellow/public-dotfiles --skill codebase-design-silentfellow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases accumulate shallow modules whose interfaces are nearly as complex as their implementations, making code hard to test, navigate, and change. This Skill provides a shared vocabulary and decision framework for designing deep modules so interfaces stay small while behaviour concentrates behind clean seams. ## Core Features & Use Cases - Deep-module vocabulary: Precise definitions of module, interface, seam, adapter, depth, leverage, and locality so teams and AI agents name design concepts consistently. - Dependency-aware deepening: Classifies dependencies as in-process, local-substitutable, remote-but-owned, or true external, and prescribes ports-and-adapters or mock strategies for each. - Design It Twice workflow: Spawns parallel sub-agents to produce radically different interface proposals, then compares them on depth, locality, and seam placement. - Use Case: When refactoring a cluster of shallow service classes, use this Skill to decide where the seam belongs, define a port with production and in-memory adapters, and rewrite tests against the new deep interface. ## Quick Start Ask the AI to review a module's interface using the codebase-design vocabulary and suggest how to deepen it given its dependencies.

Frequently Asked Questions about codebase-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a deep module interface?▼

A deep module puts a large amount of behaviour behind a small interface. Reduce the number of methods, simplify parameters, and hide complexity inside the implementation so callers get more leverage per unit of interface they must learn.

What is the difference between a seam and an interface?▼

A seam is the location where a module's interface lives and where behaviour can be altered without editing in place. The interface is everything a caller must know to use the module, including invariants, ordering, and error modes.

When should I introduce a port and adapter?▼

Introduce a port only when at least two adapters are justified, typically a production adapter and an in-memory test adapter. A single-adapter seam is just indirection and should be avoided.

How do I test a deepened module with external dependencies?▼

Inject the external dependency as a port and provide a mock adapter in tests. Write tests at the deepened module's interface, assert on observable outcomes, and delete old unit tests on the shallow modules it replaced.

What is the Design It Twice process for interfaces?▼

Design It Twice spawns three or more parallel sub-agents, each producing a radically different interface under distinct constraints such as minimal surface or maximum flexibility. The designs are then compared on depth, locality, and seam placement with an opinionated recommendation.