← Back to Skills Marketplace
stevensongxx

Agent Config Sync

by LeonSong · GitHub ↗ · v1.3.0 · MIT-0
cross-platform ⚠ suspicious
70
Downloads
0
Stars
0
Active Installs
5
Versions
Install in OpenClaw
/install agent-config-sync
Description
Synchronize configuration versions across OpenClaw multi-agent deployments. Tracks changes in a master workspace using sentinel version files and CHANGELOG,...
README (SKILL.md)

Agent Config Sync (v1.2)

Keep configuration consistent across multiple OpenClaw agents using version tracking, CHANGELOG-based change detection, and automatic sync dispatch with journal-backed two-phase commit.

New in v1.2: Scripts now read agent list from agent-registry.json (single source of truth). Bilingual output (--lang en|zh). --dry-run and --demo modes. See Upgrading for v1.1 → v1.2 migration.

Security: This skill writes to agent workspaces across your OpenClaw deployment. Read the full SECURITY.md for permission scope, path validation, cross-agent isolation, and user consent flow. Key highlights:

  • All scripts require --confirm for write operations (use --dry-run to preview first)
  • Only paths under ~/.openclaw/workspace-* are allowed (path validation enforced)
  • Each agent can only read/write its own workspace files
  • No network access, no external API calls, no credential access

⚙️ Customization Variables

Edit references/agent-registry.json — this is the only file you need to change for your deployment:

Variable Location Example Description
workspace_root vars in registry ~/.openclaw Base path for all agent workspaces
master_agent vars in registry amaster ID of your coordination/master agent
master_memory vars in registry ${workspace_root}/workspace-amaster/memory Path to master's memory directory
(each agent) agents in registry See below Add/remove/rename agents to match your setup

Example — after customization for user "Alice" with agents alice-dev, alice-biz, alice-ops:

{
  "vars": {
    "workspace_root": "~/.openclaw",
    "master_agent": "alice-ops",
    "master_memory": "${vars.workspace_root}/workspace-${vars.master_agent}/memory"
  },
  "agents": {
    "alice-dev": { "name": "Alice Dev", "role": "Development",
      "workspace": "${vars.workspace_root}/workspace-alice-dev" },
    "alice-biz": { "name": "Alice Biz", "role": "Business",
      "workspace": "${vars.workspace_root}/workspace-alice-biz" },
    "alice-ops": { "name": "Alice Ops", "role": "Coordination",
      "workspace": "${vars.workspace_root}/workspace-alice-ops" }
  }
}

Scripts resolve ${vars.xxx} placeholders at runtime — no hardcoded paths.


Overview

Architecture

┌─ Version Tracking ──────────────────────┐
│  .current_system_version  (monotonic)    │
│  .last_sync_version       (last synced)  │
│  CHANGELOG.md             (structured)   │
│  .sync_journal.jsonl      (atomicity)    │
└──────────────────────────────────────────┘
         │ version mismatch detected by HEARTBEAT
         ▼
┌─ Sync Journal (two-phase commit) ────────┐
│  PREPARE → journal entry written          │
│  DISPATCH → sessions_send / pending_sync  │
│  COMMIT → mark done or retry later        │
└──────────────────────────────────────────┘
         │ each agent processes independently
         ▼
┌─ Agent Side ────────────────────────────┐
│  BOOTSTRAP.md → ls pending_sync_*.md    │
│  HEARTBEAT.md → check + verify SHA256   │
│  SYNC.md → manual sync instructions     │
└──────────────────────────────────────────┘

What it syncs

Type Examples
🖥️ System code Quant system, price compare, data pipelines
🤖 Agent config SOUL.md, AGENTS.md, IDENTITY.md, USER.md, TOOLS.md
⚙️ OpenClaw config Models, skills, service addresses, plugins
🎯 Task config API keys, cron jobs, data sources, ports

Installation

Prerequisites

  • OpenClaw with 2+ agents
  • One designated "master" coordination agent
  • clawhub CLI installed

Step 1: Install the Skill

clawhub install agent-config-sync

Step 2: Customize Agent Registry

Edit ~/.openclaw/skills/agent-config-sync/references/agent-registry.json:

  1. Change vars.master_agent to your coordination agent's ID
  2. Replace the agents entries with your own agents
  3. Adjust vars.workspace_root if your OpenClaw workspace is not ~/.openclaw

See the Customization Variables table above, or the English quickstart at references/quickstart.md.

Step 3: Initialize Sync Infrastructure

cd ~/.openclaw/skills/agent-config-sync

# Preview what will be created (safe, no changes required)
bash scripts/init_sync.sh --dry-run

