Checks for chezmoi dotfile drift and interactively syncs changes. Replaces the automatic stop guard with on-demand sync, commit, and push.
Ships in dotfiles-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
On-demand replacement for the automatic chezmoi stop guard. Run this skill whenever you want to check for chezmoi drift and sync tracked dotfiles.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Run chezmoi status and chezmoi diff --no-pager to detect drift between the source repo and home directory.
chezmoi source-path && chezmoi status && echo "---" && chezmoi diff --no-pager | head -80
If output is empty (no drift), report "Chezmoi is clean — no drift detected" and stop.
If drift exists, use AskUserQuestion to show the user what drifted and ask what to do.
Question 1 (header: "Drift action"):
"Chezmoi detected N drifted file(s): [list files]. What would you like to do?"
Options:
chezmoi re-add all drifted files, commit, and pushchezmoi re-add --verbose
chezmoi git -- add -A && chezmoi git -- commit -m "sync: dotfiles" && chezmoi git -- push
chezmoi status # Verify clean
Report the commit hash and confirm clean state.
For each drifted file, use AskUserQuestion:
Question (header: "File action"):
"[filename] has changed. What should we do?"
Options:
chezmoi add <path>)chezmoi forget --force <path>)After processing all files, if any were synced:
chezmoi git -- add -A && chezmoi git -- commit -m "sync: dotfiles" && chezmoi git -- push
Report: "Skipped chezmoi sync. Run /dotfiles-tools:chezmoi-sync when ready."
chezmoi forget --force (not bare forget) to avoid TTY prompt issues~/gh/vjspc/dotfiles (configured in ~/.config/chezmoi/chezmoi.toml)After this skill completes, reflect before closing the task:
Do NOT defer. The next invocation inherits whatever you leave behind.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
2 skills in this plugin
/dotfiles-tools:chezmoi-syncfrom dotfiles-tools
npx claudepluginhub terrylica/cc-skills --plugin dotfiles-tools