sync-dotfiles
Installation
SKILL.md
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:
| Intent | Command | What it does |
|---|---|---|
| "check what's different" | sync.sh diff |
Show drift between repo and home |
| "what's tracked" | sync.sh status |
Show file registry |
| "capture my local changes" | sync.sh pull |
Home → repo (home wins) |
| "deploy repo configs" | sync.sh push |
Repo → home (repo wins) |
| "install skills" | sync.sh skills-push |
Install skills via npx |
| "sync" (ambiguous) | Show diff first, then ask direction | Safe 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:
- If
$AI_ENV_ROOTis set and$AI_ENV_ROOT/dotfilesexists: use that - If the script is inside an ai-env git repo (e.g., running from a symlink): use that repo root
- If
~/projects/camacho/ai-envexists: use that - Clone
camacho/ai-envto a temp dir via GitHub - 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.
Weekly Installs
8
Repository
camacho/ai-skillsFirst Seen
12 days ago
Security Audits
Installed on
codex8
amp5
cline5
opencode5
cursor5
kimi-cli5