Back to Resources
Multi-Machine AI Agent Portability, Backup & Disaster Recovery GuideLast Updated: Updated October 28, 2026

How to Sync and Back Up Claude Skills Across Multiple Computers

To sync and back up Claude Skills, keep every skill folder in one durable library, then sync the complete folders into Claude Code, Antigravity, and Codex on each computer. Preserving supporting scripts, schemas, and references in an automated multi-agent backup ensures you never lose engineering judgment during migrations, git conflicts, or hardware failures.

Multi-Machine
Two-Way Sync
Disaster Recovery

A practical guide to syncing and backing up Claude Skills across laptops, desktops, repos, and AI tools without losing files, creating duplicates, or rebuilding workflows from memory.

Why Does Claude Skill and AI Prompt Sync Break Across Laptops?

Claude Skill and AI prompt synchronization breaks across laptops because modern developer tools store instructions in siloed, machine-local configuration paths rather than a unified synchronization layer. An engineer working across a work MacBook Pro, a personal desktop, or a newly provisioned laptop encounters fractured instruction files that never travel with their user account.

Most Claude Skills start as local experiments. You write a useful review checklist on one laptop, save a customer-reply skill in one repo, or get a teammate to send you a folder over chat. That works until you change machines, open a different project, or try to use the same workflow in another agent. When developers adopt coding assistants, their operational knowledge splits across at least four incompatible storage formats:

  • Terminal agent skill directories: Anthropic's Claude Code stores global user skills in ~/.claude/skills/<skill-name>/SKILL.md and project skills under .claude/skills/. These skill packages operate within 200,000-token context windows in Claude 3.5 Sonnet and Claude 3.7 Sonnet, but they reside entirely on the local APFS or ext4 filesystem.
  • Editor-scoped rules: Cursor reads instructions from .cursor/rules/*.mdc or legacy .cursorrules files inside specific repositories. According to official Cursor rules documentation, "Rules for AI allow you to provide custom instructions to Cursor that are applied to every chat conversation or composer session." However, Cursor rules placed in one local repo clone on a work machine remain invisible to repositories on your personal laptop.
  • Desktop agent directories: Tools like OpenAI Codex utilize ~/.codex/skills/ or repository-level AGENTS.md files, while Google Antigravity uses ~/.gemini/antigravity/skills/, each requiring distinct directory hierarchies and frontmatter parsers.
  • Web browser chat preambles: Custom instructions inside web interfaces like ChatGPT or Claude.ai remain locked inside proprietary SaaS accounts, completely isolated from terminal CLI agents.

A synced skill is not a synced Markdown file; it is a complete, versioned directory package containing procedural triggers, execution scripts, schemas, and few-shot examples that can be discovered, executed, and validated deterministically on every machine that needs it.

The Sprawl Moment: The Cost of Desynced Prompts on the Other Machine

A lead platform architect spends four months engineering a suite of 18 high-precision agent skills across Claude Code, Google Antigravity, and Cursor. These skills automate internal API contract validation, multi-stage AWS infrastructure rollouts, and SOC2 compliance audits. On Sunday night, an unexpected staging outage triggers an incident alert. The architect sits down at their home desk on a personal MacBook Pro, only to find that the critical database triage skill—complete with Postgres transaction lock verification, sanitization regexes, and rollback safety checks—is trapped on the work laptop sitting inside their locked office backpack. Following an earlier clean OS reinstallation, all custom skills residing in ~/.claude/skills and ~/.gemini/antigravity/skills were completely wiped. Re-authoring the nuanced prompt heuristics, regular expressions, and edge-case exceptions from memory takes over 30 hours of lost development time, introducing regressions across the entire team's pull request reviews.

Multi-machine development exposes the fundamental fragility of managing high-value prompts as disposable text snippets. When you need a skill in production, having it trapped on another laptop is indistinguishable from never having authored it at all.

Why Do Git Dotfiles and Cloud Drives Fail for Multi-Laptop Sync?

Git dotfiles repositories and consumer cloud drives fail for multi-laptop prompt synchronization because they create severe synchronization latency, file lock collisions, and operating system path coupling. Developers frequently attempt to solve prompt sprawl using git repositories with symlinks or by pointing agent directories to iCloud Drive or Dropbox, only to trigger corrupt states and silent agent failures.

Consider the mechanical limitations of each improvised sync mechanism:

  • Manual Git synchronization latency: Managing prompts via a dedicated Git dotfiles repo requires a continuous discipline of git add, git commit, and git push on machine A, followed by git pull on machine B. In practice, engineers refine prompts during active flow states and rarely commit them immediately. The result is a perpetual 45-to-60-second administrative friction tax, stale instructions on the receiving machine, and merge conflicts inside JSON or Markdown configs when changes occur concurrently.
  • Cloud storage file locking and dataless evictions: Pointing ~/.claude/skills or .cursor/rules to a cloud-synced folder such as iCloud Drive, Dropbox, or OneDrive introduces file-locking race conditions. Cloud storage services like iCloud Drive and Dropbox trigger silent agent failures when background synchronization locks active rule files during concurrent editor write operations. Furthermore, cloud storage clients frequently replace physical directories with virtual dataless placeholders (such as macOS FileProvider evictions), causing terminal agents to throw immediate "file not found" exceptions.
  • Symlink fragility across environments: Symlinking files from a central dotfiles folder into ~/.claude/skills or repository worktrees breaks whenever directory trees differ between macOS (e.g., /Users/username) and Linux development servers or Docker containers (e.g., /home/username). If a symbolic link points to an unmounted volume or non-existent path, coding agents skip the skill silently without logging an error.

How Do Different Cross-Laptop Sync Methods Compare?

Comparing prompt and skill synchronization approaches requires evaluating five critical engineering criteria: setup friction, multi-tool agent compatibility, synchronization latency, hotkey insertion speed, and merge conflict safety. Choosing the right architecture depends on whether you are synchronizing for personal terminal workflows or managing shared standards across a distributed engineering team.

Sync ArchitectureSetup FrictionCross-Tool CompatibilitySync LatencyHotkey InsertionPrimary Risk
Prompttly (Native Mac App)Zero (One-click sign in)Universal (Claude Code, Codex, Cursor, Antigravity)Real-time (< 200ms background sync)Native sub-200ms global paletteRequires dedicated Mac utility
Git Dotfiles + SymlinksHigh (Shell scripting & maintenance)CLI-only (Requires manual file mapping)Manual (Requires push/pull discipline)None (Terminal files only)Broken symlinks and dirty worktrees
Cloud Folders (iCloud/Dropbox)Low (Drag and drop)Poor (Filesystem path limitations)Variable (Daemon background sync)None (Finder storage only)File locking and conflicted copy sprawl
Snippet Expanders (Raycast/Alfred)Moderate (Manual text pasting)GUI-only (Cannot write to CLI agent paths)Fast (Proprietary cloud sync)Excellent (Global hotkey menu)Flat strings only; no SKILL.md packages
In-Repo Git Files OnlyZero (Committed with project code)Single-repo only (.cursor/rules)Tied to branch checkoutsNoneWorkflows vanish outside that specific repo

Comparing dedicated tools to synchronize rules and prompt packages across multi-agent setups? Explore our evaluation of the best AI skill managers, how to fix Claude skills across projects and worktrees, or how to eliminate insertion delays with an AI prompt command palette.

Manual Baseline: How Do You Archive and Copy Complete Skill Packages?

To manually archive and copy complete skill packages between computers, package the entire directory tree containing the root SKILL.md alongside all supporting scripts, references, and template assets using tar. Copying only the markdown file results in missing dependencies and immediate runtime failures on the destination machine.

# On the source machine (archive complete directory packages)
tar -czf claude-skills-backup.tgz -C ~/.claude skills

# On the destination machine (restore directory structure)
mkdir -p ~/.claude
tar -xzf claude-skills-backup.tgz -C ~/.claude

This is a migration pattern, not an ongoing synchronization architecture. It is effective for initial machine onboarding, but it does not resolve active edits across multiple machines. If you are not sure where the folders belong, read our guide on Claude skills across projects and directory scopes before moving files. For a one-time hardware change, follow the Claude Code settings transfer checklist before you wipe the old computer.

Disaster Recovery: Backing Up Multi-Agent Skills Before Syncing

Backing up Claude Skills and AI agent workflows protects months of refined engineering judgment, structured quality assertions, and automated tool integrations. When developers look to backup Claude Skills, the underlying risk is not simply recovering a Markdown snippet; it is preserving the dependable, repeatable behaviors that power autonomous development workflows in Claude Code, Google Antigravity, and OpenAI Codex.

As detailed in the Anthropic Claude Code Overview, agent skills represent modular software capability packages. A complete backup must preserve 3 indispensable layers: the procedural SKILL.md manifest, all supporting execution scripts and references in subdirectories, and the granular Git commit history that explains why constraints were introduced.

Before creating a backup archive, catalog every local directory where AI agent skills and custom instructions reside across your workstation:

  1. Claude Code Skills: Global skills in ~/.claude/skills/ and project-scoped skills in <repo>/.claude/skills/.
  2. Google Antigravity Skills: Global skills in ~/.gemini/antigravity/skills/ and workspace skills in <repo>/.gemini/skills/. (See our Google Antigravity skills guide).
  3. OpenAI Codex Skills: Global packages in ~/.codex/skills/ and repository rules in AGENTS.md. (See our Codex skills guide).
  4. Cursor IDE Rules: Workspace-scoped rule manifests in <repo>/.cursor/rules/*.mdc.

How Do Different Skill Backup Strategies Compare?

Choosing the right backup strategy depends on whether you require quick point-in-time archives, collaborative team version control, or automated multi-agent synchronization across multiple operating systems.

Backup StrategyVersion HistoryMulti-Agent SyncRecovery SpeedPrimary Risk
Local Tarball (.tgz)None (snapshot only)Manual copy< 30 secondsBecomes stale immediately after next edit
Private Git RepositoryComplete (commit diffs)Requires symlinks< 1 minuteLocal edits drift if developer forgets to push
Cloud Storage SyncBasic file versioningUnreliable for symlinks2–5 minutesSync collisions and lockfile corruptions
Dedicated Skill ManagerAutomated cloud historyNative two-way syncInstant (real-time)Requires establishing clean skill taxonomy

Automating Multi-Agent Skill Backups with Shell Scripts

To create an automated, reproducible backup that captures skills across Claude Code, Google Antigravity, and OpenAI Codex, use this POSIX-compliant backup automation script. It generates a compressed, timestamped tarball and stages changes cleanly.

#!/usr/bin/env bash
set -euo pipefail

BACKUP_DIR="${HOME}/.ai-skill-backups"
TIMESTAMP="$(date +%Y-%m-%d_%H%M%S)"
ARCHIVE_PATH="${BACKUP_DIR}/ai-skills-backup-${TIMESTAMP}.tar.gz"

mkdir -p "${BACKUP_DIR}/staging"

echo "[*] Archiving Claude Code skills..."
[ -d "${HOME}/.claude/skills" ] && cp -R "${HOME}/.claude/skills" "${BACKUP_DIR}/staging/claude-skills"

echo "[*] Archiving Google Antigravity skills..."
[ -d "${HOME}/.gemini/antigravity/skills" ] && cp -R "${HOME}/.gemini/antigravity/skills" "${BACKUP_DIR}/staging/antigravity-skills"

echo "[*] Archiving OpenAI Codex skills..."
[ -d "${HOME}/.codex/skills" ] && cp -R "${HOME}/.codex/skills" "${BACKUP_DIR}/staging/codex-skills"

echo "[*] Compressing backup archive..."
tar -czf "${ARCHIVE_PATH}" -C "${BACKUP_DIR}/staging" .
rm -rf "${BACKUP_DIR}/staging"

echo "[+] Successfully created skill backup: ${ARCHIVE_PATH}"

Refer to the official Git Documentation for best practices on structuring semantic commit messages when pairing local archive scripts with remote repository tracking.

How Do You Test and Verify a Skill Backup Before Disaster Strikes?

An untested backup is merely an assumption of safety. To guarantee that your AI agent skills will perform flawlessly following a machine migration or disk failure, execute this 5-point disaster recovery checklist in an isolated sandbox environment:

  1. Step 1: Extract into a Clean Staging Directory. Extract the archive into a temporary folder (e.g. /tmp/skill-restore-test) to verify archive integrity.
  2. Step 2: Verify Multi-File Hierarchy. Confirm that all scripts/, references/, and examples/ directories are intact and have appropriate read/execute permissions (chmod +x).
  3. Step 3: Validate YAML Manifests. Check that all SKILL.md files parse valid YAML frontmatter without syntax errors or broken indentation.
  4. Step 4: Execute a Dry-Run Agent Invocation. Launch Claude Code or Google Antigravity pointing to the restored directory and invoke the skill against a sample codebase.
  5. Step 5: Assert Expected Output Shape. Confirm that the agent follows the specified rubric, runs helper scripts without missing dependency errors, and produces deterministic results.

How Do You Design Environment-Agnostic Prompts and Skills?

Designing environment-agnostic prompts ensures that instructions execute deterministically regardless of operating system, directory layout, or local tool configurations. Rules that function flawlessly on a macOS workstation frequently fail on a Linux server or Windows desktop if they contain hardcoded machine assumptions. For an in-depth breakdown of line ending, path separator, and permission traps, see our guide on moving AI agent skills across macOS, Linux, and Windows.

Environment-agnostic prompt architecture decouples absolute system paths from behavioral instructions, preventing broken dependencies when moving across macOS and Linux laptops. Follow three core architectural principles:

  1. Ban absolute filesystem paths: Never write instructions containing hardcoded user paths such as /Users/omer/projects/backend. Instead, instruct the agent to discover repository roots dynamically using git or relative workspace references: git rev-parse --show-toplevel.
  2. Abstract local environment variables: Avoid referencing system-specific secrets or environment variables directly inside the prompt text. Direct agents to verify variables through standard shell conventions: echo "\$API_BASE_URL" or read from local .env.local files.
  3. Separate tool invocation from instruction logic: When guiding terminal agents, specify the expected tool capability rather than editor-specific hotkeys. Rather than specifying "press Cmd+K in Cursor," formulate instructions in terms of intent: "Inspect modified files using git diff and suggest targeted unit tests."

A Safe 6-Step Sync Process for AI Agent Workflows

Use this process whenever you transition from scattered local skills to an organized, multi-machine synchronized library:

  1. Inventory local folders across all agents: List every skill in ~/.claude/skills, ~/.codex/skills, and any project-level .cursor/rules folders you rely on.
  2. Segregate personal style from repository constraints: Keep codebase conventions in version-controlled repo files (like .cursor/rules or AGENTS.md) and move personal skills into a centralized library that follows you everywhere.
  3. Deduplicate overlapping workflows: Audit and merge near-identical skills before syncing to prevent confusion during agent invocation. Do not maintain code-review, review-code, and diff-review simultaneously.
  4. Preserve complete multi-file directory packages: Standardize multi-file skills with an entrypoint SKILL.md and dedicated asset subdirectories (scripts/, templates/, references/, examples/) as outlined in our guide to modular Claude skills.
  5. Sync working copies into each computer: Write working packages into the native filesystem locations expected by Claude Code and Codex on both your work laptop and personal desktop.
  6. Test with identical tasks across machines: Run one realistic verification prompt on both machines and assert that execution behavior, helper scripts, and structured outputs match.

How Does Prompttly Solve Cross-Laptop Skill and Prompt Synchronization?

Prompttly solves cross-laptop skill and prompt synchronization by functioning as a centralized system of record that unifies CLI terminal agents, IDE extensions, and browser interfaces into one managed ecosystem.

Prompttly is a skill manager for AI agents — one library for your skills and prompts that syncs into Claude Code, Codex, ChatGPT, and Claude and is one hotkey away on your Mac, so your setup follows you across every machine, repo, and tool.

Prompttly's two-way sync on macOS writes changes back to local agent directories like ~/.claude/skills and ~/.codex/skills without requiring manual git commit or push steps. This architecture delivers four primary capabilities for developers operating across multiple computers:

  • Bidirectional Filesystem Synchronization: When you author or modify a skill inside Claude Code on your work laptop, Prompttly detects the file change and synchronizes the update to your personal machine in real time, updating the local ~/.claude/skills directory automatically.
  • Instant Global Mac Hotkey Palette: Pressing a global hotkey on macOS brings up an ultra-fast palette with sub-200ms retrieval latency. Engineers can search across hundreds of prompts, skills, and custom rules and inject them instantly into Cursor Composer, ChatGPT, Claude.ai, or terminal windows.
  • Multi-Tool Agent Translation: Prompttly formats and distributes your library to match the exact schema required by each agent—writing native SKILL.md packages for Claude Code and OpenAI Codex, while formatting system preambles for web models.
  • Model Context Protocol (MCP) Integration: Through native MCP connectivity, any supported agent can query your Prompttly library programmatically, retrieving relevant instructions dynamically during active reasoning sessions. Explore our technical walkthrough on building a multi-machine AI skill sync pipeline using MCP.

Before and After: From Scattered Files to Portable Skills

Before syncAfter sync
A review skill exists only on the work laptop.The skill lives in one library and syncs to every machine that needs it.
Three repos contain slightly different copies of the same checklist.One canonical skill is shared, versioned, and linked from related project workflows.
A teammate sends a folder in Slack, then nobody knows which version is current.The team uses a shared library with version history and a clear owner.

If the problem is team distribution rather than just multi-machine sync, use the Claude Skills team sharing guide to define owners, review updates, and roll out approved skills without private forks.

What Are the Most Common Pitfalls When Syncing AI Rules Across Laptops?

The most common pitfalls when syncing AI rules across laptops include branch desynchronization, context window over-allocation, and silent schema validation errors. Understanding these traps prevents unexpected agent hallucinations and broken workflows across hardware transitions:

  • Trapping global rules inside feature branches: If you add a broadly useful prompt to .cursor/rules inside a temporary feature branch (e.g., fix/auth-token-leak), that rule disappears the moment you switch branches or check out another repository. Keep global rules in your centralized skill manager and reserve in-repo files strictly for project constraints. For a detailed breakdown of scope boundaries, see Claude skills vs Cursor rules.
  • Context window bloat: Copying twenty separate rules into auto-attaching Cursor rules or global skill entrypoints consumes significant context before an agent executes its first action. In models with constrained active attention, excessive prompt injection degrades reasoning performance. Keep entrypoint descriptions tight and lazy-load detailed references only when needed.
  • Dirty worktree conflicts in dotfile submodules: Using git submodules inside agent directories frequently leaves worktrees in a detached HEAD state when switching laptops. When an agent attempts to write an updated prompt or log, the write fails due to unmerged conflicts.
  • Operating system path discrepancies: Syncing shell scripts or automation hooks inside multi-file skills between macOS and Linux can cause execution failures if scripts rely on macOS-specific paths (such as /opt/homebrew/bin) or BSD command flags instead of POSIX standards.
  • Syncing only the entrypoint: Multi-file skills often depend on examples, templates, and references in subdirectories. Moving only SKILL.md results in immediate broken dependency errors.
  • Storing sensitive credentials in skills: Never hardcode API keys or database tokens inside skill scripts; use environment variables or MCP servers instead.

Post-Sync Verification Checklist

  1. Confirm each skill folder exists on the target machine in ~/.claude/skills.
  2. Confirm the entrypoint is named SKILL.md.
  3. Open the skill and verify the frontmatter still matches the intended use case.
  4. Check that templates, examples, references, and scripts traveled with the folder.
  5. Run one real task that should trigger the skill.
  6. Compare output structure across machines.
  7. Remove stale duplicates after the synced version works.

For a deeper authoring, install, and invocation workflow, use how to install and use Claude Skills alongside our agent skills and SKILL.md guide.

Start from the resources hub for the full Claude Skills and multi-agent series. If you manage multiple machines or work with secondary computers, read our guide on syncing Cursor rules across machines. Read our guide on Claude skills across projects and directory scopes to choose personal or project scope, use the new-computer transfer guide for one-time migrations, then use the usage guide to test behavior after sync. You can draft a reusable workflow with the free Claude Skill Creator or structure system instructions with the free Custom Instructions Generator.

People Also Ask About Syncing and Backing Up Claude Skills and Prompts

How do I sync Claude Skills between computers?

To sync Claude Skills between computers, keep the complete skill folders in one durable library, then sync or copy them into the Claude Code skills folder (~/.claude/skills) on each machine. Confirm every skill still has its SKILL.md manifest, frontmatter parameters, and supporting files intact after synchronization.

Why do AI prompts and Cursor rules fail to sync automatically between laptops?

AI tools store instructions in fragmented, local-only directories—such as ~/.claude/skills for Claude Code, .cursor/rules for Cursor, and ~/.codex/skills for OpenAI Codex. Because each tool reads from separate filesystem paths or private browser storage, instructions do not sync across machines without an external synchronization layer.

How do I back up Claude Code and AI agent skills before syncing?

Back up AI agent skills by archiving complete skill directories—including SKILL.md, executable scripts in scripts/, golden schemas in examples/, and API reference sheets in references/—from ~/.claude/skills, ~/.gemini/antigravity/skills, and ~/.codex/skills into an authoritative version-controlled repository or automated cloud skill manager.

Why is copying only SKILL.md insufficient for an AI skill backup?

Copying only the root SKILL.md file results in 100% loss of multi-file dependencies such as Python validator scripts in scripts/, golden schemas in examples/, and API reference sheets in references/, causing skills to fail silently upon restoration.

Why does syncing prompt folders with iCloud or Dropbox cause corruption?

Cloud storage services like iCloud Drive and Dropbox do not handle rapid file locks or atomic writes cleanly. When coding agents or editors write temporary state files or parse YAML frontmatter simultaneously, background cloud sync frequently creates conflicted copies, corrupts symbolic links, or triggers duplicate skill loading errors.

How should I handle repository-specific rules versus personal skills across laptops?

Repository-specific guidelines (such as test runners and schema boundaries) should live inside version-controlled repository files like .cursor/rules or AGENTS.md. Personal workflows (such as code review checklists, refactoring patterns, and PR drafting) should live in a centralized, cross-agent skill manager that syncs globally across all your development machines.

Can I use a Git dotfiles repo to sync prompts and skills across computers?

Git dotfiles repositories provide version control and commit histories, but they require manual commit, push, and pull commands on every machine switch. They also suffer from dirty worktree conflicts, break symlinks when directory paths differ between macOS and Linux, and lack native hotkey insertion for browser-based AI chats.

How do I test and verify an AI skill backup before disaster strikes?

Verify your backup by restoring an archived skill package into an isolated staging directory, executing a dry-run task in Claude Code, Antigravity, or Codex, and asserting that the agent produces the exact expected structured output.

Why did my Claude Skill disappear on a new laptop?

The most common reason is that the skill lived only in a local Claude Code folder on the old machine. Local skill folders do not automatically follow you unless you back them up, copy them, sync them, or manage them in a shared library.

What should I check after syncing a Claude Skill?

Check the folder name, SKILL.md filename, frontmatter, supporting files, invocation behavior, and output format. Run the same realistic task on both computers before trusting the sync.

Stop rebuilding skills and rules on every machine

Use Prompttly to keep one versioned skill library and sync working skills into Claude Code, Codex, and Cursor as real folders, with instant sub-200ms hotkey access anywhere on your Mac.