[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DMFHD1ATBQ43YKX4ZZK3X2":3,"skill-same:01M7DMFHD1ATBQ43YKX4ZZK3X2":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":44},"01M7DMFHD1ATBQ43YKX4ZZK3X2","principle-boundary-discipline",null,"在接入验证、错误处理或框架适配器时适用。将守卫集中在系统边界（CLI、配置、网络、外部 API）；信任内部类型，业务逻辑放在纯函数中。","fenfenxu\u002Fpstack-zh","fenfenxu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F2194243?v=4","01M7DMDSWBASX3NXC18FPHDJ8G","01M7DMDSWV8ASCZ4PH6YFXHPSJ",3,"MIT","https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Fprinciple-boundary-discipline\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: principle-boundary-discipline\ndescription: \"在接入验证、错误处理或框架适配器时适用。将守卫集中在系统边界（CLI、配置、网络、外部 API）；信任内部类型，业务逻辑放在纯函数中。\"\ndisable-model-invocation: true\n---\n\n# 边界纪律\n\n将验证、类型收窄和错误处理放在系统边界。无条件信任内部代码。业务逻辑放在纯函数中。外壳层应薄而机械。\n\n**原因：** 分散的验证既嘈杂又冗余，还会制造虚假的安全感。把逻辑从框架接线中剥离，才能在不依赖框架的情况下测试。\n\n**模式：**\n- **在边界处**（CLI 参数、配置文件、外部 API、网络协议）：验证、返回错误、防御性处理。\n- **系统内部：** 类型化数据、错误传播、不重复验证。信任类型。\n- **跨越边界。** 暴露领域概念，而非边界的私有表示。通用机制留在内部，专用策略放在边缘。\n\n**应用：**\n\n验证与错误处理：\n- 在解析时验证配置（边界处），而非业务逻辑内部\n- 在边界将原始数据解析为领域类型\n- 不要通过公共面向重新导出传输、存储、框架或 wire 类型\n- 若边界已验证，调用链深处不要冗余 nil 检查\n\n代码组织：\n- 业务逻辑放在无框架依赖的纯函数中\n- 解析函数：从原始字节到类型化状态的纯变换\n- 提示词构建：结构化状态进，字符串出\n- 评分与评估：从状态到结果的纯变换\n\n**检验：**\n- 「这些数据此刻是否正在跨越系统边界？」若不是，验证就是冗余的。\n- 「这能否做成纯函数，由外壳层直接调用？」若能，就提取出来。\n","# 边界纪律\n\n将验证、类型收窄和错误处理放在系统边界。无条件信任内部代码。业务逻辑放在纯函数中。外壳层应薄而机械。\n\n**原因：** 分散的验证既嘈杂又冗余，还会制造虚假的安全感。把逻辑从框架接线中剥离，才能在不依赖框架的情况下测试。\n\n**模式：**\n- **在边界处**（CLI 参数、配置文件、外部 API、网络协议）：验证、返回错误、防御性处理。\n- **系统内部：** 类型化数据、错误传播、不重复验证。信任类型。\n- **跨越边界。** 暴露领域概念，而非边界的私有表示。通用机制留在内部，专用策略放在边缘。\n\n**应用：**\n\n验证与错误处理：\n- 在解析时验证配置（边界处），而非业务逻辑内部\n- 在边界将原始数据解析为领域类型\n- 不要通过公共面向重新导出传输、存储、框架或 wire 类型\n- 若边界已验证，调用链深处不要冗余 nil 检查\n\n代码组织：\n- 业务逻辑放在无框架依赖的纯函数中\n- 解析函数：从原始字节到类型化状态的纯变换\n- 提示词构建：结构化状态进，字符串出\n- 评分与评估：从状态到结果的纯变换\n\n**检验：**\n- 「这些数据此刻是否正在跨越系统边界？」若不是，验证就是冗余的。\n- 「这能否做成纯函数，由外壳层直接调用？」若能，就提取出来。\n",{"name":5,"description":7,"disable-model-invocation":23},true,"main","e4477188d43269545432a83e4ac5d0733a812d09","skills\u002Fprinciple-boundary-discipline",0,"https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh","http:\u002F\u002Fpstack.ganhai.cloud","https:\u002F\u002Fgithub.com\u002Ffenfenxu","2026-10-21 12:14:41",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":23},[34,37,40],{"tool":35,"command":36},"npx","npx skills add fenfenxu\u002Fpstack-zh --skill principle-boundary-discipline",{"tool":38,"command":39},"bunx","bunx skills add fenfenxu\u002Fpstack-zh --skill principle-boundary-discipline",{"tool":41,"command":42},"pnpm","pnpm dlx skills add fenfenxu\u002Fpstack-zh --skill principle-boundary-discipline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Fprinciple-boundary-discipline\u002FSKILL.md",[],[46,53,60,67,74,81],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7DMHJV7QMEE1F43FFW98FV8","why","用于「为什么 X 是这样实现的」「为什么选了 Y」、设计理由、回归、事后复盘，或数据支撑的阈值问题。发现可用 MCP 并并行查询各证据类别（源码控制、工单跟踪、长文文档、实时聊天、基础设施可观测性、错误跟踪、产品分析数仓），然后返回带引用的决策与权衡解读。运行时行为请用 how。","https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M7DMHHRSS2SCZN6HWSANBJ35","unslop","从任意写作中剔除 AI 痕迹。","https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Funslop\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M7DMHGFGH2YT86WQ6A53693W","typescript-best-practices","TypeScript 最佳实践。读取或编辑任意 .ts 或 .tsx 文件时使用。","https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Ftypescript-best-practices\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7DMHEA1EGG2D9XQ33N66GDS","technical-writing","分层技术写作标准：Diátaxis 结构、Google 开发者风格句子、STE 指令规则、Global English 句法。用于 \u002Ftechnical-writing，或撰写\u002F审查文档、RFC、README、PR 描述、commit message 时。","https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Ftechnical-writing\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":18},"01M7DMHCEXE1YRDR6XC1RXBG76","teach","用平实语言解释一段工作，让人真正理解。运行 how 与 why skill，把发现织成一份清晰说明。用于「teach me this」「help me really understand X」「explain this change or subsystem to me」。","https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Fteach\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":18},"01M7DMH9KNBP83SHAW4TGZ4713","tdd","仅当用户明确要求 TDD、失败测试或回归测试时使用，或 bug 有明显且廉价的本地测试目标时使用。测试路径不清、昂贵、偏集成或未要求时跳过。","https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\u002FSKILL.md",[],[]]