Agent skill

Chezmoi Reconcile

by narze in narze/dotfiles

Reconcile drift between the local machine and the chezmoi dotfiles repo, deciding per file whether the machine edit or the repo source wins.

MITAuto-check: warningsDevOps & Cloud

Install Chezmoi Reconcile

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add narze/dotfiles --skill chezmoi-reconcile -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install narze/dotfiles chezmoi-reconcile --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/narze/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/chezmoi-reconcile .claude/skills/chezmoi-reconcile && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
chezmoi-reconcile
GitHub stars
174
Token cost
~1k tokens
SKILL.md length
520 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Reconcile drift between the local machine and the chezmoi dotfiles repo, deciding per file whether the machine edit or the repo source wins.

  • Works in 4 steps: Inventory the drift → Present every drift as a choice → Apply the choices → …
  • The user asks to run chezmoi diff
  • SKILL.md covers Overview, Workflow and Verify and finish
  • Calls git

What it does

Chezmoi Reconcile is an agent skill from narze/dotfiles. Reconcile drift between the local machine and the chezmoi dotfiles repo, deciding per file whether the machine edit or the repo source wins. Use whenever the user asks to run chezmoi diff, resolve chezmoi conflicts, sync or update dotfiles, check why chezmoi apply wants to change things, or fix drift after editing a managed config. Also trigger on /chezmoi-reconcile.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud. It works with Bash, macOS, Ansible and Homebrew. The repository describes itself as: macOS / Linux / Codespaces compatible dotfiles with 1-line setup script. Tested on Apple Silicon Macs. Supports both zsh and fish. Managed with Chezmoi. The licence is MIT.

When your agent uses it

  • The user asks to run chezmoi diff
  • Resolve chezmoi conflicts
  • Update dotfiles
  • Check why chezmoi apply wants to change things

Example prompts

  • “/chezmoi-reconcile”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Inventory the drift
  2. Present every drift as a choice
  3. Apply the choices
  4. Run pending scripts

What it can do on your machine

Read from SKILL.md and the folder at commit a2104ed. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Chezmoi Reconcile loads about 1k tokens when it runs. Until then it costs about 98 tokens; SKILL.md has 520 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~98
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:57
    encryption, e.g. `chezmoi add --encrypt ~/.ssh/config`. Verify the source path is unchanged with `chezmoi source-path` a

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from narze/dotfiles at commit a2104ed, republished under its MIT licence (© narze). 520 words, ~1,034 tokens.

