/mithunyc-skills:codebase-designfrom mithunyc-skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
Ships in mithunyc-skills. 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. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone.
For design, explanation, or review requests, inspect and recommend without editing the codebase. Refactor only when requested; preserve existing contracts and prove affected behavior before replacing implementations or tests.
Use these terms consistently for this design vocabulary. Preserve existing repository identifiers and domain language; an API, service, or security boundary can still be the precise term in its own context. The "Avoid" notes below distinguish concepts, not a ban on those words.
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, and performance characteristics. Avoid: API, signature (too narrow, they refer only to the type-level surface).
Implementation: what's inside a module, its body of code. 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). Reach for "adapter" when the seam is the topic; "implementation" otherwise.
Depth: leverage at the interface. The amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is deep when a large amount of behaviour sits behind a small interface, shallow when the interface is nearly as complex as the implementation.
Seam (Michael Feathers): a place where you can alter behaviour without editing in that place; the location at which 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 that satisfies an interface at a seam. Describes role (what slot it fills), not substance (what's inside).
Leverage: what callers get from depth. More capability per unit of interface they learn. 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 rather than spreading across callers. Fix once, fixed everywhere.
Deep module = small interface + lots of implementation:
┌─────────────────────┐
│ Small Interface │ ← Few methods, simple params
├─────────────────────┤
│ │
│ Deep Implementation│ ← Complex logic hidden
│ │
└─────────────────────┘
Shallow module = large interface + little implementation (avoid):
┌─────────────────────────────────┐
│ Large Interface │ ← Many methods, complex params
├─────────────────────────────────┤
│ Thin Implementation │ ← Just passes through
└─────────────────────────────────┘
When designing an interface, ask:
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();
}
Prefer pure calculations; isolate necessary side effects behind explicit adapters.
// Testable
function calculateDiscount(cart): Discount {}
// Hard to test
function applyDiscount(cart): void {
cart.total -= discount;
}
Small surface area. Fewer methods and params can simplify caller setup, but required tests still follow behavior, failure modes, and invariants, not method count.
interface keyword or a class's public methods: too narrow: interface here includes every fact a caller must know.This skill is the vocabulary and the judgement. Two neighbours use it:
improve-codebase-architecture — sweeps a whole codebase to find deepening candidates and writes them up as RFCs. Use it when the question is "where should we improve?"; use this skill when the question is "how should this specific thing be shaped?"diagnosing-bugs — when a shallow module is producing bugs rather than friction, fix the bug there first. Redesign is not a debugging strategy.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mithunyc/skills --plugin mithunyc-skills30 skills in this plugin
/api-designerDesign or review API contracts, schemas, errors, pagination, idempotency, and compatibility. Use for API specification work rather than general server implementation./asd-ste100Write or clarify English technical instructions, tool descriptions, error messages, prompts, agent handoffs, and explanations with ASD-STE100-inspired rules. Use for disambiguate, STE100, Simplified Technical English, controlled-language rewrite, or dense technical text whose misreading has a cost. Preserve meaning and authority. Do not apply automatically to creative writing, marketing, verbatim quotations, or executable code./auth-integration-engineerDesign, implement, or diagnose authentication, identity-provider integration, sessions, tenant authorization, SSO, MFA, and account recovery.Other plugins' skills for the same job