# Run the real setup (--confirm required for write operations)
bash scripts/init_sync.sh --confirm

⚠️ Safety: --confirm is required for any write operation. Without it, the script exits with a prompt explaining how to preview with --dry-run first. --dry-run mode does not need --confirm.

This creates:

  • Version sentinel files (.current_system_version, .last_sync_version) in master's memory/
  • CHANGELOG.md with structured format
  • .sync_journal.jsonl for sync atomicity
  • SYNC.md, bootstrapped BOOTSTRAP.md, and HEARTBEAT.md sync checks in each agent workspace

Step 4: Add HEARTBEAT Item to Master Agent

Copy the HEARTBEAT item from references/sync-setup.md into your master agent's HEARTBEAT.md. This is item 12 — the heartbeat check that detects version mismatches and dispatches syncs.

Step 5: Verify Setup

# Check version files
cat ~/.openclaw/workspace-\x3Cmaster>/memory/.current_system_version  # should be v1.0

# Check agent sync files
ls ~/.openclaw/workspace-*/SYNC.md

Configuration

Agent Registry (references/agent-registry.json)

The single source of truth. Fields:

Field Description
vars.workspace_root Root directory for all agent workspaces
vars.master_agent ID of the coordination agent (sends syncs)
vars.master_memory Path to master's memory directory (uses placeholders)
agents.\x3Cid>.name Display name (English)
agents.\x3Cid>.name_zh Display name (Chinese) — optional
agents.\x3Cid>.role Short role description
agents.\x3Cid>.workspace Path to agent workspace (uses ${vars.workspace_root})
sync.* Sync behavior config (sentinel filenames, prefix, limits)

CHANGELOG Format

All version entries must follow the structured format defined in references/sync-setup.md:

## vX.Y (YYYY-MM-DD)
**Change Type**: \x3Ccategory>
**Affected Agents**: \x3Cwhich agents>
**Author**: \x3Cwho made the change>
**Priority**: normal | high | critical

### Added / Changed / Deprecated
- \x3Cdescription>

Language

Scripts support --lang en and --lang zh (default). Use --lang en for English output:

bash scripts/init_sync.sh --lang en
bash scripts/force_sync.sh --lang en ~/memory v1.0 v1.1

Usage Scenarios

Scenario A: Adding a new model to all agents

Situation: You want all agents to switch to a new default model.

  1. Update CHANGELOG.md in master's memory directory:

    ## v3.2 (2026-05-16)
    **Change Type**: ⚙️ OpenClaw Config
    **Affected Agents**: all
    **Author**: AMaster
    **Priority**: high
    
    ### Changed
    - Default model switched to deepseek-v4-pro for all agents
    - Fallback model set to deepseek-v3
    
  2. Bump the version:

    echo "v3.2" > memory/.current_system_version
    
  3. Next HEARTBEAT (every 5 min): version mismatch detected → dispatches to all agents. Agents update their model configs accordingly.

  4. Agents delete their pending_sync_v3.2_\x3Csha>.md after applying.

Scenario B: Coordinated code deployment

Situation: You fix a bug in shared code used by multiple agents.

  1. Fix the bug, tell the master agent to record the change.

  2. Master updates CHANGELOG.md with the version entry, bumps .current_system_version.

  3. HEARTBEAT dispatches. Online agents receive via sessions_send; offline agents get pending_sync files.

  4. All agents verify version before running the shared system.


Daily Operations

Recording a Change

Whenever a config or system change affects multiple agents:

  1. Edit CHANGELOG.md in master's memory/ directory — add a new ## vX.Y section
  2. Bump the versionecho "vX.Y" > memory/.current_system_version
  3. The change is dispatched automatically on the next master heartbeat

Force-Syncing Immediately

cd ~/.openclaw/skills/agent-config-sync

# Preview the version change
bash scripts/force_sync.sh --dry-run ~/.openclaw/workspace-\x3Cmaster>/memory v3.0 v3.1

# Execute (--confirm required for write operations)
bash scripts/force_sync.sh --confirm ~/.openclaw/workspace-\x3Cmaster>/memory v3.0 v3.1

After running, the next heartbeat detects current (v3.1) != last_sync (v3.0) and dispatches.

Checking Sync Status

# Check version sentinel files
cat ~/.openclaw/workspace-\x3Cmaster>/memory/.current_system_version
cat ~/.openclaw/workspace-\x3Cmaster>/memory/.last_sync_version

# Check journal for recent sync records
tail -5 ~/.openclaw/workspace-\x3Cmaster>/memory/.sync_journal.jsonl

