codebase-design

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

Updated Sep 8, 2026
One-click install
npx skills add https://github.com/salomepoulain/makery-stations --skill codebase-design-salomepoulain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/salomepoulain/makery-stations/tree/main/stations/claude/workbench/pantry/skills/codebase-design
Command: npx skills add https://github.com/salomepoulain/makery-stations --skill codebase-design-salomepoulain

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, with rejected framings explicitly called out so teams speak 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 per category. - Parallel interface exploration: A Design-It-Twice workflow that spawns multiple sub-agents to propose radically different interfaces, 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 goes, define a port with production and in-memory adapters, and rewrite tests against the new deep interface. ## Quick Start Ask the assistant 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
What is a deep module in software design?

A deep module packs a large amount of behaviour behind a small interface, giving callers high leverage per unit of interface they must learn. A shallow module is the opposite: its interface is nearly as complex as its implementation and should be avoided.

How do I decide where to put a seam in my code?

Place a seam where behaviour actually varies, following the rule that one adapter means a hypothetical seam while two adapters mean a real one. Typically this means a production adapter plus a test adapter justifying the port.

How do I make a module more testable without mocking everything?

Accept dependencies as parameters instead of constructing them, return results instead of producing side effects, and keep the interface small. Tests then target the module's interface as the single test surface rather than internal seams.

When should I use ports and adapters for external services?

Use ports and adapters when a dependency crosses a network boundary you own, such as internal microservices. For true third-party services like Stripe, inject the dependency as a port and supply a mock adapter in tests.

Should I keep old unit tests after deepening a module?

No. Once tests exist at the deepened module's interface, old tests on the shallow modules become waste and should be deleted. New tests assert observable outcomes through the interface so they survive internal refactors.