Skip to content

danielrosehill/Claude-OS-Sync-Agent

Repository files navigation

OS Sync Agent — Claude Code Plugin

Hardware-aware desktop-to-laptop environment synchronisation, packaged as a Claude Code plugin.

This plugin wraps a small Bash gatherer (scripts/sync-agent.sh) with a Claude-driven analysis skill. It snapshots packages and dotfiles from a base machine (desktop/workstation) and a remote machine (laptop, reached over SSH), then produces an incremental install / remove / sync plan rather than trying to clone the two systems.

Install

/plugin install os-sync-agent@danielrosehill

(Available via the danielrosehill marketplace.)

Use

/sync-os                      # gather both sides + analyse (default)
/sync-os --gather-profiles    # snapshots only
/sync-os --gather-base        # base side only
/sync-os --gather-remote      # remote side only
/sync-os --sync               # analyse already-gathered snapshots

The slash command delegates to the sync-environments skill, which produces a four-section plan:

  1. Packages to install on the remote — apt / snap / flatpak / pip
  2. Packages to remove from the remote — items absent from base
  3. Dotfiles to sync — diffs in .bashrc, .zshrc, .gitconfig, etc.
  4. Skipped items — with one-line reasoning (e.g. "exceeds laptop RAM")

Prerequisites

  • Both systems are Ubuntu/Debian-family (dpkg, apt; optionally snap, flatpak, pip, conda, ollama).

  • SSH alias for the remote — defaults to laptop. Override with SYNC_REMOTE_HOST:

    SYNC_REMOTE_HOST=travel-laptop /sync-os

    Recommended ~/.ssh/config:

    Host laptop
        HostName 10.0.0.XXX
        User youruser
    

Storage

Profile snapshots are written to:

${CLAUDE_USER_DATA:-$HOME/.claude/data}/os-sync-agent/profiles/
├── base/      # local (desktop) snapshot
└── remote/    # remote (laptop) snapshot

Override with SYNC_PROFILES_DIR=/some/other/path for one-off comparisons.

Operating Principles

  • Hardware aware — won't recommend syncing resource-intensive software (e.g. large Ollama models) to a weaker remote.
  • Incremental — periodic catch-up, not perfect replication.
  • Removal logic — packages on the remote but missing on the base are flagged as candidates for removal.

Layout

.
├── .claude-plugin/plugin.json
├── commands/sync-os.md
├── skills/sync-environments/SKILL.md
├── scripts/sync-agent.sh         # snapshot gatherer
├── system-prompt.md              # original agent prompt (kept for reference)
├── docs/                         # architecture, usage, privacy notes
└── archive/                      # legacy prompts

License

MIT.

About

Idea - using Claude Code in place of Ansible for cross-device updating/sync

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages