# Principle Separate Before Serializing Shared State

> Remove unnecessary shared write targets between concurrent actors before adding structural serialization for state that truly requires one writer.

- Skill: `njs14/principle-separate-before-serializing-shared-state` (Agent Skill)
- Install (CLI): `npx skillmds@latest add njs14/principle-separate-before-serializing-shared-state`
- Raw SKILL.md: https://api.skillmd.com/api/skills/njs14/principle-separate-before-serializing-shared-state/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: njs14 (https://skillmd.com/u/njs14)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/njs14/principle-separate-before-serializing-shared-state

---


# Separate shared writes

Treat the request text that activated this skill as the concurrent state boundary.

Apply [separate before serializing shared state](../pkstack-principles/references/catalog.md#separate-before-serializing-shared-state).
List every actor and write target. Give independent facts separate files, branches, keys, or state
objects and merge them at a read boundary. Where one canonical writer is real, use a lock,
transaction, compare-and-swap, or single-writer phase. Return the ownership map and race proof.

