[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75R4CMEAVMCD6X9K0K9RJSV":3,"skill-same:01M75R4CMEAVMCD6X9K0K9RJSV":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"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":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M75R4CMEAVMCD6X9K0K9RJSV","principle-separate-before-serializing-shared-state",null,"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.","TheDarkSkyXD\u002FSuperDevAgents","TheDarkSkyXD","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34119991?v=4","01M75491CAR2M915CJW2NKRTE7","01M75R09ATEWYMSRKW981X1EPY",1,"MIT","https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002FSKILL.md",[],[],"2026-11-12 13:55:43",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.\"\nuser-invocable: false\n---\n\n# Separate Before Serializing Shared State\n\nRead [the portable runtime contract](..\u002Fsuperdev-mode\u002Freferences\u002Fportable-runtime.md) before following this workflow.\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\nRead [the portable runtime contract](..\u002Fsuperdev-mode\u002Freferences\u002Fportable-runtime.md) before following this workflow.\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,"user-invocable":19},"main","5440d26a8d527a55c691e544ae0e4e23e89e7157",".agents\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state",0,"https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents","https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD","2026-11-12 09:54:48",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add TheDarkSkyXD\u002FSuperDevAgents --skill principle-separate-before-serializing-shared-state",{"tool":36,"command":37},"bunx","bunx skills add TheDarkSkyXD\u002FSuperDevAgents --skill principle-separate-before-serializing-shared-state",{"tool":39,"command":40},"pnpm","pnpm dlx skills add TheDarkSkyXD\u002FSuperDevAgents --skill principle-separate-before-serializing-shared-state","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M75RDJ9BA2E6J9NNCB1N7K56","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperdev\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M75RDFHCYADBVWTXG3AAZC09","what-did-i-get-done","Summarize authored commits over a user-specified time period into a concise update","https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperdev\u002Fskills\u002Fwhat-did-i-get-done\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M75RDDK5WRB8PJ8PN7N6EWNZ","wayfinder","Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperdev\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M75RD9SZ9223AT30NA53XJ44","unslop","Cut AI tells from any writing.","https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperdev\u002Fskills\u002Funslop\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M75RD7H5QRBN7DDGHX76JE4J","universal-architecture","Apply responsibility-based architecture and enforce import boundaries. Use for code placement, architecture reviews, adapters, CLI entry points, platform sharing, and ESLint boundary rules.","https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperdev\u002Fskills\u002Funiversal-architecture\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M75RD5G2WGMRJKS5F7R7EW6N","typescript-best-practices","TypeScript best practices. Use when reading or editing any .ts or .tsx file.","https:\u002F\u002Fgithub.com\u002FTheDarkSkyXD\u002FSuperDevAgents\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperdev\u002Fskills\u002Ftypescript-best-practices\u002FSKILL.md",[],[]]