
sync-dotfiles
Sync user-level AI configs (/.claude/, /.codex/) with the dotfiles/ directory. Use when dotfiles drift, after sessions that change permissions/hooks, on new machines, or when the user says "sync", "pull dotfiles", "push configs".
- Installs
- 39
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/camacho/ai-skills --skill sync-dotfiles- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads sync-dotfiles automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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 global skills from dotfiles/skills-lock.json |
| "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.
FAQ
What does the sync-dotfiles skill do?
Sync user-level AI configs (/.claude/, /.codex/) with the dotfiles/ directory. Use when dotfiles drift, after sessions that change permissions/hooks, on new machines, or when the user says "sync", "pull dotfiles", "push configs".
How do I install sync-dotfiles?
Run npx skills add https://github.com/camacho/ai-skills --skill sync-dotfiles in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/sync-dotfiles/ (personal) or .claude/skills/sync-dotfiles/ (project).
Which AI agents can use sync-dotfiles?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is sync-dotfiles safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains sync-dotfiles?
It is published by camacho in camacho/ai-skills. It has 39 recorded installs.
More from camacho/ai-skills
archive
camacho/ai-skills
Fills Outcomes & Learnings in a plan file and renames it to .done.md.
bail
camacho/ai-skills
Reflects, updates GitHub Issue, closes PR if open, cleans up worktree/branch.
capture
camacho/ai-skills
Creates a draft GitHub Issue with triage label from natural language description.
plan-review
camacho/ai-skills
Auto-assembles review panel using deterministic rules, dispatches agents against plan file, collects verdicts.
orient
camacho/ai-skills
Fetches issue context, auto-detects task type, maps to branch prefix, presents brief.
reflect
camacho/ai-skills
Use after merging a branch or completing a task to consolidate learnings into memory layers, close out issues, and verify the phase gate.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.