[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C3D4EM8T6DTM10XH5PFH1F":3,"skill-same:01M6C3D4EM8T6DTM10XH5PFH1F":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":15,"repositoryHtmlUrl":47,"repositoryHomepageUrl":17,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":17,"updatedAt":50,"install":51,"resources":64},"01M6C3D4EM8T6DTM10XH5PFH1F","codebase-design","深度模块接口设计","Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.","用于设计深度模块（deep module）的共享词汇。当用户想要设计或改进某个模块的接口、寻找深化机会、决定接缝（seam）应置于何处、使代码更易于测试或更便于 AI 导航，或当其他技能需要深度模块相关词汇时使用。","thegiantbeast\u002Fdotfiles","thegiantbeast","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F31733?v=4","01M6C3CJSWCN22VMJ7DZ7KJX02","Ricardo Ferreira","01M6C3CJY6G03VP48FRFK8HEGE",0,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpocock-picks\u002Fskills\u002Fengineering\u002Fcodebase-design\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C4ZVS0ZJKF2T2G58PW5VR2","系统架构师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C535MHXGXDSGN98VJTMCSK","系统架构设计模式","SCENARIO","使用场景",[31,32,33,34,35,36,37,38],"design","codebase design","code","improve","find","decide","user","use","2026-11-10 10:12:30",false,"---\nname: codebase-design\ndescription: Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.\n---\n\n# Codebase Design\n\nDesign **deep modules**: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone.\n\n## Glossary\n\nUse these terms exactly — don't substitute \"component,\" \"service,\" \"API,\" or \"boundary.\" Consistent language is the whole point.\n\n**Module** — anything with an interface and an implementation. Deliberately scale-agnostic: a function, class, package, or tier-spanning slice. _Avoid_: unit, component, service.\n\n**Interface** — everything a caller must know to use the module correctly: the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. _Avoid_: API, signature (too narrow — they refer only to the type-level surface).\n\n**Implementation** — what's inside a module, its body of code. Distinct from **Adapter**: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for \"adapter\" when the seam is the topic; \"implementation\" otherwise.\n\n**Depth** — leverage at the interface: the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is **deep** when a large amount of behaviour sits behind a small interface, **shallow** when the interface is nearly as complex as the implementation.\n\n**Seam** _(Michael Feathers)_ — a place where you can alter behaviour without editing in that place; the *location* at which a module's interface lives. Where to put the seam is its own design decision, distinct from what goes behind it. _Avoid_: boundary (overloaded with DDD's bounded context).\n\n**Adapter** — a concrete thing that satisfies an interface at a seam. Describes *role* (what slot it fills), not substance (what's inside).\n\n**Leverage** — what callers get from depth: more capability per unit of interface they learn. One implementation pays back across N call sites and M tests.\n\n**Locality** — what maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place rather than spreading across callers. Fix once, fixed everywhere.\n\n## Deep vs shallow\n\n**Deep module** = small interface + lots of implementation:\n\n```\n┌─────────────────────┐\n│   Small Interface   │  ← Few methods, simple params\n├─────────────────────┤\n│                     │\n│  Deep Implementation│  ← Complex logic hidden\n│                     │\n└─────────────────────┘\n```\n\n**Shallow module** = large interface + little implementation (avoid):\n\n```\n┌─────────────────────────────────┐\n│       Large Interface           │  ← Many methods, complex params\n├─────────────────────────────────┤\n│  Thin Implementation            │  ← Just passes through\n└─────────────────────────────────┘\n```\n\nWhen designing an interface, ask:\n\n- Can I reduce the number of methods?\n- Can I simplify the parameters?\n- Can I hide more complexity inside?\n\n## Principles\n\n- **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface.\n- **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.\n- **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape.\n- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.\n\n## Designing for testability\n\nGood interfaces make testing natural:\n\n1. **Accept dependencies, don't create them.**\n\n   ```typescript\n   \u002F\u002F Testable\n   function processOrder(order, paymentGateway) {}\n\n   \u002F\u002F Hard to test\n   function processOrder(order) {\n     const gateway = new StripeGateway();\n   }\n   ```\n\n2. **Return results, don't produce side effects.**\n\n   ```typescript\n   \u002F\u002F Testable\n   function calculateDiscount(cart): Discount {}\n\n   \u002F\u002F Hard to test\n   function applyDiscount(cart): void {\n     cart.total -= discount;\n   }\n   ```\n\n3. **Small surface area.** Fewer methods = fewer tests needed. Fewer params = simpler test setup.\n\n## Relationships\n\n- A **Module** has exactly one **Interface** (the surface it presents to callers and tests).\n- **Depth** is a property of a **Module**, measured against its **Interface**.\n- A **Seam** is where a **Module**'s **Interface** lives.\n- An **Adapter** sits at a **Seam** and satisfies the **Interface**.\n- **Depth** produces **Leverage** for callers and **Locality** for maintainers.\n\n## Rejected framings\n\n- **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.\n- **\"Interface\" as the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here includes every fact a caller must know.\n- **\"Boundary\"**: overloaded with DDD's bounded context. Say **seam** or **interface**.\n\n## Going deeper\n\n- **Deepening a cluster given its dependencies** — see [DEEPENING.md](DEEPENING.md): dependency categories, seam discipline, and replace-don't-layer testing.\n- **Exploring alternative interfaces** — see [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md): spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.\n","# Codebase Design\n\nDesign **deep modules**: a lot of behaviour behind a small interface, placed at a clean seam, testable through that interface. Use this language and these principles wherever code is being designed or restructured. The aim is leverage for callers, locality for maintainers, and testability for everyone.\n\n## Glossary\n\nUse these terms exactly — don't substitute \"component,\" \"service,\" \"API,\" or \"boundary.\" Consistent language is the whole point.\n\n**Module** — anything with an interface and an implementation. Deliberately scale-agnostic: a function, class, package, or tier-spanning slice. _Avoid_: unit, component, service.\n\n**Interface** — everything a caller must know to use the module correctly: the type signature, but also invariants, ordering constraints, error modes, required configuration, and performance characteristics. _Avoid_: API, signature (too narrow — they refer only to the type-level surface).\n\n**Implementation** — what's inside a module, its body of code. Distinct from **Adapter**: a thing can be a small adapter with a large implementation (a Postgres repo) or a large adapter with a small implementation (an in-memory fake). Reach for \"adapter\" when the seam is the topic; \"implementation\" otherwise.\n\n**Depth** — leverage at the interface: the amount of behaviour a caller (or test) can exercise per unit of interface they have to learn. A module is **deep** when a large amount of behaviour sits behind a small interface, **shallow** when the interface is nearly as complex as the implementation.\n\n**Seam** _(Michael Feathers)_ — a place where you can alter behaviour without editing in that place; the *location* at which a module's interface lives. Where to put the seam is its own design decision, distinct from what goes behind it. _Avoid_: boundary (overloaded with DDD's bounded context).\n\n**Adapter** — a concrete thing that satisfies an interface at a seam. Describes *role* (what slot it fills), not substance (what's inside).\n\n**Leverage** — what callers get from depth: more capability per unit of interface they learn. One implementation pays back across N call sites and M tests.\n\n**Locality** — what maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place rather than spreading across callers. Fix once, fixed everywhere.\n\n## Deep vs shallow\n\n**Deep module** = small interface + lots of implementation:\n\n```\n┌─────────────────────┐\n│   Small Interface   │  ← Few methods, simple params\n├─────────────────────┤\n│                     │\n│  Deep Implementation│  ← Complex logic hidden\n│                     │\n└─────────────────────┘\n```\n\n**Shallow module** = large interface + little implementation (avoid):\n\n```\n┌─────────────────────────────────┐\n│       Large Interface           │  ← Many methods, complex params\n├─────────────────────────────────┤\n│  Thin Implementation            │  ← Just passes through\n└─────────────────────────────────┘\n```\n\nWhen designing an interface, ask:\n\n- Can I reduce the number of methods?\n- Can I simplify the parameters?\n- Can I hide more complexity inside?\n\n## Principles\n\n- **Depth is a property of the interface, not the implementation.** A deep module can be internally composed of small, mockable, swappable parts — they just aren't part of the interface. A module can have **internal seams** (private to its implementation, used by its own tests) as well as the **external seam** at its interface.\n- **The deletion test.** Imagine deleting the module. If complexity vanishes, it was a pass-through. If complexity reappears across N callers, it was earning its keep.\n- **The interface is the test surface.** Callers and tests cross the same seam. If you want to test *past* the interface, the module is probably the wrong shape.\n- **One adapter means a hypothetical seam. Two adapters means a real one.** Don't introduce a seam unless something actually varies across it.\n\n## Designing for testability\n\nGood interfaces make testing natural:\n\n1. **Accept dependencies, don't create them.**\n\n   ```typescript\n   \u002F\u002F Testable\n   function processOrder(order, paymentGateway) {}\n\n   \u002F\u002F Hard to test\n   function processOrder(order) {\n     const gateway = new StripeGateway();\n   }\n   ```\n\n2. **Return results, don't produce side effects.**\n\n   ```typescript\n   \u002F\u002F Testable\n   function calculateDiscount(cart): Discount {}\n\n   \u002F\u002F Hard to test\n   function applyDiscount(cart): void {\n     cart.total -= discount;\n   }\n   ```\n\n3. **Small surface area.** Fewer methods = fewer tests needed. Fewer params = simpler test setup.\n\n## Relationships\n\n- A **Module** has exactly one **Interface** (the surface it presents to callers and tests).\n- **Depth** is a property of a **Module**, measured against its **Interface**.\n- A **Seam** is where a **Module**'s **Interface** lives.\n- An **Adapter** sits at a **Seam** and satisfies the **Interface**.\n- **Depth** produces **Leverage** for callers and **Locality** for maintainers.\n\n## Rejected framings\n\n- **Depth as ratio of implementation-lines to interface-lines** (Ousterhout): rewards padding the implementation. We use depth-as-leverage instead.\n- **\"Interface\" as the TypeScript `interface` keyword or a class's public methods**: too narrow — interface here includes every fact a caller must know.\n- **\"Boundary\"**: overloaded with DDD's bounded context. Say **seam** or **interface**.\n\n## Going deeper\n\n- **Deepening a cluster given its dependencies** — see [DEEPENING.md](DEEPENING.md): dependency categories, seam discipline, and replace-don't-layer testing.\n- **Exploring alternative interfaces** — see [DESIGN-IT-TWICE.md](DESIGN-IT-TWICE.md): spin up parallel sub-agents to design the interface several radically different ways, then compare on depth, locality, and seam placement.\n",{"name":5,"description":7},"main","215248b05d6d96e163fec33f3c171019a95abd72",".claude\u002Fskills\u002Fpocock-picks\u002Fskills\u002Fengineering\u002Fcodebase-design","https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fthegiantbeast","https:\u002F\u002Fthegiantbeast.tech","2026-11-14 22:47:32",{"source":9,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add thegiantbeast\u002Fdotfiles --skill codebase-design",{"tool":57,"command":58},"bunx","bunx skills add thegiantbeast\u002Fdotfiles --skill codebase-design",{"tool":60,"command":61},"pnpm","pnpm dlx skills add thegiantbeast\u002Fdotfiles --skill codebase-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpocock-picks\u002Fskills\u002Fengineering\u002Fcodebase-design\u002FSKILL.md",true,[65,71],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"DEEPENING.md","REFERENCE","参考文档",2559,"https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpocock-picks\u002Fskills\u002Fengineering\u002Fcodebase-design\u002FDEEPENING.md",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"DESIGN-IT-TWICE.md",2712,"https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpocock-picks\u002Fskills\u002Fengineering\u002Fcodebase-design\u002FDESIGN-IT-TWICE.md",[76,83,113,135,149,162],{"skillNo":77,"name":78,"nameZh":17,"description":17,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":82},"01M7DRX19Z4CVSNJQTYT6S1Z2A","context7-mcp","https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcontext7-mcp\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":84,"name":85,"nameZh":86,"description":87,"descriptionZh":88,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":89,"categories":90,"keywords":97,"publishedAt":39},"01M6CA623HKJ9PE7HJC00DXM04","web-quality-audit","网站质量全面审计","Comprehensive web quality audit covering performance, accessibility, SEO, and best practices. Use when asked to \"audit my site\", \"review web quality\", \"run lighthouse audit\", \"check page quality\", or \"optimize my website\".","全面审计 Web 质量，涵盖性能、无障碍性、SEO 和最佳实践。当用户要求“审计我的网站”“审查网站质量”“运行 lighthouse 审计”“检查页面质量”或“优化我的网站”时使用。","https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweb-quality-picks\u002Fskills\u002Fweb-quality-audit\u002FSKILL.md",[91,94],{"categoryNo":92,"categoryName":93,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CB4BZD3VTQB2NVP9R77FKR","网站质量审计与优化",[98,99,100,101,102,103,104,105,106,38,107,108,109,110,111,112],"quality","web","audit","web quality audit","check","review","best practices","page","Lighthouse","site","accessibility","performance","run","seo","website",{"skillNo":114,"name":111,"nameZh":115,"description":116,"descriptionZh":117,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":118,"categories":119,"keywords":126,"publishedAt":39},"01M6CA5Z9ZK57YANF0QTVXNNKJ","网站 SEO 优化","Optimize for search engine visibility and ranking. Use when asked to \"improve SEO\", \"optimize for search\", \"fix meta tags\", \"add structured data\", \"sitemap optimization\", or \"search engine optimization\".","针对搜索引擎可见性和排名进行优化。当用户要求“改进 SEO”“针对搜索优化”“修复 meta 标签”“添加结构化数据”“站点地图优化”或“搜索引擎优化”时使用。","https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweb-quality-picks\u002Fskills\u002Fseo\u002FSKILL.md",[120,123],{"categoryNo":121,"categoryName":122,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD6C0J544QTJ9R38Z7ZG","营销专员",{"categoryNo":124,"categoryName":125,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C7B8WHD09FSZNCR5W8KX8K","网站 SEO 审计与优化",[111,99,127,128,129,130,131,34,38,132,133,98,134],"Optimization","search","Meta","fix","structured data","Meta Tags","engine","data",{"skillNo":136,"name":109,"nameZh":137,"description":138,"descriptionZh":139,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":140,"categories":141,"keywords":146,"publishedAt":39},"01M6CA5W80QAXDSZC196SY8DZC","Web 性能优化","Optimize web performance for faster loading and better user experience. Use when asked to \"speed up my site\", \"optimize performance\", \"reduce load time\", \"fix slow loading\", \"improve page speed\", or \"performance audit\".","优化 Web 性能以加快加载速度并改善用户体验。当用户要求“加速我的网站”“优化性能”“减少加载时间”“修复加载缓慢”“提升页面速度”或“性能审计”时使用。","https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweb-quality-picks\u002Fskills\u002Fperformance\u002FSKILL.md",[142,143],{"categoryNo":92,"categoryName":93,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":144,"categoryName":145,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C796JZ1YCTM2B2X7TKEWZZ","性能剖析与优化",[109,100,37,147,105,148,130,34,38,99,98,107],"web performance","up",{"skillNo":150,"name":151,"nameZh":152,"description":153,"descriptionZh":154,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":155,"categories":156,"keywords":159,"publishedAt":39},"01M6CA5SHNJN3B562C279YE2BV","core-web-vitals","核心网页指标优化","Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking. Use when asked to \"improve Core Web Vitals\", \"fix LCP\", \"reduce CLS\", \"optimize INP\", \"page experience optimization\", or \"fix layout shifts\".","优化核心网页指标（LCP、INP、CLS），改善页面体验和搜索排名。当用户要求“改善核心网页指标”“修复 LCP”“降低 CLS”“优化 INP”“页面体验优化”或“修复布局偏移”时使用。","https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweb-quality-picks\u002Fskills\u002Fcore-web-vitals\u002FSKILL.md",[157,158],{"categoryNo":92,"categoryName":93,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},[160,161,99,127,105,98,128,130,34,38],"core web vitals","core",{"skillNo":163,"name":164,"nameZh":165,"description":166,"descriptionZh":167,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":168,"categories":169,"keywords":172,"publishedAt":39},"01M6CA5PSD25C6WSNBEHKHR8QK","best-practices","Web 开发最佳实践","Apply modern web development best practices for security, compatibility, and code quality. Use when asked to \"apply best practices\", \"security audit\", \"modernize code\", \"code quality review\", or \"check for vulnerabilities\".","应用现代 Web 开发最佳实践，涵盖安全性、兼容性和代码质量。当用户要求“应用最佳实践”“安全审计”“代码现代化”“代码质量审查”或“检查漏洞”时使用。","https:\u002F\u002Fgithub.com\u002Fthegiantbeast\u002Fdotfiles\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fweb-quality-picks\u002Fskills\u002Fbest-practices\u002FSKILL.md",[170,171],{"categoryNo":92,"categoryName":93,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":95,"categoryName":96,"taxonomyType":28,"taxonomyTypeDesc":29},[104,173,174,175,38,33,103,102,99,100,98,176,177,178],"code quality","development","security audit","vulnerabilities","web development","security"]