chezmoi-sync

chezmoi-sync is a skill for Claude Code from terrylica/cc-skills. It costs 42 tokens per session (827 once invoked), scanned A, original, MIT.

An interactive tool for checking whether files managed by chezmoi differ from the copies in your home directory. Chezmoi is a tool for managing configuration files, often called dotfiles, across a computer.

In plain words
What is it for?
Use it to inspect and synchronize tracked dotfiles, then commit and push approved changes when that option is chosen.
Why use it?
It reveals configuration drift before syncing changes. When differences exist, it asks whether to sync everything, review files individually, or ignore them.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the dotfiles-tools plugin — 2 skills shipped together , and of cc-skills

Good fit Use it to inspect and synchronize tracked dotfiles, then commit and push approved changes when that option is chosen.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/terrylica/cc-skills/chezmoi-sync
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add terrylica/cc-skills --skill chezmoi-sync
Clone the repo
git clone --depth 1 https://github.com/terrylica/cc-skills

Made for: Claude Code.

Or install dotfiles-tools, the plugin that ships this one along with the rest of its 2 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for chezmoi-sync

README.md
[![agentmods](https://agentmods.dev/badge/skills/terrylica/cc-skills/chezmoi-sync/github.svg)](https://agentmods.dev/skills/terrylica/cc-skills/chezmoi-sync)
Your own site
<a href="https://agentmods.dev/skills/terrylica/cc-skills/chezmoi-sync"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/chezmoi-sync/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for chezmoi-sync

Your own site · 80×15
<a href="https://agentmods.dev/skills/terrylica/cc-skills/chezmoi-sync"><img src="https://agentmods.dev/badge/skills/terrylica/cc-skills/chezmoi-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.00827
Opus 5 $0.00021 $0.00413
Sonnet 5 $0.00008 $0.00165
Haiku 4.5 $0.00004 $0.00083

Measured 5d ago against content hash d101495e4261, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

chezmoi-sync scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dotfiles-tools/skills/chezmoi-sync/SKILL.md · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Chezmoi Sync (Interactive)

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.

Workflow

Step 1: Check for drift

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.

Step 2: Present drift to user (AskUserQuestion)

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:

  • Sync allchezmoi re-add all drifted files, commit, and push
  • Review each — Walk through each file individually with per-file choices
  • Ignore — Skip sync, I'll handle it later

Step 3a: Sync all (if chosen)

chezmoi 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.

Step 3b: Review each (if chosen)

For each drifted file, use AskUserQuestion:

Question (header: "File action"):

"[filename] has changed. What should we do?"

Options:

  • Sync — Add this file to chezmoi source (chezmoi add <path>)
  • Diff — Show the full diff first, then ask again
  • Forget — Stop tracking this file (chezmoi forget --force <path>)
  • Skip — Leave it drifted for now

After processing all files, if any were synced:

chezmoi git -- add -A && chezmoi git -- commit -m "sync: dotfiles" && chezmoi git -- push

Read the full file on GitHub · 91 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 91 lines · 42 tokens per session scan A d101495e4261

Subscribe to this mod's changes

chezmoi-sync is a skill published in the GitHub repository terrylica/cc-skills (72 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 827 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.