Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
camacho avatar

Sync Dotfiles

  • 39 installs
  • 1 repo stars
  • Updated May 26, 2026
  • camacho/ai-skills

sync-dotfiles is a Claude skill that syncs user-level AI configs like ~/.claude and ~/.codex with a dotfiles directory via a bundled sync.sh script.

About

This skill syncs user-level AI configuration directories such as ~/.claude/ and ~/.codex/ with a dotfiles/ directory. It maps user intent to sync.sh subcommands like diff, status, pull (home wins), push (repo wins), and skills-push, and auto-discovers the ai-env repo where dotfiles live. A developer uses it when configs drift, after sessions that change permissions or hooks, or when setting up a new machine. It matters because it keeps agent configuration version-controlled and consistent across machines.

  • Syncs user-level AI configs (~/.claude/, ~/.codex/) with a dotfiles/ directory
  • Maps intent to sync.sh subcommands: diff, status, pull, push, skills-push
  • Auto-discovers the ai-env repo and shows drift before choosing a direction

Sync Dotfiles by the numbers

  • 39 all-time installs (skills.sh)
  • Ranked #822 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

sync-dotfiles capabilities & compatibility

Capabilities
config sync · environment management · dotfiles
Works with
github
From the docs

What sync-dotfiles says it does

Sync user-level AI configs (~/.claude/, ~/.codex/) with the dotfiles/ directory.
SKILL.md
Use when dotfiles drift, after sessions that change permissions/hooks, on new machines, or when the user says "sync", "pull dotfiles", "push configs".
SKILL.md
npx skills add https://github.com/camacho/ai-skills --skill sync-dotfiles

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs39
repo stars1
Last updatedMay 26, 2026
Repositorycamacho/ai-skills

What it does

Sync user-level AI configs like ~/.claude and ~/.codex with a dotfiles repo and resolve drift safely.

Who is it for?

Developers keeping ~/.claude and ~/.codex configs version-controlled and consistent across machines

Skip if: Projects that do not use the ai-env dotfiles layout

When should I use this skill?

dotfiles drift, after sessions that change permissions or hooks, on a new machine, or when the user says 'sync', 'pull dotfiles', 'push configs'

What you get

User-level configs synced with the dotfiles repo in the chosen direction after drift is shown

  • synced ~/.claude and ~/.codex configs
  • drift diff between repo and home

By the numbers

  • 6 intent-to-subcommand mappings
  • 4-step AI_ENV_ROOT discovery chain

Files

SKILL.mdMarkdownGitHub ↗

When to invoke

  • User says "sync dotfiles", "pull configs", "push configs", "check drift"
  • After a session where permissions or hooks were modified
  • On a new machine after cloning ai-env

Subcommands

Map user intent to sync.sh subcommand:

IntentCommandWhat it does
"check what's different"sync.sh diffShow drift between repo and home
"what's tracked"sync.sh statusShow file registry
"capture my local changes"sync.sh pullHome → repo (home wins)
"deploy repo configs"sync.sh pushRepo → home (repo wins)
"install skills"sync.sh skills-pushInstall global skills from dotfiles/skills-lock.json
"sync" (ambiguous)Show diff first, then ask directionSafe default

Running sync.sh

The sync script is bundled with this skill at sync.sh (same directory as this SKILL.md). Run it directly — the script discovers the ai-env repo automatically:

/path/to/skill/sync.sh <subcommand>

The script sets AI_ENV_ROOT automatically via the discovery chain below. To override:

AI_ENV_ROOT=/custom/path/to/ai-env /path/to/skill/sync.sh push

AI_ENV_ROOT discovery

The script discovers the ai-env repo (where dotfiles/ lives) automatically: 1. If $AI_ENV_ROOT is set and $AI_ENV_ROOT/dotfiles exists: use that 2. If the script is inside an ai-env git repo (e.g., running from a symlink): use that repo root 3. If ~/projects/camacho/ai-env exists: use that 4. Clone camacho/ai-env to a temp dir via GitHub 5. If clone fails: error with instructions to set AI_ENV_ROOT

After pull

Show git diff dotfiles/ and offer to commit: chore: sync dotfiles

After push

Run sync.sh status to confirm, warn about any missing files.

Related skills

FAQ

What does pull vs push do?

pull copies home to repo (home wins) to capture local changes; push copies repo to home (repo wins) to deploy configs.

How does it find the ai-env repo?

Via a discovery chain using AI_ENV_ROOT, the enclosing git repo, ~/projects/camacho/ai-env, or a temp clone.

DevOps & CI/CDinfradeploy

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.