/vault-sync:vault-snapshot [--dry-run]from vault-sync
Linux-only S3-to-Git snapshot/promotion job with tombstone-aware no-resurrection and bounded remote pruning. Enforces single-writer-git invariant for fleet snapshot hosts.
Ships in vault-sync. 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.
Linux-only snapshot/promotion skill for the vault. Materializes root projections through the live vault, syncs direct S3 content into the Git worktree, strips active delete-intent paths before staging, commits, and pushes to GitHub with rebase-based merge. Enforces the single-writer-git invariant: only the designated snapshotter host per fleet may run this.
platform_require linux — hard block on non-Linux hosts. The snapshot script depends on Linux-specific tools and the rclone FUSE mount path convention.--max-delete 10 — NON-NEGOTIABLE clamp on rclone sync (and by extension rsync --delete) to prevent mass deletion during S3 inconsistency events. Reference: raw/transcripts/2026-05-23-bug-sg01-snapshot-destructive-rclone-sync.md.fleet.yaml.git add, even when the optional S3 prune is unavailable.WIKI_SNAPSHOT_MAX_TOMBSTONE_PRUNES defaults to 10 and caps exact deletefile calls. The snapshot intersects active tombstones with a successful recursive remote inventory, so already-absent keys cause zero delete calls.index.md and log.md materialization, the script freezes those bytes, reads both objects through the direct S3 remote until their SHA-256 values match under WIKI_SNAPSHOT_PROJECTION_PARITY_TIMEOUT_SECONDS (default 120), with each object read bounded by WIKI_SNAPSHOT_PROJECTION_READ_TIMEOUT_SECONDS (default 15), then syncs. It requires byte-identical worktree files plus a read-only skillwiki projections materialize <worktree> preview with index_drift=false and log_drift=false before staging. Exact worktree==store parity with a drifting preview is a recoverable page-vs-index race: the script performs at most one additional rclone sync, re-reads the store, and re-runs the same gates. Persistent drift still refuses. A fixed sleep, FUSE cache refresh, object existence, or queue-empty observation is not sufficient.origin/main after push or no-change before emitting SNAPSHOT_COMPLETE result=success.platform_detect_os; platform_require linux.fleet_load. Confirm this host's role is snapshotter. If not, abort with message.wiki_snapshot_assert_guards against the snapshot script body to verify --max-delete is present.wiki-snapshot.sh (in $(platform_share_dir)/bin/). Pass --dry-run if the skill was invoked with --dry-run.projection direct-store parity confirmed, projection worktree parity confirmed, and projection semantic preview confirmed before the terminal success record. Hashes are non-sensitive byte-integrity evidence; do not log object contents.active, inventory_ready, remote_present, attempted, pruned, already_absent, failed, and deferred counters. In a zero-live-key steady state, attempted=0 and no tombstone object not found block should appear.$(platform_log_dir)/wiki-snapshot.log. Include start timestamp, exit code, parity evidence, and summary.# Interactive (Claude Code / Codex) — dry-run by default
/vault-snapshot --dry-run
# Interactive — execute
/vault-snapshot
# Terminal (after install)
bash $(platform_share_dir)/bin/wiki-snapshot.sh --dry-run
bash $(platform_share_dir)/bin/wiki-snapshot.sh
If root projection materialization fails with SYNC_LOCK_HELD, do not edit the
snapshot worktree or remove the lock by age. Follow
docs/managed-write-lock-reclaim-runbook.md
for the attended dead-PID-only backup, reclaim, systemd restart, and doctor
closeout procedure.
When migrating from sg01's legacy wiki-snapshot-v3.sh:
/root/.hermes/scripts/wiki-snapshot-v3.sh into $(platform_share_dir)/bin/wiki-snapshot.sh.--max-delete 10 is present in the rclone/rsync delete call.flock with lockfile_acquire from lib/lockfile.sh.platform_* helpers.lib/platform.sh at the top of the script.sudo -u hermes bash wiki-snapshot.sh --dry-run.systemctl enable --now wiki-snapshot.timer for system scope, or systemctl --user enable --now wiki-snapshot.timer for user scope. Default snapshotter cadence is every 30 minutes at *:02 and *:32.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub karlorz/llm-wiki --plugin vault-sync6 skills in this plugin
/vault-fuse-freshnessAudit Linux rclone FUSE wiki freshness. Use when dir-cache-time drifts or a bounded vfs/refresh is needed./vault-presyncPre-sync lint, collision dedup, and rebase for ~/wiki. Use before wiki-sync or git push./vault-sync-installInstall vault-sync: scripts, scheduler, optional Linux FUSE-only mode. Use for install, reinstall, or role switch./vault-sync-statusHealth snapshot of vault-sync: scheduler, push/fetch recency, snapshot guard, FUSE timer. Use after install or CI checks./vault-sync-uninstallRemove vault-sync from current host. Stops scheduler jobs, leaves tombstone markdown, preserves logs.