[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71Q6V9GNN9RCTTPCR72NC23":3,"skill-same:01M71Q6V9GNN9RCTTPCR72NC23":65},{"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":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":36,"install":37,"resources":50},"01M71Q6V9GNN9RCTTPCR72NC23","prototype",null,"构建一次性原型来回答一个设计问题。适用于用户想验证某个 state model 或 logic 是否感觉对，或探索 UI 应该长什么样时。","vinvcn\u002Fmattpocock-skills-zh-CN","vinvcn","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F120928190?v=4","01M71Q60C4V98DEXHGN2VXFSZB","01M71Q60D6PRAJHKQRY33ZNE59",5797,"MIT","https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Fprototype\u002FSKILL.md",[],[5,18,19,20,21,22,23],"design","state","ui","model","logic","state model","2026-11-10 13:02:02",false,"---\nname: prototype\ndescription: 构建一次性原型来回答一个设计问题。适用于用户想验证某个 state model 或 logic 是否感觉对，或探索 UI 应该长什么样时。\n---\n\n# 原型\n\nPrototype 是**用来回答一个问题的 throwaway code**。问题决定形状。\n\n## 选择分支\n\n先识别正在回答哪个问题：来自用户 prompt、周围代码，或在用户在线时直接询问：\n\n- **\"Does this logic \u002F state model feel right?\"** → [LOGIC.md](LOGIC.md)。构建一个单一、可分享的 HTML 文件（free-play buttons 加 tabbed guided walkthroughs），推动 state machine 跑过纸面上难以推理的 cases，而且非开发人员也能驱动它。\n- **\"What should this look like?\"** → [UI.md](UI.md)。在单一路由上生成几种差异很大的 UI variations，并通过 URL search param 和浮动底栏切换。\n\n这两个分支会产出非常不同的 artifacts；选错会浪费整个 prototype。如果问题确实模糊且用户不可达，默认选择更匹配周围代码的分支（backend module → logic；page 或 component → UI），并在 prototype 顶部说明假设。\n\n## 两个分支通用的规则\n\n1. **从第一天就是 throwaway，并明确标记。** Prototype code 要靠近它实际会被使用的位置（放在被 prototype 的 module 或 page 旁边），这样上下文清楚；但命名要让随手读代码的人看出它是 prototype，不是 production。对 throwaway UI routes，遵守项目现有 routing convention；不要发明新的顶层结构。\n2. **运行毫无负担。** UI prototype 从项目 task runner 中的一条命令启动：`pnpm \u003Cname>`、`python \u003Cpath>`、`bun \u003Cpath>` 等。Logic demo 则是用户双击即可打开的单个 HTML 文件。无论哪种，启动都不需要动脑。\n3. **默认不持久化。** State 保存在内存中。Persistence 是 prototype 要_检查_的东西，不该成为依赖。如果问题明确涉及 database，就用 scratch DB 或带有清晰 “PROTOTYPE, wipe me” 名称的本地文件。\n4. **跳过 polish。** 不写 tests，不做超过“能跑起来”所需的 error handling，不做 abstractions。重点是快速学到东西。\n5. **暴露 state。** 每次 action（logic）或每次 variant switch（UI）后，打印或渲染完整相关 state，让用户看到发生了什么变化。\n6. **完成后 capture。** 把验证过的 decision 折进真实 code，然后把 prototype 本身作为 **primary source** 保存：commit 到 main 之外的 throwaway branch，并在 implementation issue 上留下指向该 branch 的 context pointer。同时在 issue 或 commit 中 capture answer，也就是 verdict 与它解决的问题。Main branch 只保留验证过的 decision。\n","# 原型\n\nPrototype 是**用来回答一个问题的 throwaway code**。问题决定形状。\n\n## 选择分支\n\n先识别正在回答哪个问题：来自用户 prompt、周围代码，或在用户在线时直接询问：\n\n- **\"Does this logic \u002F state model feel right?\"** → [LOGIC.md](LOGIC.md)。构建一个单一、可分享的 HTML 文件（free-play buttons 加 tabbed guided walkthroughs），推动 state machine 跑过纸面上难以推理的 cases，而且非开发人员也能驱动它。\n- **\"What should this look like?\"** → [UI.md](UI.md)。在单一路由上生成几种差异很大的 UI variations，并通过 URL search param 和浮动底栏切换。\n\n这两个分支会产出非常不同的 artifacts；选错会浪费整个 prototype。如果问题确实模糊且用户不可达，默认选择更匹配周围代码的分支（backend module → logic；page 或 component → UI），并在 prototype 顶部说明假设。\n\n## 两个分支通用的规则\n\n1. **从第一天就是 throwaway，并明确标记。** Prototype code 要靠近它实际会被使用的位置（放在被 prototype 的 module 或 page 旁边），这样上下文清楚；但命名要让随手读代码的人看出它是 prototype，不是 production。对 throwaway UI routes，遵守项目现有 routing convention；不要发明新的顶层结构。\n2. **运行毫无负担。** UI prototype 从项目 task runner 中的一条命令启动：`pnpm \u003Cname>`、`python \u003Cpath>`、`bun \u003Cpath>` 等。Logic demo 则是用户双击即可打开的单个 HTML 文件。无论哪种，启动都不需要动脑。\n3. **默认不持久化。** State 保存在内存中。Persistence 是 prototype 要_检查_的东西，不该成为依赖。如果问题明确涉及 database，就用 scratch DB 或带有清晰 “PROTOTYPE, wipe me” 名称的本地文件。\n4. **跳过 polish。** 不写 tests，不做超过“能跑起来”所需的 error handling，不做 abstractions。重点是快速学到东西。\n5. **暴露 state。** 每次 action（logic）或每次 variant switch（UI）后，打印或渲染完整相关 state，让用户看到发生了什么变化。\n6. **完成后 capture。** 把验证过的 decision 折进真实 code，然后把 prototype 本身作为 **primary source** 保存：commit 到 main 之外的 throwaway branch，并在 implementation issue 上留下指向该 branch 的 context pointer。同时在 issue 或 commit 中 capture answer，也就是 verdict 与它解决的问题。Main branch 只保留验证过的 decision。\n",{"name":5,"description":7},"main","c5c5e87cc1df26aeb7dba345ad9f846434d2b3d4","skills\u002Fengineering\u002Fprototype",450,"https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN","https:\u002F\u002Fskills.sh\u002Fvinvcn\u002Fmattpocock-skills-zh-CN","https:\u002F\u002Fgithub.com\u002Fvinvcn","2026-11-10 17:40:42",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add vinvcn\u002Fmattpocock-skills-zh-CN --skill prototype",{"tool":43,"command":44},"bunx","bunx skills add vinvcn\u002Fmattpocock-skills-zh-CN --skill prototype",{"tool":46,"command":47},"pnpm","pnpm dlx skills add vinvcn\u002Fmattpocock-skills-zh-CN --skill prototype","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Fprototype\u002FSKILL.md",true,[51,57,61],{"path":52,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":55,"sourceHtmlUrl":56},"agents\u002Fopenai.yaml","REFERENCE","参考文档",93,"https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Fprototype\u002Fagents\u002Fopenai.yaml",{"path":58,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":59,"sourceHtmlUrl":60},"LOGIC.md",5968,"https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Fprototype\u002FLOGIC.md",{"path":62,"resourceType":53,"resourceTypeDesc":54,"sizeBytes":63,"sourceHtmlUrl":64},"UI.md",6562,"https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fengineering\u002Fprototype\u002FUI.md",[66,90,100,110,120,129],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":85,"publishedAt":24},"01M71Q8F3M8YFP6WYVYQP61KBT","writing-for-agents","为 agent 编写文档。适用于创建或编辑 skills，或修改 AGENTS.md 或 CLAUDE.md 时。","https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fwriting-for-agents\u002FSKILL.md",[72,77,80],{"categoryNo":73,"categoryName":74,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000018","写作与文案","SCENARIO","使用场景",{"categoryNo":78,"categoryName":79,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[86,87,88,89],"for","writing for agents","writing","文档",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":24},"01M71Q8DHRPYE6R648CQ7NAHYN","wait-what","停一下：刚才那条消息没有说清楚，重新表述一遍。","https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fwait-what\u002FSKILL.md",[],[97,98,99],"wait","wait what","true",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":24},"01M71Q8C8CBSRJRP8Y0JRZ7RJ7","to-questionnaire","把你无法完整回答的 decision 转成一份交给他人填写的 questionnaire。","https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fto-questionnaire\u002FSKILL.md",[],[107,108,109,99],"questionnaire","to questionnaire","decision",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":119,"publishedAt":24},"01M71Q8ASS9A6P84PSC02YFKHB","teach","在这个工作区中教用户一个新技能或概念。","https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fteach\u002FSKILL.md",[116],{"categoryNo":117,"categoryName":118,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000039","教师与教育",[112,99],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":24},"01M71Q89C2C2QRR3J3H64ZKH0P","handoff","把当前对话压缩成交接文档，让另一个代理接手。","https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fhandoff\u002FSKILL.md",[],[122,99,127,128,89],"对话","压缩",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":24},"01M71Q883CXWF0BGDQC3Y8TJZ2","grilling","围绕计划、decision 或 idea 持续追问用户。适用于用户想对自己的思路做压力测试，或使用任何 “grill” 触发措辞时。","https:\u002F\u002Fgithub.com\u002Fvinvcn\u002Fmattpocock-skills-zh-CN\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fgrilling\u002FSKILL.md",[],[131,136,137,109,138],"idea","grill","testing"]