/codebase-architecture:codebase-designfrom codebase-architecture
Design a module interface, seams, and testability. Use when another architecture skill needs deep-module vocabulary.
Ships in codebase-architecture. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Design deep modules: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Shared vocabulary for the whole codebase-architecture chain (analyze → improve → to-spec).
Use these terms exactly — don't substitute "component," "service," "API," or "boundary." Consistent language is the whole point.
Module — anything with an interface and an implementation. Scale-agnostic: function, class, package, or tier-spanning slice. Avoid: unit, component, service.
Interface — everything a caller must know to use the module correctly: type signature, invariants, ordering constraints, error modes, required configuration, performance characteristics. Avoid: API, signature (too narrow).
Implementation — what's inside a module. Distinct from Adapter: small adapter + large implementation (Postgres repo) or large adapter + small implementation (in-memory fake). Reach for "adapter" when the seam is the topic; "implementation" otherwise.
Depth — leverage at the interface: behaviour a caller or test can exercise per unit of interface they learn. Deep = large behaviour behind small interface; shallow = interface nearly as complex as implementation.
Seam (Michael Feathers) — place where you can alter behaviour without editing there; the location of the module's interface. Where to put the seam is its own design decision. Avoid: boundary (DDD overload).
Adapter — concrete thing that satisfies an interface at a seam. Role, not substance.
Leverage — capability per unit of interface callers learn. One implementation pays back across N call sites and M tests.
Locality — change, bugs, knowledge, and verification concentrate in one place. Fix once, fixed everywhere.
C4 Component (exception): only as the C4 diagram level name. Not a synonym for module in design prose or extract filenames.
Deep = small interface + lots of implementation. Shallow = large interface + thin pass-through.
When designing an interface, ask: fewer methods? simpler params? more complexity hidden inside?
Good interfaces make testing natural:
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 bury side effects when pure is enough.
// Testable
function calculateDiscount(cart): Discount {}
// Hard to test
function applyDiscount(cart): void {
cart.total -= discount;
}
Small surface area — fewer methods and params.
interface keyword.codebase-architecture-analyzecodebase-architectureWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub karlorz/agent-skills --plugin codebase-architectureOther plugins' skills for the same job
5 skills in this plugin
/architecture-to-specTurn architecture analysis into a PRD or spec without interviewing. Use after codebase-architecture-analyze or for a feature spec./codebase-architectureRoute architecture work to analyze, design, improve, or to-spec. Use when the user asks for codebase-architecture./codebase-architecture-analyzeAnalyze architecture into C4, ADRs, debt, and reimplementation maps. Use when documenting or reverse-engineering a repo./improve-codebase-architectureScan for deepening, testability, and AI-navigability refactors. Use when asking for an architecture improvement review.