# Check for pending syncs on an agent
ls ~/.openclaw/workspace-\x3Cagent>/pending_sync_*.md

Demo Mode (Learning)

cd ~/.openclaw/skills/agent-config-sync
bash scripts/init_sync.sh --demo --lang en

Creates a complete demo deployment in /tmp/ showing the full file structure without touching real workspaces.


Manual Sync Trigger

bash skills/agent-config-sync/scripts/force_sync.sh \
  ~/.openclaw/workspace-amaster/memory v3.0 v3.1

This creates a version mismatch (old=3.0, new=3.1) — next heartbeat dispatches.


Troubleshooting

Agents Not Receiving Updates

Symptom Likely Cause Fix
No dispatch on heartbeat HEARTBEAT item 12 not added to master Follow references/sync-setup.md exactly; verify grep agent-config-sync in master's HEARTBEAT.md
Dispatched but not processed Agent missing BOOTSTRAP sync check Re-run init_sync.sh for that agent's workspace
pending_sync files piling up Agent never deletes after processing Check agent's HEARTBEAT.md has sync check with delete step
Same version synced repeatedly .last_sync_version not updated Run force_sync.sh to reset, or check journal for stale records

Version Conflicts

Symptom Likely Cause Fix
Wrong version on agent Partial sync interrupted Check journal for status=prepared records; master re-dispatches on next heartbeat
Multiple pending_sync files Back-to-back changes Process latest version first; all files are cumulative
SHA256 verification fails File tampered or truncated Request master to re-dispatch that version
"Backup failed" in force_sync Memory dir permission issue chmod 755 memory/ and retry

Journal Issues

Symptom Likely Cause Fix
Stale prepared records (>24h) Agent was offline too long Mark as abandoned in journal, re-trigger sync with force_sync.sh
Journal growing too large Many sync records Archive old committed entries periodically
Corrupt journal line Partial write or disk issue Delete the last line (corrupt), re-trigger sync

Rolling Back a Change

To undo a sync that was dispatched but shouldn't have been:

  1. Revert the version: echo "v3.0" > memory/.current_system_version (back to previous)
  2. Revert the last_sync: echo "v3.0" > memory/.last_sync_version
  3. Mark the journal record: Edit .sync_journal.jsonl, find the record with "to":"v3.1" and change status to "reverted"
  4. Notify agents: Agents check pending_sync files on heartbeat — delete old ones
  5. Verify: ls ~/.openclaw/workspace-*/pending_sync_*.md should be empty

Alternatively, use force_sync.sh in "reverse":

bash scripts/force_sync.sh memory/ v3.0 v3.1   # created mismatch forward
bash scripts/force_sync.sh memory/ v3.1 v3.0   # reverse: current=v3.0, last=v3.1 → no dispatch (current \x3C last)

⚠️ force_sync.sh only creates the version mismatch — actual rollback requires reverting the changes in CHANGELOG and agent configs manually.


🌐 Internationalization

This skill supports both Chinese and English environments:

Resource Chinese English
SKILL.md (this file) ✅ Full English
references/quickstart.md ✅ English quickstart for new users
references/sync-setup.md ✅ Full Chinese — (code pseudocode is language-agnostic)
references/sync-journal.md ✅ Full Chinese — (JSONL format is language-agnostic)
scripts/init_sync.sh --lang zh (default) --lang en
scripts/force_sync.sh --lang zh (default) --lang en
Registry agent names name_zh field name field
Generated SYNC.md Chinese template English template (via --lang en)
Generated CHANGELOG.md Chinese template English template (via --lang en)

Using English:

# Install and initialize in English
bash scripts/init_sync.sh --lang en

# Demo in English
bash scripts/init_sync.sh --lang en --demo

New English-speaking users should start with references/quickstart.md.


Upgrading

From v1.0 to v1.1

  • agent-registry.json introduced (previously agent list was hardcoded)
  • pending_sync files now use version-named format (pending_sync_v3.1_a1b2c3.md) instead of single pending_sync.md
  • Journal-based two-phase commit added
  • No breaking changes — existing sentinel files and CHANGELOG format unchanged

From v1.1 to v1.2

  • Registry is now single source of truth: scripts read agent list from agent-registry.json instead of command-line args
  • Bilingual scripts: --lang en|zh flag on both init_sync.sh and force_sync.sh
  • New flags: --dry-run (preview), --demo (learning mode), --help
  • English quickstart: references/quickstart.md added
  • agent-registry.json format changed: added vars section with placeholders

