This teaches Claude to think about code structure using "deep modules" as a design principle: putting lots of behavior behind small interfaces, placing those interfaces at clear seams, and testing through them. It's a translation of Matt Pocock's methodology with a specific vocabulary (module, interface, implementation, depth, seam, adapter) that you're meant to use consistently instead of vague terms like "component" or "service." The idea is to give callers leverage and maintainers locality. If you've read "A Philosophy of Software Design" this will feel familiar. It's opinionated about language precision, which either clicks with how you think or feels overly academic.

skills.sh installs
4.3K
GitHub stars
5.7K
last updated
Aug 21, 2026

Install

$ npx -y skills add vinvcn/mattpocock-skills-zh-cn --skill codebase-design --agent claude-code

Installs into .claude/skills of the current project.

Files

代码库设计

设计 deep modules:把大量行为放在小 interface 之后,把 interface 放在清晰 seam 上,并通过该 interface 测试。凡是在设计或重构代码时,都使用这套语言和原则。目标是给 callers 带来 leverage,给 maintainers 带来 locality,并让每个人都更容易测试。

术语表

准确使用这些术语,不要替换成 "component"、"service"、"API" 或 "boundary"。一致语言就是重点。

Module - 任何拥有 interface 和 implementation 的东西。它故意不限定尺度:function、class、package,或跨层 slice 都可以。Avoid: unit, component, service.

Interface - caller 为了正确使用 module 必须知道的一切:type signature,以及 invariants、ordering constraints、error modes、required configuration 和 performance characteristics。Avoid: API, signature(太窄,只指 type-level surface)。

Implementation - module 内部的代码体。它不同于 Adapter:一个东西可以是小 adapter 但有大 implementation(Postgres repo),也可以是大 adapter 但 implementation 很小(in-memory fake)。讨论 seam 时说 adapter;其他时候说 implementation。

Depth - interface 上的 leverage:caller(或 test)每学习一单位 interface,就能触达多少行为。大量行为藏在小 interface 后面时,module 是 deep;interface 几乎和 implementation 一样复杂时,module 是 shallow。

Seam(Michael Feathers)- 你可以在不编辑当前位置的情况下改变行为的地方;也就是 module 的 interface 所在的 location。seam 放在哪里是独立设计决策,不同于 seam 后面放什么。Avoid: boundary(它和 DDD bounded context 过载)。

Sponsors

Details

Repository
github.com/vinvcn/mattpocock-skills-zh-cn
Category
Design & UI/UX
First seen
Jul 14, 2026

More from vinvcn/mattpocock-skills-zh-cn

All 39
1omer-metin avatargame-ui-designomer-metin/skills-for-antigravityWorld-class game UI design expertise combining the clarity of Nintendo's UI philosophy, the immersive diegetic interfaces of Dead Space and Metroid Prime, and t4.3Kskills.sh installs
2dpearson2699 avatarcore-motiondpearson2699/swift-ios-skillsAccess Core Motion accelerometer, gyroscope, magnetometer, device-motion, pedometer, activity-recognition, altitude, headphone motion, batched high-frequency wo3.8Kskills.sh installs
3enzed avatarr3f-interactionenzed/r3f-skillsReact Three Fiber interaction - pointer events, controls, gestures, selection. Use when handling user input, implementing click detection, adding camera control3.4Kskills.sh installs
4nexu-io avatarswiftui-designnexu-io/open-designSwiftUI 前端设计 skill — anti AI-slop rules, design direction advisor, brand asset protocol, and five-dimension review. Works with Claude Code, Cursor, Codex, and O3Kskills.sh installs
5content-designer avatarux-writingcontent-designer/ux-writing-skillux writing3Kskills.sh installs
6dpearson2699 avatarswift-api-design-guidelinesdpearson2699/swift-ios-skillsApply Swift API Design Guidelines to name, label, and document Swift APIs. Covers argument label rules (prepositional phrase rule, grammatical phrase rule, firs3Kskills.sh installs