state-synchronizer

state-synchronizer is a skill for Claude Code, Codex from khalilbenaz/claude-skills-collection. It costs 83 tokens per session (2,659 once invoked), scanned A, original, MIT.

A coordination guide for multiple software agents that read and change the same shared information at the same time.

In plain words
What is it for?
Use it to define shared data, control which agent may change each part, and coordinate distributed collection or recovery after a failure.
Why use it?
It helps prevent race conditions, silent overwrites, and results that change unpredictably when agents work in parallel.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define shared data, control which agent may change each part, and coordinate distributed collection or recovery after a failure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/khalilbenaz/claude-skills-collection/state-synchronizer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add khalilbenaz/claude-skills-collection --skill state-synchronizer
Clone the repo
git clone --depth 1 https://github.com/khalilbenaz/claude-skills-collection

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for state-synchronizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/state-synchronizer/github.svg)](https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/state-synchronizer)
Your own site
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/state-synchronizer"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/state-synchronizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for state-synchronizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/khalilbenaz/claude-skills-collection/state-synchronizer"><img src="https://agentmods.dev/badge/skills/khalilbenaz/claude-skills-collection/state-synchronizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,659 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00083 $0.02659
Opus 5.5 $0.00033 $0.01064
Sonnet 5.5 $0.00017 $0.00532
Haiku 4.5 $0.00008 $0.00266

Measured 3mo ago against content hash e4e887ca301f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

state-synchronizer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agent-skills/state-synchronizer/SKILL.md · 276 lines

How it starts

The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent State Synchronizer

Quand utiliser ce skill

Utilise ce skill quand plusieurs agents accèdent et modifient un état commun en parallèle : collecte distribuée, workflows coordinés, récupération après panne. Sans synchronisation explicite : race conditions, écrasements silencieux, résultats non déterministes.


Workflow en 8 étapes

1. Définir le shared state (schéma minimal)

Ne partager que ce qui est nécessaire à la coordination — pas l'état interne de chaque agent.

from pydantic import BaseModel
from typing import Any
from datetime import datetime

class SharedState(BaseModel):
    version: int = 0
    schema_version: str = "1.0"
    task_assignments: dict[str, str] = {}   # task_id → agent_id
    task_results: dict[str, Any] = {}        # task_id → result
    agent_status: dict[str, str] = {}        # agent_id → "idle"|"working"|"done"|"error"
    global_context: dict[str, Any] = {}      # lecture seule pour tous
    last_updated: datetime = datetime.utcnow()
    last_updated_by: str = ""

Critères de design :

  • READ_ALL / WRITE_OWN — chaque agent n'écrit que ses propres champs → moins de conflits.
  • Fine-grained (un verrou par champ) vs coarse-grained (un seul verrou global) : préférer fine-grained sauf si les transactions multi-champs sont fréquentes.
  • Versionner le schéma (schema_version) dès le départ pour faciliter les migrations.

2. Choisir le state store

Store Cas d'usage Avantages Limites
Dict Python Mono-process, tests Ultra-rapide, zéro infra Pas de persistance, un seul process
Redis Multi-process, dev/prod Atomic ops, pub/sub, TTL natif Consistance éventuelle par défaut
PostgreSQL Persistance forte requise ACID, SELECT FOR UPDATE Plus lent, surcharge opérationnelle
Event log Auditabilité, replay Immuable, debuggable Reconstruction de l'état coûteuse

Recommandation : Redis pour la majorité des systèmes multi-agents en 2026.

Read the full file on GitHub · 276 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 276 lines · 83 tokens per session scan A e4e887ca301f

Subscribe to this mod's changes

state-synchronizer is a skill published in the GitHub repository khalilbenaz/claude-skills-collection (27 stars, last pushed 3mo ago), licensed MIT. It adds 83 tokens to every session and 2,659 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

state-synchronizer compared with skills from other repositories

state-synchronizer next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
state-synchronizerkhalilbenaz/claude-skills-collectionSkill273mo agoMITA83Claude Code, Codex
explainsoftspark/ai-toolkitSkill18013d agoApache-2.0A34Claude Code
finance-econ-literacymodu-ai/moai-coworkSkill3201mo agoApache-2.0A128Claude Code
exposure-guidanceellmos-ai/skillsSkill10todayMITA117Claude Code, Codex
systemisch-loesungsfokussiertellmos-ai/skillsSkill10todayMITA127Claude Code, Codex
trauma-psychoeducationellmos-ai/skillsSkill10todayMITA40Claude Code, Codex
act-techniquesellmos-ai/skillsSkill10todayMITA127Claude Code, Codex