codebase-design

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

2|Updated May 12, 2026
One-click install
npx skills add https://github.com/tajo9128/BioDockify-Pharma-AI --skill codebase-design-tajo9128
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codebase-design
Source: https://github.com/tajo9128/BioDockify-Pharma-AI/tree/main/.agents/skills/codebase-design
Command: npx skills add https://github.com/tajo9128/BioDockify-Pharma-AI --skill codebase-design-tajo9128

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 refactor. 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 to keep language consistent across a team. - 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 category. - Design It Twice workflow: Spawns parallel sub-agents that each produce a radically different interface for a candidate module, then compares them on depth, locality, and seam placement with an opinionated recommendation. - Use Case: When refactoring a cluster of shallow service classes, use this Skill to identify the right seam, define a port with production and in-memory test adapters, and rewrite tests against the deepened module's interface. ## Quick Start Ask the assistant to review a module's interface using the codebase-design vocabulary and suggest where to deepen it and place the seam.

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. Depth is measured as leverage at the interface, not lines of code.

What is the difference between a seam and an interface?

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

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?

Classify the dependency first: in-process code needs no adapter, local-substitutable dependencies use stand-ins like in-memory databases, and true external services are injected as ports with mock adapters in tests.

Should I keep old unit tests after deepening modules?

No. Old unit tests on shallow modules become waste once tests exist at the deepened module's interface. Write new tests against the interface, asserting observable outcomes rather than internal state, then delete the old ones.