[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EXVEWNXFDBTPEETH31QVRJ":3,"skill-same:01M7EXVEWNXFDBTPEETH31QVRJ":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":6,"updatedAt":36,"install":37,"resources":49},"01M7EXVEWNXFDBTPEETH31QVRJ","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.","ravnhq\u002Fravn-core","ravnhq","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F32917297?v=4","01M7EXRETGEZ3CYCQTXRQ83BTJ","Ravn","01M7EXREV559052BB2B6AX8X5K",2,"MIT","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: principle-separate-before-serializing-shared-state\ndescription: >-\n  Apply when concurrent actors might write to the same file, branch, key, or\n  state object. Eliminate the sharing first; serialize structurally only when\n  one shared writer is a real invariant.\ndisable-model-invocation: true\nlicense: See LICENSE.txt\nmetadata:\n  proof: subjective\n---\n\n# Separate Before Serializing Shared State\n\nAdapted from pstack `principle-separate-before-serializing-shared-state`, MIT License, Copyright (c) 2026 Lauren Tan. See [LICENSE.txt](LICENSE.txt).\n\nConcurrent writes to shared state cause races that are intermittent and expensive to debug. Eliminate the sharing first; serialize structurally only when it is real. Instructions and conventions are not concurrency control.\n\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\nAdapted from pstack `principle-separate-before-serializing-shared-state`, MIT License, Copyright (c) 2026 Lauren Tan. See [LICENSE.txt](LICENSE.txt).\n\nConcurrent writes to shared state cause races that are intermittent and expensive to debug. Eliminate the sharing first; serialize structurally only when it is real. Instructions and conventions are not concurrency control.\n\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,"license":25,"metadata":26,"description":7,"disable-model-invocation":28},"See LICENSE.txt",{"proof":27},"subjective",true,"main","8debc762560573209acaf70a1a66f1061d7c8060","plugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state",0,"https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core","https:\u002F\u002Fgithub.com\u002Fravnhq","https:\u002F\u002Fwww.ravn.co","2026-11-13 05:50:45",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":28},[39,42,45],{"tool":40,"command":41},"npx","npx skills add ravnhq\u002Fravn-core --skill principle-separate-before-serializing-shared-state",{"tool":43,"command":44},"bunx","bunx skills add ravnhq\u002Fravn-core --skill principle-separate-before-serializing-shared-state",{"tool":46,"command":47},"pnpm","pnpm dlx skills add ravnhq\u002Fravn-core --skill principle-separate-before-serializing-shared-state","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002FSKILL.md",[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"agents\u002Fopenai.yaml","REFERENCE","参考文档",172,"https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fprinciple-separate-before-serializing-shared-state\u002Fagents\u002Fopenai.yaml",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":16},"LICENSE.txt","LICENSE","许可证",1177,[62,70,78,86,94,102],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":66,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":20},"01M7EXWEDTSBBB0DQENHSBXCV5","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fwriting-for-agents\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":74,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":20},"01M7EXWA9QD5H1Z7ZNZHFV7M5E","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Queries every available evidence MCP in parallel and returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fwhy\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fwhy\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":82,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":20},"01M7EXW7M17CN7V62E25PM4QAJ","typescript-best-practices","TypeScript type-safety rules: discriminated unions, branded types, no `as`, exhaustive switches, schema-derived types. Use when writing, editing, or reviewing TypeScript.","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Ftypescript-best-practices\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Ftypescript-best-practices\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":90,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":20},"01M7EXW4Q6KTG9RM0R1MB29H9D","show-me-your-work","Keep a reviewable decision trail for unattended or multi-phase work: a TSV log with one row per decision (what, why, evidence, result).","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fshow-me-your-work\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fshow-me-your-work\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":98,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":20},"01M7EXW00F0AQWA8F8ANCN2ZZT","ship","Take a change from idea to a ready PR with passing CI, running research, grilling, design, verification, and the pr skill in sequence.","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fship\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fship\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":20},"01M7EXVTVXP3RB0NPVTPG05YC4","session-pickup","Resume unfinished work from a handoff note or prior coding-agent session. Use before reading a supplied handoff, even when its next action is only an inspection or report. Also use to pick up, continue where you left off, or take over from a transcript, agent URL, or pushed branch. Use pause-safely to write a handoff.","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fsession-pickup\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fravnhq\u002Fravn-core\u002Fblob\u002Fmain\u002Fplugins\u002Fagent\u002Fravn-core\u002Fskills\u002Fsession-pickup\u002FSKILL.md",[],[]]