/software-design-plugin:design-deep-modules file|module|dir|diff to assess for interface depth; omit for current changefrom software-design-plugin
Assesses module/API interface depth to identify shallow abstractions and guide deepening moves. Useful when designing new modules, reviewing class boundaries, or reducing complexity.
Ships in software-design-plugin. 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.
None: SKILL.md is the whole skill.
From A Philosophy of Software Design (Ousterhout): the best modules are deep — a small, simple interface hiding a large, complex implementation. A shallow module is the opposite: an interface nearly as complicated as the implementation it wraps, so it adds cognitive cost without removing much. This skill assesses a module or interface for depth and points at the cheapest way to deepen it.
The unit of design is complexity at the boundary: every method, parameter, and exception a caller must understand is interface cost; everything the module handles for them is the benefit. Depth is the ratio.
| Use this skill when... | Use something else instead when... |
|---|---|
| Designing a new module/class/API surface and choosing what to expose | Hunting correctness bugs → code-quality-plugin:code-review |
| A class boundary "feels" thin — pass-through methods, leaky config | Cyclomatic/cognitive metrics on a function → code-quality-plugin:code-complexity |
| Deciding whether to split or merge two modules | Removing duplication specifically → code-quality-plugin:dry-consolidation |
| Reviewing whether an abstraction earns its keep | Restructuring toward pure functions → code-quality-plugin:code-refactor |
| Signal of a deep module | Signal of a shallow module |
|---|---|
| Few public methods, many private | Public surface ≈ implementation size |
| Caller passes intent, not mechanism | Caller must orchestrate internal steps |
| Defaults handle the common case | Every caller re-specifies the same config |
| Errors handled or masked internally | Exceptions leak the implementation's internals |
| Name describes what, not how | Name encodes the mechanism (HashMapUserCache) |
Two recurring deepening moves: pull complexity downward (the module, not its callers, absorbs the hard case — a class with N callers pays once, they pay N times) and design it twice (sketch two genuinely different interfaces before committing; the second exposes the first's accidental complexity).
Parse $ARGUMENTS:
git diff HEAD + staged)
and say so.Execute this depth assessment:
For the target, list the public surface (methods, params, required config, thrown exceptions, ordering constraints a caller must obey) and estimate the implementation weight behind it. State the depth verdict in one line: deep, shallow, or mixed.
For each shallow point, name the specific cost the caller pays and why it leaks:
init() before run()") (encapsulate)Per finding, give the move (pull complexity down / merge the shallow layer / add a default / design-it-twice the interface) and the resulting smaller interface. Prefer one deeper module over two shallow ones only when they share a secret; do not merge modules that are genuinely independent (that is the opposite failure — a god module).
Emit: target, depth verdict, the shallow points (ordered by caller cost), and the recommended interface change for each. Keep recommendations behaviour- preserving — this is an interface-shape review, not a rewrite.
| Mistake | Correct approach |
|---|---|
| Treating "more, smaller classes" as always better | Classitis makes shallow modules; depth, not count, is the goal |
| Merging two modules that share no secret | That builds a god module — merge only on shared information |
| Adding a config knob "for flexibility" | Each knob is interface cost paid by every caller; default it |
| Exposing an exception because it was easy | Define away or mask errors the caller cannot act on |
| Symptom | Deepening move |
|---|---|
| Pass-through / wrapper method | Collapse the layer |
| Repeated caller config | Push a default downward |
| Leaky exceptions | Mask or translate at the boundary |
| "Call A before B" | Encapsulate the sequence |
| Two interfaces both plausible | Design it twice, pick the smaller surface |
code-quality-plugin:code-complexity — function-level cyclomatic/cognitive
metrics (this skill works at the interface level above that)code-quality-plugin:code-refactor — the mechanical moves that execute a
deepening once it's chosencode-quality-plugin:dry-consolidation — information leakage is often
duplication; dedupe is one deepening movesoftware-design-plugin:design-by-contract — what the deepened interface
should promise its callersWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub laurigates/claude-plugins --plugin software-design-plugin6 skills in this plugin
/design-by-contractDesign with explicit contracts — preconditions, postconditions, invariants, guard clauses. Use when designing a function/class, hardening a boundary, or adding assertions./design-diy-vs-dependencyEvaluate a transparent DIY reimplementation before depending on a heavy single-purpose tool — GUI wrapper, bundled runtime, unaudited or non-cross-platform binary. Use when a task is about to install such a tool, or when auditing an existing dependency for removal./design-legacy-seamsGet legacy code under test before changing it — find seams, write characterization tests. Use when changing untested code, breaking dependencies, or taming legacy./design-patternsSelect a design pattern from a symptom — strategy, observer, factory, adapter, decorator. Use when a structure resists change, or choosing between Gang-of-Four patterns./design-pseudocodeDesign a routine by stepwise refinement — pseudocode the intent before coding, then promote it to comments. Use when designing a complex function or non-trivial algorithm.Other plugins' skills for the same job