/pstack-herdr:principle-separate-before-serializing-shared-statefrom pstack-herdr
Guides eliminating shared mutable state before resorting to serialization. Helps prevent race conditions from concurrent writes to files, branches, keys, or state objects.
Ships in pstack-herdr. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
When concurrent actors might share mutable state, first ask whether they truly need the same mutable object. If not, eliminate the sharing. When sharing is real, enforce serialization structurally: lockfiles, sequential phases, exclusive ownership. Instructions and conventions are not concurrency control.
Why: Concurrent writes to shared state create race conditions that are intermittent, hard to reproduce, and expensive to debug. Telling agents or goroutines to "take turns" does not work.
Pattern:
lastX field into one state.json is still shared mutation; indexer-state.json + metrics-state.json is not.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
concurrency, race-conditions, shared-state, serialization, lock-free
npx claudepluginhub dengnaichen/pstack-herdr --plugin pstack-herdr3 plugins ship this exact skill · first indexed Aug 25, 2026
31 skills in this plugin
/architectSketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape./arena让不同家族的模型(Claude / OpenAI / Google)在 Herdr 里各自独立出一份方案,由当前会话主持:交叉评审、挑底稿、嫁接其他方案的长处,交给用户拍板。只用于方案类问题:架构、设计、技术选型。用于 /arena、'arena this'、'丢进 arena',以及其他 skill(如 architect)要求运行 arena 时。不写代码。要求 HC_TERMINAL_ID 已设置。/figure-it-outDesign an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away. Scales rigor to the task, runs a hypothesis loop, and logs decisions via show-me-your-work. Use for /figure-it-out, 'figure it out', a large migration, or when no narrower playbook applies.Other plugins' skills for the same job