Approved catalog listing
SKILL #4302
skillshunter.net
Home / Software & Development / Principle: Separate Before Serializing Shared State
Listing Approved Approved on: December 2, 2026

Principle: Separate Before Serializing Shared State

Ensure that parallel actors writing to the same target are separated first, and only serialize access when a shared write target is an invariant.

Rate this skill

No ratings yet

Editor's Note

Before implementing shared state serialization, confirm whether actors require a single shared object or can operate independently. If independent, assign each actor its own file, key, or directory, and merge only during reads.

When to Use It

  • Managing concurrent writes to shared files in distributed systems
  • Avoiding race conditions in multi-threaded applications
  • Designing state management in parallel processing pipelines

SKILL.md

SkillsHunter provides this listing for informational purposes only. Review the skill’s source, license, and required permissions before use. You are responsible for deciding whether to install or run it. Terms of Use

↓ Download .md
---
name: principle-separate-before-serializing-shared-state
description: When parallel actors share a write target, separate them first.
disable-model-invocation: true
---

# 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.

Community Reviews & Field Notes

Tried this skill on your own project? Share the model you used and the results you got.

Add Your Review

Approved reviews appear publicly with the name or role you enter. See the Privacy Notice.