[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DMH9KNBP83SHAW4TGZ4713":3,"skill-same:01M7DMH9KNBP83SHAW4TGZ4713":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},"01M7DMH9KNBP83SHAW4TGZ4713","tdd",null,"仅当用户明确要求 TDD、失败测试或回归测试时使用，或 bug 有明显且廉价的本地测试目标时使用。测试路径不清、昂贵、偏集成或未要求时跳过。","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\u002Ftdd\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: tdd\ndescription: \"仅当用户明确要求 TDD、失败测试或回归测试时使用，或 bug 有明显且廉价的本地测试目标时使用。测试路径不清、昂贵、偏集成或未要求时跳过。\"\ndisable-model-invocation: true\n---\n\n# TDD Bug Fix\n\n修复有清晰、廉价测试路径的 bug 时，先让错误行为可执行，再改生产代码。目标是聚焦的回归测试：修复前失败，修复后通过。\n\n不要强行写测试。若可用测试需要大量 harness、脆弱 mock、慢端到端基础设施、仅生产状态、模糊复现步骤或大量无关 fixture 改动，则跳过新测试，改用最接近的有效验证。\n\n## 工作流\n\n1. **理解 bug。** 识别预期行为、当前行为、受影响路径与最小可观察复现。\n2. **选最窄的可执行检查。** 优先该代码路径已有的最近单元、组件、集成或回归测试。若无明显实用测试路径，不要为满足流程从零创建。\n3. **先写失败测试。** 添加能抓住该 bug 的最小聚焦测试。测试应编码预期行为，而非镜像当前实现。\n4. **修复前跑新测试。** 确认因预期原因失败。若通过或失败原因不对，先修正测试或复现，再改实现。\n5. **修复 bug。** 做满足预期行为的最小生产改动，保留附近契约。\n6. **重跑回归测试。** 确认测试现已通过。\n\n## 若失败测试不现实\n\n改用最接近的可执行回归检查：定向脚本、手动复现命令、浏览器自动化、快照对比、日志断言或聚焦集成检查。\n\n宁可无新测试也不要坏测试。坏测试指：主要测 mock、编码实现细节、依赖 timing 或无关全局状态、小修复却要昂贵基础设施、或证明修复后立刻会被删。\n\n## 护栏\n\n- 不要为匹配错误实现而改测试。\n- 不要削弱现有断言，除非预期行为确实变了且理由清楚。\n- 回归测试聚焦 bug。避免大量 fixture 改动或无关覆盖率扩张。\n- 若 bug  flaky，尽量让测试确定，并文档化所锁定的信号。\n- 若 bug 暴露更广一类失败，先 land 聚焦回归路径，再考虑 sibling 覆盖。\n\n## 最终回复\n\n报告证据，不只结果：\n\n- 点名修复前失败的测试或可执行检查及其失败表现。\n- 点名修复后通过的测试运行及附近验证。\n- 若无法展示修复前证据，说明原因并描述所用的最接近回归检查。\n","# TDD Bug Fix\n\n修复有清晰、廉价测试路径的 bug 时，先让错误行为可执行，再改生产代码。目标是聚焦的回归测试：修复前失败，修复后通过。\n\n不要强行写测试。若可用测试需要大量 harness、脆弱 mock、慢端到端基础设施、仅生产状态、模糊复现步骤或大量无关 fixture 改动，则跳过新测试，改用最接近的有效验证。\n\n## 工作流\n\n1. **理解 bug。** 识别预期行为、当前行为、受影响路径与最小可观察复现。\n2. **选最窄的可执行检查。** 优先该代码路径已有的最近单元、组件、集成或回归测试。若无明显实用测试路径，不要为满足流程从零创建。\n3. **先写失败测试。** 添加能抓住该 bug 的最小聚焦测试。测试应编码预期行为，而非镜像当前实现。\n4. **修复前跑新测试。** 确认因预期原因失败。若通过或失败原因不对，先修正测试或复现，再改实现。\n5. **修复 bug。** 做满足预期行为的最小生产改动，保留附近契约。\n6. **重跑回归测试。** 确认测试现已通过。\n\n## 若失败测试不现实\n\n改用最接近的可执行回归检查：定向脚本、手动复现命令、浏览器自动化、快照对比、日志断言或聚焦集成检查。\n\n宁可无新测试也不要坏测试。坏测试指：主要测 mock、编码实现细节、依赖 timing 或无关全局状态、小修复却要昂贵基础设施、或证明修复后立刻会被删。\n\n## 护栏\n\n- 不要为匹配错误实现而改测试。\n- 不要削弱现有断言，除非预期行为确实变了且理由清楚。\n- 回归测试聚焦 bug。避免大量 fixture 改动或无关覆盖率扩张。\n- 若 bug  flaky，尽量让测试确定，并文档化所锁定的信号。\n- 若 bug 暴露更广一类失败，先 land 聚焦回归路径，再考虑 sibling 覆盖。\n\n## 最终回复\n\n报告证据，不只结果：\n\n- 点名修复前失败的测试或可执行检查及其失败表现。\n- 点名修复后通过的测试运行及附近验证。\n- 若无法展示修复前证据，说明原因并描述所用的最接近回归检查。\n",{"name":5,"description":7,"disable-model-invocation":23},true,"main","e4477188d43269545432a83e4ac5d0733a812d09","skills\u002Ftdd",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 tdd",{"tool":38,"command":39},"bunx","bunx skills add fenfenxu\u002Fpstack-zh --skill tdd",{"tool":41,"command":42},"pnpm","pnpm dlx skills add fenfenxu\u002Fpstack-zh --skill tdd","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Ftdd\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},"01M7DMH7VJ55VC39J4K0SNXSA1","swarm","扇出 N 个并行 worker，收齐后返回一份报告。用于 \u002Fswarm、「swarm this」，或并行覆盖、race、gauntlet 与探索。","https:\u002F\u002Fgithub.com\u002Ffenfenxu\u002Fpstack-zh\u002Fblob\u002Fmain\u002Fskills\u002Fswarm\u002FSKILL.md",[],[]]