mrskiro/dotfiles/syncing-chezmoi
Claude Code and agent skill by mrskiro/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
"chezmoi update" "chezmoi pull" "chezmoi upgrade" "dotfiles sync" "chezmoi同期" "dotfiles更新" — Sync and upgrade chezmoi: pull dotfiles, resolve conflicts with user confirmation, and optionally upgrade chezmoi itself via Homebrew.
Install
npx vskill@latest install mrskiro/dotfiles/syncing-chezmoiSKILL.md
The same SKILL.md was published earlier as mrskiro/dotfiles/syncing-chezmoi.
syncing-chezmoi
On activation, sync dotfiles from origin and apply them, resolving any conflicts with explicit user confirmation. Optionally upgrade chezmoi itself.
Steps
1. Upgrade chezmoi (if requested or outdated)
brew outdated chezmoi — if outdated, show the version diff and ask whether to upgrade. If yes: brew upgrade chezmoi.
2. Pull and apply
If it finishes with no error, report the updated files and stop.
3. Resolve a destination-state conflict
Trigger: stderr says <file> has changed since chezmoi last wrote it? followed by could not open a new TTY. git pull succeeded but apply bailed at the first locally-modified target.
For each file in the diff:
- Real value differences: present with
-= local (this PC),+= remote (source). Ask local / remote / merge. - local wins → edit source to match local, commit/push to origin, re-run
chezmoi diffto confirm empty - remote wins →
chezmoi cat <target> > <target>(see Gotchas:--forceis blocked) - merge → edit source to include the local-only keys, commit/push, then
chezmoi cat <target> > <target> - No real value differences (file got skipped by the bailout):
chezmoi apply <path>
End with chezmoi diff returning empty.
4. Resolve a git merge conflict in source
Trigger: cd $(chezmoi source-path) && git status shows unmerged paths. Rare — only happens if source was manually edited and origin diverged.
For each unmerged file:
git diff <file>—-= local (this PC),+= remote (upstream)- Ask: local or remote?
- Edit to keep the chosen side, remove conflict markers
git add <file>
After all resolved: git stash drop only if a stash exists. Then re-run chezmoi apply and handle any destination-state conflicts via step 3.
Gotchas
- `chezmoi update` bails at the first conflicting target.
git pullsucceeds but apply stops — every later file in apply order is left unapplied, even non-conflicting ones. Always runchezmoi diffafter a TTY error and apply the unrelated leftovers viachezmoi apply <path> - `chezmoi apply --force` is blocked by `~/.claude/hooks/pre-tool-safety.sh`. To overwrite a locally-modified target after user approval, use
chezmoi cat <target> > <target>— chezmoi renders the source (handling templates) and the redirect overwrites the local file - chezmoi-managed targets are write-protected by a PreToolUse hook. Edit/Write to a target file is rejected. Find the source via
chezmoi source-path <file>and edit there; commit and push so other machines receive it on the nextchezmoi update - Never auto-resolve conflicts. Always show the diff and ask local/remote/merge
- Never `git stash drop` before every source conflict is resolved
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdot_claude/skills/mrskiro/skills/syncing-chezmoi/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mrskiro/dotfiles/syncing-chezmoi)