[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C31YS2X80DWR5CZ2BPEJV9":3,"skill-same:01M6C31YS2X80DWR5CZ2BPEJV9":68},{"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":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":67},"01M6C31YS2X80DWR5CZ2BPEJV9","principle-separate-before-serializing-shared-state","共享状态先分离后串行化","Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant.","当并发执行方可能写入同一文件、分支、键或状态对象时适用。先消除共享；仅当“单一共享写入者”是真正必须保持的不变量时，才在结构上实施串行化。","IgorGanapolsky\u002FRandom-Timer","IgorGanapolsky","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F201209?v=4","01M6C2WB7720K13ERYVB3AJ0SQ","Igor Ganapolsky","01M6C2WBBF0NWVQV4A89FS00Q5",1,"MIT",null,"https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.claude\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CAAMN19HMY7B3JXN2CBP29","工程实践准则","SCENARIO","使用场景",[31,32,33,34,35,36,37,38],"state","principle separate before serializing shared state","file","sharing","first","branch","write","only","2026-11-10 10:12:30",false,"---\nname: principle-separate-before-serializing-shared-state\ndescription: \"Apply when concurrent actors might write to the same file, branch, key, or state object. Eliminate the sharing first; serialize structurally only when one shared writer is a real invariant.\"\ndisable-model-invocation: true\n---\n\n# Separate Before Serializing Shared State\n\nWhen concurrent actors might share mutable state, first ask whether they need the same mutable object. If not, eliminate the sharing. When sharing is real, enforce serialization structurally: lockfiles, sequential phases, exclusive ownership. Instructions and conventions are not concurrency control.\n\n**Why:** Concurrent writes to shared state create race conditions that are intermittent, hard to reproduce, and expensive to debug.\n\n**Pattern:**\n1. **Identify shared mutable state** (files both read and write, branches both push to, APIs both define and consume).\n2. **Default: eliminate the shared write target.** Ask: do these actors need one canonical object, or are they publishing independent facts? Give each actor its own owned file, key, branch, or state directory, and merge only at the read\u002Freporting boundary. Two workers writing their own `lastX` field into one `state.json` is still shared mutation. `indexer-state.json` + `metrics-state.json` is not.\n3. **Only when one shared write target is a real invariant, serialize access structurally** (lockfiles, sequential phases, single-writer actor, or atomic compare-and-swap). Treat \"we need a lock\" as a design smell to check, not as the default answer.\n","# Separate Before Serializing Shared State\n\nWhen concurrent actors might share mutable state, first ask whether they need the same mutable object. If not, eliminate the sharing. When sharing is real, enforce serialization structurally: lockfiles, sequential phases, exclusive ownership. Instructions and conventions are not concurrency control.\n\n**Why:** Concurrent writes to shared state create race conditions that are intermittent, hard to reproduce, and expensive to debug.\n\n**Pattern:**\n1. **Identify shared mutable state** (files both read and write, branches both push to, APIs both define and consume).\n2. **Default: eliminate the shared write target.** Ask: do these actors need one canonical object, or are they publishing independent facts? Give each actor its own owned file, key, branch, or state directory, and merge only at the read\u002Freporting boundary. Two workers writing their own `lastX` field into one `state.json` is still shared mutation. `indexer-state.json` + `metrics-state.json` is not.\n3. **Only when one shared write target is a real invariant, serialize access structurally** (lockfiles, sequential phases, single-writer actor, or atomic compare-and-swap). Treat \"we need a lock\" as a design smell to check, not as the default answer.\n",{"name":5,"description":7,"disable-model-invocation":44},true,"develop","4af946ac9a2b3cfbbe9b2e8696cc436f1d16e2e2",".claude\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state",0,"https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer","https:\u002F\u002Fapps.apple.com\u002Fus\u002Fapp\u002Frandom-tactical-timer\u002Fid6758355312","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky","https:\u002F\u002Fwww.igorganapolsky.com","Forward Deploy AI Engineer. Automation specialist.\r\n","2026-11-09 23:14:20",{"source":9,"skillName":5,"commands":56,"prompt":66,"zipAvailable":44},[57,60,63],{"tool":58,"command":59},"npx","npx skills add IgorGanapolsky\u002FRandom-Timer --skill principle-separate-before-serializing-shared-state",{"tool":61,"command":62},"bunx","bunx skills add IgorGanapolsky\u002FRandom-Timer --skill principle-separate-before-serializing-shared-state",{"tool":64,"command":65},"pnpm","pnpm dlx skills add IgorGanapolsky\u002FRandom-Timer --skill principle-separate-before-serializing-shared-state","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.claude\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002FSKILL.md",[],[69,87,111,128,145,164],{"skillNo":70,"name":71,"nameZh":72,"description":73,"descriptionZh":74,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":75,"categories":76,"keywords":81,"publishedAt":39},"01M6C3CEGAENG02BPG636N9WG6","writing-plans","任务实施计划编写","Use when you have a spec or requirements for a multi-step task, before touching code","当你有某个多步骤任务的规格说明或需求时，在动手编写代码之前使用。","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[77,78],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":79,"categoryName":80,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BTBRTQXJ9T5TABNS7XP1A0","任务规划与分解",[82,83,84,85,86],"writing plans","writing","spec","code","use",{"skillNo":88,"name":89,"nameZh":90,"description":91,"descriptionZh":92,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":93,"categories":94,"keywords":101,"publishedAt":39},"01M6C3CC40GJBTJQHQ5BF7CQN9","workflow-economics-lite","AI 工作流经济性评估","Escape AI pilot purgatory: require completion-loop workflows with one owner, baseline, economic metric, system-of-record integration, and audit trail. Block orphan chatbots and interest-as-ROI claims.","逃离 AI 试点炼狱：要求构建闭环（completion-loop）工作流，包含单一负责人、基线、经济指标、记录系统（system-of-record）集成和审计轨迹。阻断孤立的聊天机器人以及将“兴趣”当作 ROI 的说法。","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fworkflow-economics-lite\u002FSKILL.md",[95,98],{"categoryNo":96,"categoryName":97,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C01H2CAMD3MSHYA84VYCAR","业务流程设计与优化",{"categoryNo":99,"categoryName":100,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C2MZSX0YJXR444XP83VR5N","产品经理",[102,103,104,105,106,107,108,109,110],"workflow economics lite","workflow","loop","roi","workflows","audit","integration","baseline","system",{"skillNo":112,"name":113,"nameZh":114,"description":115,"descriptionZh":116,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":117,"categories":118,"keywords":123,"publishedAt":39},"01M6C3C9ESBW612NMMMBQDWSWR","verification-before-completion","完成前验证确认","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","当准备声称工作已完成、已修复或已通过时，在提交或创建 PR 之前使用——要求在做出任何成功声明之前先运行验证命令并确认输出；始终遵循“证据先于断言”。","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[119,120],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":121,"categoryName":122,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[124,125,86,126,127],"verification before completion","verification","evidence","work",{"skillNo":129,"name":130,"nameZh":131,"description":132,"descriptionZh":133,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":134,"categories":135,"keywords":140,"publishedAt":39},"01M6C3C71DNQHJ6PGV0TN1R99N","value-center-lite","价值中心五问评估","Apply InfoQ Rohrer value-center \u002F VSM five questions (agency + coherence). Use when planning work, shipping releases, or auditing agent autonomy claims. Fail closed on product-only slogans without WQTU\u002Fpaywall value.","应用 InfoQ Rohrer 的价值中心 \u002F VSM 五问法（自主性 + 一致性）。在规划工作、发布版本或审计智能体自主性声明时使用。对于没有 WQTU\u002F付费墙价值的纯产品口号，采取 fail closed（默认拒绝）的严格判定。","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fvalue-center-lite\u002FSKILL.md",[136,137],{"categoryNo":99,"categoryName":100,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":138,"categoryName":139,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C48JNVH0P83Z0KVKAQ4819","成果验证与价值评估",[141,38,86,127,142,143,144],"value center lite","product","shipping","planning",{"skillNo":146,"name":147,"nameZh":148,"description":149,"descriptionZh":150,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":151,"categories":152,"keywords":159,"publishedAt":39},"01M6C3C41Q0R2J49F3Q4CQ004J","using-superpowers","技能发现与调用规范","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","在每次对话开始时使用——建立如何查找和使用技能的方法，要求在任何回应（包括澄清性问题）之前都必须先调用技能。","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fusing-superpowers\u002FSKILL.md",[153,156],{"categoryNo":154,"categoryName":155,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":157,"categoryName":158,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[160,161,86,162,163],"superpowers","using superpowers","find","how",{"skillNo":165,"name":166,"nameZh":167,"description":168,"descriptionZh":169,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":170,"categories":171,"keywords":176,"publishedAt":39},"01M6C3C1EBYXRVMNHZZE9N49PN","using-git-worktrees","Git 工作树隔离开发","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","在开始需要与当前工作区隔离的功能开发时，或在实施计划执行前使用——通过原生工具或 git worktree 回退机制确保存在隔离的工作区。","https:\u002F\u002Fgithub.com\u002FIgorGanapolsky\u002FRandom-Timer\u002Fblob\u002Fdevelop\u002F.cursor\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[172,173],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":174,"categoryName":175,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BR5V701HCN066VEP7H4812","代码仓库协作管理",[177,178,179,180,181,182,183,127,86],"git","using git worktrees","git worktrees","git worktree","Tools","worktree","workspace"]