用于设计深模块的共享词汇。适用于用户想设计或改进模块接口、寻找深化机会、决定 seam 放在哪里、让代码更容易测试或更适合 AI 导航,或其他技能需要深模块词汇时。
This skill is a shared-vocabulary and design-principles reference (a Chinese-language translation of Matt Pocock's skills) for designing "deep modules": putting a large amount of behavior behind a small interface, placing that interface on a clean seam, and testing through it. It solves the problem of imprecise architecture conversations by fixing a glossary (module, interface, implementation, depth, seam, adapter, leverage, locality) and insisting on consistent terminology instead of loose words like component, service, API, or boundary.
Its main content is conceptual guidance: the deep-versus-shallow module distinction, principles such as the deletion test and "interface is the test surface," the rule that one adapter is a hypothetical seam while two make it real, and concrete testability heuristics (accept dependencies rather than create them, return results rather than cause side effects, keep surface area small). Two bundled references go deeper: DEEPENING.md categorizes dependencies (in-process, local-substitutable, remote-but-owned via ports and adapters, and true-external requiring mocks) and prescribes a replace-don't-layer testing strategy, while DESIGN-IT-TWICE.md describes a parallel sub-agent pattern that generates several radically different interface designs under different constraints and then compares them by depth, locality, and seam placement.
Target users are engineers and AI agents designing or refactoring module interfaces, looking for deepening opportunities, deciding where seams belong, or making code more testable and easier to navigate. It is a pure concept/reference skill with no executable code.
A module with a small interface hiding a large amount of implementation, giving callers leverage (much behavior per unit of interface learned) and maintainers locality (changes concentrated in one place).
Only when something real varies across it. The rule is 'one adapter means a hypothetical seam, two adapters means a real one' — a single-adapter seam is just indirection, so a port is typically justified when both a production and a test adapter make sense.
Into four categories in DEEPENING.md: in-process (always deepenable, no adapter), local-substitutable (test stand-ins like PGLite), remote-but-owned (define a port with production and in-memory adapters), and true external third parties (inject a port with a mock adapter).
A parallel sub-agent approach where 3+ agents each produce a radically different interface design under a distinct constraint (minimal, maximally flexible, optimized for the common caller, ports-and-adapters), which are then compared by depth, locality, and seam placement.
It avoids 'component', 'service', 'unit', 'API', 'signature', and 'boundary' in favor of the precise glossary terms, since consistent language is the whole point.
Quick Setup:
.claude/skills/Repository
vinvcn/mattpocock-skills-zh-cn