chezmoi-update
This skill should be used when the user asks to "update chezmoi", "sync dotfiles", "match live state", "match repo state", "chezmoi re-add", "chezmoi diff fix", "chezmoi apply", or mentions chezmoi source/live discrepancies, divergence between dotfiles repo and filesystem, or wants to reconcile chezmoi state in either direction.
Best use case
chezmoi-update is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This skill should be used when the user asks to "update chezmoi", "sync dotfiles", "match live state", "match repo state", "chezmoi re-add", "chezmoi diff fix", "chezmoi apply", or mentions chezmoi source/live discrepancies, divergence between dotfiles repo and filesystem, or wants to reconcile chezmoi state in either direction.
Teams using chezmoi-update should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/chezmoi-update/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How chezmoi-update Compares
| Feature / Agent | chezmoi-update | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This skill should be used when the user asks to "update chezmoi", "sync dotfiles", "match live state", "match repo state", "chezmoi re-add", "chezmoi diff fix", "chezmoi apply", or mentions chezmoi source/live discrepancies, divergence between dotfiles repo and filesystem, or wants to reconcile chezmoi state in either direction.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Chezmoi Update — Syncing Source and Live State ## Principle: Live is Truth The live filesystem is always the source of truth. The chezmoi source (repo) is a **snapshot** of live state. All config files are plain files — no modify templates. ## Workflow 1. Run `chezmoi diff` to identify divergence 2. Classify each file by source filename 3. Sync using the correct method 4. Verify with `chezmoi diff` — expect empty output ## Classification ```bash chezmoi source-path ~/.example/config.json ``` | Source filename pattern | Type | Sync method | | ------------------------------ | ---------- | ---------------------- | | `*.tmpl` | Template | Edit template directly | | Plain file (no special prefix) | Plain file | `chezmoi re-add` | Also check for **permission diffs** (`old mode`/`new mode` in diff output): - Mode `100600` = private (needs `private_` in filename) - Mode `100644` = normal (no `private_` prefix) ## Live-to-Repo Sync (most common) Since live is truth, the typical operation is capturing live state back to source: ```bash chezmoi re-add ~/.example/config.json ``` Verify immediately with `chezmoi diff` — expect empty output. ## Repo-to-Live Sync Only use when the source was intentionally edited (e.g., a bug fix in a config): ```bash chezmoi apply ~/.example/config.json # specific file chezmoi apply --force ~/.example/config.json # if chezmoi warns about changes ``` ## Verification After any sync operation: 1. `chezmoi diff <path>` — expect empty output for each synced file 2. If diff persists, compare: `chezmoi cat <path>` vs `cat <path>` 3. For source repo changes, review `git diff` in the dotfiles directory ## Anti-Patterns - **Never use modify templates.** They create a fake SOT that drifts from reality and prevent `chezmoi re-add` from working. - **Never assume `re-add` succeeded without verifying.** Always check `chezmoi diff` after. - **Never apply without checking direction.** Confirm that source is intentionally ahead of live before overwriting live state.
Related Skills
chezmoi-helper
Chezmoi dotfiles management - templates, scripts, multi-machine config, and CLI operations When user works with chezmoi, dotfiles, mentions chezmoi commands, .tmpl files, or dotfile management
toolkit-recall
Search past decisions, prior research, conversation history, monorepo docs, and fetched web pages. Use toolkit recall search to find context from previous work, and toolkit fetch to save web pages for future search.
zod-patterns
Zod schema validation, type-safe development, and strict TypeScript patterns. When user works with Zod, validates data, creates schemas, handles form validation, mentions z.object/z.string patterns, needs runtime validation, type-safe code, or strict TypeScript configuration.
zellij-helper
Zellij terminal multiplexer for session management, layouts, and pane operations When user mentions Zellij, terminal multiplexer, zellij commands, sessions, panes, layouts, or tabs
worktree-workflow
Git worktree workflow for isolated feature development and PR creation When user starts new work, needs to switch contexts, or wants parallel development
vite-react-helper
Vite + React for fast modern web development - build config, HMR, hooks, state management, and performance patterns When user works with Vite, React, creates components, manages state, uses hooks, or configures Vite builds
version-management
Use when asking about version management, Renovate annotations, versions.ts patterns, or pinning image/chart versions.
typst-authoring
This skill should be used when the user asks to "write Typst", "create a Typst document", "format in Typst", "convert to Typst", "Typst syntax", "Typst template", "Typst math", "Typst table", or works with .typ files. Provides comprehensive Typst markup, scripting, math, layout, and styling reference for authoring documents. Also use proactively when generating .typ output files (e.g., in deep-research reports).
typescript-helper
TypeScript development guidance for type systems and tooling When user works with .ts or .tsx files, mentions TypeScript, or encounters type errors
torvalds-deployment
Use when asking about adding services, createXxxDeployment patterns, or homelab deployment conventions. Services use per-namespace charts.
terraform-helper
Terraform and OpenTofu infrastructure as code - HCL, providers, modules, state management, and CLI operations When user works with .tf files, mentions Terraform, OpenTofu, tofu, HCL, infrastructure as code, or tf commands
terminal-concepts
Comprehensive guide for building CLI and TUI applications - terminal internals, design principles, and battle-tested patterns When building CLI/TUI apps, implementing argument parsing, handling terminal input/output, escape codes, buffering, signals, or asking about terminal development concepts