principle-separate-before-serializing-shared-state
Skill8 starsChanged yesterdayMITView on GitHub
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.
65 other projects use a version of this, 50 of them edited; 45 of 50 edited versions we compared changed its rules.
How people change it
45 of 50 edited versions changed its rules, and some changes recur.
Of the 50 edited versions we compared: 5 keep every rule, 45 made changes of their own.
Rules people drop
- Only when one shared write target is a real invariant, serialize access structurally (a lockfile, a single writer, sequential phases, compare-and-swap). Instructions are not concurrency control, and "we need a lock" is a smell to check first.dropped by 45 of 45
Rules people add
- When 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. …added by 45 of 45
We split this file and each edited version into the rules they give an agent and match them by wording. A version that adds no rule of its own and has not changed since this file last did reads as an older text, so what it lacks is not counted as dropped. We keep no past texts of a file, so that is inferred, and an edited version that started from an older text still counts its gaps as drops.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- BabylonSocial/babylonedited, first seen Nov 30, 2026
- MondayNotAGoodDay/skillsword for word, first seen Nov 29, 2026
- karanmrn/karanagentskillsword for word, first seen Nov 29, 2026
- The-Utopia-Studio/skillsedited, first seen Nov 29, 2026
- karanmrn/kstackword for word, first seen Nov 29, 2026
- elizaOS/elizaedited, first seen Nov 29, 2026
Used with
Projects with it also use Poteto Mode, control-cli and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
The-Utopia-StudioSkillPoteto Mode
poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.
Also in 3 projects that use this
ElyzeSolutionsSkillcontrol-cli
Build or adapt a local harness to drive, inspect, and profile an interactive CLI or TUI without external services. Use for CLI UX checks, startup regressions, memory leaks, hangs, prompt flows, or terminal demos.
Also in 5 projects that use this
rockcookiesSkillpstack-tdd
Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.
Also in 3 projects that use this
ElyzeSolutionsSkillcontrol-ui
Build or adapt a local browser/CDP harness to drive and inspect a web, IDE, or Electron UI. Use for local UI verification, screenshots, accessibility snapshots, perf profiles, visual diffs, or reproducing UI bugs.
Also in 5 projects that use this
GoogleSkillto-spec
Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.
Also in 10 projects that use this
AnasX7Skillshow-me
Help the user understand the current topic visually with concise diagrams, code-shape sketches, and focused HTML artifacts.
Also in 4 projects that use this
Other versions65 projects use a version of this.
Word for word · 13
- backnotprop/pstack★ 5.4k100% same
- jtaroreh/agystack★ 142100% same
- adjohn/pstack★ 12100% same
- karanmrn/karanagentskills★ 11100% same
- karanmrn/kstack★ 11100% same
- alexnthnz/keel★ 5100% same
- conscientiousness/herdr-pstack-orchestrator★ 2100% same
- conscientiousness/herdr-rex-pstack-orchestrator★ 2100% same
- fullerzz/agent-skills★ 2100% same
- MondayNotAGoodDay/skills★ 1100% same
3 more not listed
Edited · 50
- elizaOS/eliza★ 20k30% same
- uzairansaruzi/p3-stack★ 12630% same
- BabylonSocial/babylon★ 12030% same
- Dimon94/dverity★ 10730% same
- Dimon94/skills★ 10730% same
- dsebban/skills★ 8230% same
- TencentBlueKing/bk-lite★ 7730% same
- stealth-factory/opscope★ 4030% same
- painhardcore/pstack★ 2227% same
- creedants/pstack-t3★ 1997% same
40 more not listed
Wrote their own version · 2
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- requie/endostack★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- architectSkill
- arenaSkill
- automate-meSkill
- benchmark-checklistSkill
- blast-radiusSkill
- broSkill
- correctSkill
- create-formal-verification-skillSkill
- create-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- ketchupSkill
- ketchup-videoSkill
- maintain-formal-verification-skillSkill
- maintain-verification-skillSkill
- make-bot-uiSkill
- no-commentsSkill
- poteto-helpSkill
- poteto-modeSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- principle-type-system-disciplineSkill
- recallSkill
- reflectSkill
- reframeSkill
- session-reviewSkill
- setup-pstackSkill
- sharpenSkill
- show-me-your-workSkill
- statechartSkill
- swarmSkill
- tddSkill
- teachSkill
- technical-writingSkill
- typescript-best-practicesSkill
- unslopSkill
- whySkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 52 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Only when one shared write target is a real invariant, serialize access structurally (a lockfile, a single writer, sequential phases, …
“Common” is measured: kept by at least 6 in 10 of the 52 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Separate Before Serializing Shared State
When concurrent actors might write the same file, branch, key, or object, first ask whether they need one shared object or are publishing independent facts. Default to giving each actor its own file, key, branch, or state directory, and merge only where the state is read. Two workers writing their own field into one state.json is still shared mutation.
Only when one shared write target is a real invariant, serialize access structurally (a lockfile, a single writer, sequential phases, compare-and-swap). Instructions are not concurrency control, and "we need a lock" is a smell to check first.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