Download SKILL.mdSave it as .claude/skills/chezmoi-reconcile/SKILL.md (or your agent's skills folder).
name
chezmoi-reconcile
description
Reconcile drift between the local machine and the chezmoi dotfiles repo, deciding per file whether the machine edit or the repo source wins. Use whenever the user asks to run `chezmoi diff`, resolve chezmoi conflicts, sync or update dotfiles, check why `chezmoi apply` wants to change things, or fix drift after editing a managed config. Also trigger on /chezmoi-reconcile.

Reconcile chezmoi dotfiles

Overview

Dotfiles live in the chezmoi/ source directory (set by .chezmoiroot), not the repo root. The real files under $HOME are the destination; the repo files are the source/target. Drift is normal: apps regenerate their own config, and the user edits managed files by hand.

This skill walks the drift file by file, asks the user which side wins, applies the choice, and verifies a clean result. Never run a blanket chezmoi apply before resolving drift: it silently overwrites local edits, which is exactly what the user is trying to decide about.

Workflow

1. Inventory the drift

Run both commands:

bash
chezmoi status
chezmoi diff

Read chezmoi diff carefully. In each hunk, - lines exist only on the machine and + lines exist only in the repo source. So - marks a local edit that apply would delete, and + marks repo content that apply would write.

Read chezmoi status as two status columns. MM means the file differs on both sides (a real conflict to resolve). R marks run scripts, which are handled separately (step 4).

For each conflicting managed file, find its source path:

bash
chezmoi source-path ~/.config/example/config.toml
2. Present every drift as a choice

Do not decide for the user. Present one row per file with the machine-side content and the repo-side content side by side, then ask which wins. Group independent files into a single set of questions so the user can answer them together, but keep each file its own decision.

Each file resolves one of three ways:

ChoiceCommandEffect
Keep local, update repochezmoi add <target>Machine file becomes the source; commit later
Take repo, overwrite localchezmoi apply --force <target>Machine file is reverted to the source
SkipnoneLeave it diverged for now
Show full SKILL.md (238 more words)Show less
3. Apply the choices

chezmoi apply only touches a destination file when it differs from the source, so it is safe to run specific targets.

  • Keep local: chezmoi add ~/.config/example/config.toml
  • Take repo: chezmoi apply --force ~/.config/example/config.toml

Two non-interactive gotchas cause chezmoi: could not open a new TTY: open /dev/tty: device not configured and must be avoided in an agent shell:

  • chezmoi apply prompts "has changed since chezmoi last wrote it?" for every modified destination. Pass --force to accept the overwrite the user already approved.
  • chezmoi add on an encrypted file prompts "would remove encrypted attribute". Pass --encrypt to preserve encryption, e.g. chezmoi add --encrypt ~/.ssh/config. Verify the source path is unchanged with chezmoi source-path afterwards.
4. Run pending scripts

New or changed run scripts show as R in chezmoi status and appear in chezmoi diff as new files. run_* scripts run on every apply, so they always show R; that is expected and not drift. Run them with:

bash
chezmoi apply --force

An "elsewhere" run script runs all other scripts in scripts/<os>/. Confirm it exits 0.

Verify and finish

bash
chezmoi diff          # should show only run_ scripts, which always appear
chezmoi status        # conflicts gone; only run-script R lines remain
git status --short    # repo source files that "keep local" updated

The chezmoi: warning: config file template has changed, run chezmoi init to regenerate config file warning is pre-existing; ignore it unless the user asks about it.

Only "keep local" files change the repo. Commit when the user asks, in small commits, with a plain dash (never an em dash). Report which files went each way, which scripts ran, and the final git status.

© narze, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/chezmoi-reconcile of narze/dotfiles.

Open the folder on GitHubat commit a2104ed

Compare with similar skills

Chezmoi Reconcile next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Chezmoi Reconcile compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Chezmoi Reconcile this skillnarze/dotfiles174—~1kAutomated safety check: WarnMIT
New Mac Setupswyxio/skills176—~4.3kAutomated safety check: PassMIT
Mac App Releasesteipete/agent-scripts7.3k—~2.3kAutomated safety check: PassMIT
Reproduce macOS Python FlavorsNuitka/Nuitka15k—~1.7kAutomated safety check: PassAGPL-3.0
Ansible Playbook Updatervinta/hal-9000138—~1.4kAutomated safety check: PassMIT
CodexBar macOS Releasesteipete/CodexBar22k—~1.5kAutomated safety check: PassMIT

Similar skills

  • New Mac Setup

    swyxio/skills

    Fully automated new Mac setup for fullstack web developers and AI engineers.

    176 GitHub stars~4.3k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Mac App Release

    steipete/agent-scripts

    Release workflow for Sparkle-updated macOS apps, driven by a repo-owned manifest and a shared script covering appcast, signing, GitHub Release and Homebrew closeout.

    7.3k GitHub stars~2.3k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Reproduce macOS Nuitka issues across Python distributions and GitHub Actions Python packaging.

    15k GitHub stars~1.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Keeps Ansible install tasks in line with upstream docs by fixing version, install-method and link drift one tool at a time, with a commit for each.

    138 GitHub stars~1.4k tokensUpdated today
    DevOps & CloudAuto-check passed
  • CodexBar macOS Release

    steipete/CodexBar

    Releases a signed, notarized CodexBar build: confirms the changelog, resolves signing credentials from 1Password, runs the release script in tmux, and updates the Sparkle appcast and Homebrew tap.

    22k GitHub stars~1.5k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Runbook for assessing and executing a Mole CLI release: distribution channels, pre-flight checks, capital-V tags, build artifacts and the handoff to curated release notes.

    70k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed

More from narze/dotfiles

  • Upgrade

    narze/dotfiles

    Update this machine's Collie installation and verify the running bridge.

    174 GitHub stars~795 tokensUpdated 4 days ago
    Auto-check passed

Categories

Questions about Chezmoi Reconcile

What does Chezmoi Reconcile do?

Reconcile drift between the local machine and the chezmoi dotfiles repo, deciding per file whether the machine edit or the repo source wins. Chezmoi Reconcile is an agent skill from narze/dotfiles. Reconcile drift between the local machine and the chezmoi dotfiles repo, deciding per file whether the machine edit or the repo source wins.

When should I use Chezmoi Reconcile?

Chezmoi Reconcile fits situations like: the user asks to run chezmoi diff; resolve chezmoi conflicts; update dotfiles; check why chezmoi apply wants to change things.

How do I install Chezmoi Reconcile in Claude Code?

Run `npx skills add narze/dotfiles --skill chezmoi-reconcile -a claude-code`. Or copy the skill folder (.agents/skills/chezmoi-reconcile in narze/dotfiles) into .claude/skills/chezmoi-reconcile in your project. Claude Code loads it when a task matches its description.

How do I install Chezmoi Reconcile in Codex?

Run `npx skills add narze/dotfiles --skill chezmoi-reconcile -a codex`. Or copy the skill folder (.agents/skills/chezmoi-reconcile in narze/dotfiles) into .agents/skills/chezmoi-reconcile in your project. Codex loads it when a task matches its description.

Can I use Chezmoi Reconcile in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add narze/dotfiles --skill chezmoi-reconcile -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/chezmoi-reconcile, .gemini/skills/chezmoi-reconcile, .github/skills/chezmoi-reconcile and .opencode/skills/chezmoi-reconcile in your project.

What does Chezmoi Reconcile need to run?

Going by SKILL.md and its folder, Chezmoi Reconcile needs the command-line tools its instructions call (git).

Does Chezmoi Reconcile access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Chezmoi Reconcile safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Chezmoi Reconcile use?

Chezmoi Reconcile is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Chezmoi Reconcile use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Chezmoi Reconcile?

Skills that share tags, products or a category with Chezmoi Reconcile: New Mac Setup (swyxio/skills, 176 stars), Mac App Release (steipete/agent-scripts, 7.3k stars), Reproduce macOS Python Flavors (Nuitka/Nuitka, 15k stars) and Ansible Playbook Updater (vinta/hal-9000, 138 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Chezmoi Reconcile?

narze (a GitHub user) maintains it in narze/dotfiles, which has 174 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

Source: narze/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.