Skip to content
Back to skills

Principle Separate Before Serializing Shared State

ASecurity

Apply when concurrent actors (tabs, taskpanes, worktrees, agents, cron jobs) might read/write the same token, file, database, or branch. Eliminate sharing first.

  • 25 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 15, 2026
ai-agentsdatabase

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add watt-mind/factory --skill principle-separate-before-serializing-shared-state --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Principle Separate Before Serializing Shared State?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Principle Separate Before Serializing Shared State
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/watt-mind-principle-separate-before-serializing-shared-state/badge)](https://www.skillsdirectory.com/skills/watt-mind-principle-separate-before-serializing-shared-state)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: principle-separate-before-serializing-shared-state
description: "Apply when concurrent actors (tabs, taskpanes, worktrees, agents, cron jobs) might read/write the same token, file, database, or branch. Eliminate sharing first."
disable-model-invocation: true
---

# Separate Before Serializing Shared State

When concurrent actors touch the same resource, first ask whether they need to share it at all.

1. **Isolate ownership first:** Give each worktree its own DB and port band, each writer its own part-file, and each pane/session its own non-clobbering token or lease.
2. **Serialize only true invariants:** When a single shared writer is genuinely required (such as merging to a trunk branch or rotating a single upstream token), place it behind one explicit lock or coordinator.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.