git-sync-daemon

Manage multiple git repositories with a daemon model (periodic add/commit/pull/push). Use this skill when you need to set up, run, or troubleshoot automated git sync on macOS (launchd) or Linux (systemd), including repo registration and service lifecycle.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "git-sync-daemon" with this command: npx skills add samwei12/git-sync-daemon

Git Sync Daemon

Purpose

Provide a reusable, daemon-based git auto-sync workflow:

  • one repo list file
  • one daemon process
  • per-repo lock and independent failure isolation
  • service management on macOS and Linux

Files

  • Engine: scripts/git_sync_daemon.sh
  • Control CLI: scripts/git_sync_ctl.sh

Default Runtime Paths

  • State dir: ~/.config/git-sync-daemon
  • Repo list: ~/.config/git-sync-daemon/repos.conf
  • Log file: ~/.config/git-sync-daemon/git-sync-daemon.log

Repo Entry Format

One line per repo:

/absolute/path/to/repo|remote=origin|branch=main|enabled=1

Supported keys:

  • remote (default origin)
  • branch (default current branch)
  • enabled (1/0, true/false, default enabled)

Quick Start (macOS)

bash scripts/git_sync_ctl.sh init
bash scripts/git_sync_ctl.sh add-repo /Users/samwei12/Develop/config
bash scripts/git_sync_ctl.sh run-once
bash scripts/git_sync_ctl.sh install-launchd
bash scripts/git_sync_ctl.sh status

Quick Start (Linux)

bash scripts/git_sync_ctl.sh init
bash scripts/git_sync_ctl.sh add-repo /path/to/repo
bash scripts/git_sync_ctl.sh run-once
sudo bash scripts/git_sync_ctl.sh install-systemd
bash scripts/git_sync_ctl.sh status

Operations

  • Add repo: bash scripts/git_sync_ctl.sh add-repo <path> [branch] [remote]
  • Remove repo: bash scripts/git_sync_ctl.sh remove-repo <path>
  • List repos: bash scripts/git_sync_ctl.sh list-repos
  • One cycle now: bash scripts/git_sync_ctl.sh run-once
  • Status/log tail: bash scripts/git_sync_ctl.sh status

Service lifecycle:

  • macOS install: bash scripts/git_sync_ctl.sh install-launchd
  • macOS uninstall: bash scripts/git_sync_ctl.sh uninstall-launchd
  • Linux install: sudo bash scripts/git_sync_ctl.sh install-systemd
  • Linux uninstall: sudo bash scripts/git_sync_ctl.sh uninstall-systemd

Production hardening checklist

Before enabling daemon mode in production:

  1. SSH/auth baseline
  • Ensure service user can run non-interactive git over SSH to each remote.
  • Preload host keys (ssh-keyscan / StrictHostKeyChecking=accept-new) to avoid first-run failures.
  • Prefer explicit key routing in ~/.ssh/config (host/user/port/IdentityFile/IdentitiesOnly).
  1. Service identity consistency
  • Install service with the same user that owns repo credentials and git config.
  • Verify git config --global user.name/user.email for that service user.
  1. Repo registration policy
  • Register only clean, intended repos.
  • Keep one canonical branch per repo entry; avoid detached HEAD targets.
  • Use enabled=0 for temporary pauses instead of deleting lines.
  1. Observability
  • Keep logs in dedicated file and rotate externally if needed.
  • Validate run-once before enabling persistent service.

Safety Notes

  • The daemon does not force-push.
  • Rebase conflicts are logged and isolated to the affected repo.
  • If git-lfs is required by hooks but missing, that repo is skipped with explicit error log.
  • On macOS launchd, PATH is expanded in both service env and daemon script to include Homebrew binaries.
  • Recommended migration practice: first successful run should use baseline repos only; then gradually add more repos.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Security

SPIRIT State Sync

State Preservation & Identity Resurrection Infrastructure Tool (SPIRIT). Preserves AI agent identity, memory, and projects to a private Git repository. NEW:...

Registry SourceRecently Updated
7760Profile unavailable
Coding

Membox Cloud Sync

Private zero-knowledge encrypted cross-device memory sync, backup, and recovery for OpenClaw. Helps agents install Membox, pair devices, securely sync `MEMOR...

Registry SourceRecently Updated
2831Profile unavailable
Coding

OpenClaw 云端工作区同步助手

提供针对云端 OpenClaw 工作区到本地的安全实时同步方案及命令,支持多系统与同步方式选择。

Registry SourceRecently Updated
3070Profile unavailable
General

Bilibili Subtitles

使用 yt-dlp 从哔哩哔哩公开视频提取已有字幕或自动字幕(不下载整段视频)。当用户提到 B 站、bilibili、BV 号、视频字幕、拉字幕、做摘要、根据视频内容回答问题时使用。v1 仅支持平台已提供字幕轨道的视频;无字幕视频需换源或后续用 Whisper 等方案。

Registry SourceRecently Updated
2580Profile unavailable