Migration steps (v1.1 → v1.2)

  1. Update agent-registry.json:

    // Add this at the top of your existing agent-registry.json:
    "vars": {
      "workspace_root": "~/.openclaw",
      "master_agent": "amaster",
      "master_memory": "${vars.workspace_root}/workspace-${vars.master_agent}/memory"
    },
    // Update workspace paths to use placeholders:
    "agents": {
      "acode": {
        "workspace": "${vars.workspace_root}/workspace-acode"  // \x3C-- use placeholder
      }
    }
    
  2. Verify with dry-run: bash scripts/init_sync.sh --dry-run

  3. Re-run init: bash scripts/init_sync.sh (safe — skips existing files)

Compatibility notes

  • Existing CHANGELOG.md, sentinel files, and .sync_journal.jsonl are fully compatible
  • Agent-side pending_sync_*.md / SYNC.md / BOOTSTRAP.md format unchanged
  • force_sync.sh positional args unchanged; new flags are additive

Files

File Purpose
SKILL.md This skill definition
SECURITY.md Security model, permissions, and user consent flow
references/quickstart.md 🆕 English quickstart for new users
references/sync-setup.md HEARTBEAT item 12 + structured CHANGELOG spec
references/pending-sync-template.md pending_sync file template (version-named)
references/sync-journal.md Journal-based two-phase commit mechanism
references/agent-registry.json Single source of truth for agent IDs and workspaces
scripts/init_sync.sh Full setup in one command (now reads registry)
scripts/force_sync.sh Trigger immediate sync detection
Usage Guidance
Install only if you control all affected agent workspaces and want automatic cross-agent configuration propagation. Before enabling it, run dry-run, inspect the registry paths, avoid putting actual API-key values or secrets in CHANGELOG/pending-sync content, require approval for high-risk syncs, and keep a rollback plan for BOOTSTRAP/HEARTBEAT changes.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The capability matches the stated purpose: SKILL.md describes synchronizing configuration versions across multiple OpenClaw agents, but that inherently means changing agent workspace files and behavior.
Instruction Scope
The agent-side instructions tell agents to process pending sync files on startup/heartbeat and update MEMORY/config from them, which is broad persistent authority without clear per-change human approval or strong origin authentication.
Install Mechanism
There is no install-time execution spec; the included Bash scripts are user-run and document --dry-run/--confirm gates, so local command execution is disclosed and purpose-aligned.
Credentials
The intended scope covers all configured agent workspaces and the docs mention API keys as syncable task configuration while also claiming no credential access, leaving sensitive configuration handling unclear.
Persistence & Privilege
The skill appends persistent BOOTSTRAP/HEARTBEAT sync checks and creates journal/pending-sync state so future agent heartbeats can keep applying changes automatically.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install agent-config-sync
  3. After installation, invoke the skill by name or use /agent-config-sync
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.3.0
v1.3.0: ClawScan Warn消除(--confirm安全确认/路径校验//home/admin绑定)/新增SECURITY.md权限模型文档/SKILL.md更新安全引用/init_sync+force_sync双重安全机制
v1.2.1
v1.2.1: 修复ClawHub dotfile排除问题(agent-registry.json非dotfile命名+更新所有引用) / 所有功能同v1.2
v1.2.0
v1.2: 通用性重构(.agent_registry单一事实源+变量配置表+脚本读注册表) / 新增references/quickstart.md(全英文) / 脚本双语化(--lang en/zh) / init_sync.sh增加--dry-run和--demo模式 / force_sync.sh增加--dry-run和--lang / SKILL.md补全Installation/Configuration/DailyOps/Troubleshooting/Upgrading章节
v1.1.0
v1.1: P0修复(pending_sync累积+Journal两步提交+CHANGELOG结构化+SHA256签名) / P1修复(.agent_registry+init_sync防覆盖+force_sync备份校验) / 清除SUSPICIOUS审核标记 / 新增场景示例+故障排查表
v1.0.0
首次发布: 多智能体配置版本管理与自动同步机制。支持版本哨兵/CHANGELOG/pending_sync降级/心跳自动检测/多Agent推送拉取
Metadata
Slug agent-config-sync
Version 1.3.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 5
Frequently Asked Questions

What is Agent Config Sync?

Synchronize configuration versions across OpenClaw multi-agent deployments. Tracks changes in a master workspace using sentinel version files and CHANGELOG,... It is an AI Agent Skill for Claude Code / OpenClaw, with 70 downloads so far.

How do I install Agent Config Sync?

Run "/install agent-config-sync" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Agent Config Sync free?

Yes, Agent Config Sync is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Agent Config Sync support?

Agent Config Sync is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Agent Config Sync?

It is built and maintained by LeonSong (@stevensongxx); the current version is v1.3.0.

💬 Comments