Skip to content
Back to skills

Chezmoi Management

ASecurity

Expert guidance for managing and evolving a chezmoi-based dotfiles repo. Use for tasks like adding/removing managed files, debugging apply/diff/merge behavior, working with templates and data, `.chezmoiignore` rules, encryption/secret handling, and advanced workflows (hooks, scripts, conditional config). Prefer using Context7 to fetch the latest chezmoi docs when uncertain about flags, commands, or current behavior.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
code-qualitydebugging

Works with

  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill chezmoi-management --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Chezmoi Management?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Chezmoi Management
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-chezmoi-management/badge)](https://www.skillsdirectory.com/skills/david-li0406-chezmoi-management)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: chezmoi-management
description: Expert guidance for managing and evolving a chezmoi-based dotfiles repo. Use for tasks like adding/removing managed files, debugging apply/diff/merge behavior, working with templates and data, `.chezmoiignore` rules, encryption/secret handling, and advanced workflows (hooks, scripts, conditional config). Prefer using Context7 to fetch the latest chezmoi docs when uncertain about flags, commands, or current behavior.
---

# Chezmoi Management

Operate as a chezmoi power-user for dotfiles management: understand the source/target model, common CLI workflows, templating, ignore rules, and drift/conflict resolution.

## Default workflow

1. **Inspect state**: use `chezmoi status` and `chezmoi diff`.
2. **Edit source directly**: modify files in this repo (the source state) using normal file edits.
3. **Apply safely**: prefer `chezmoi apply --dry-run -v`, then `chezmoi apply`.
4. **Verify**: use `chezmoi verify` after larger refactors or machine moves.

`chezmoi edit <target-path>` is optional and mainly useful when you need to jump from a target path to the correct source file without thinking about mapping.

## Complexity decision tree

- **Simple change to one file**: edit the source file → `chezmoi apply <target>`.
- **New file should be managed**: add/create source file (or `chezmoi add <target>`) → `chezmoi apply`.
- **Unexpected diffs/drift**: `chezmoi diff -v` → `chezmoi verify` → troubleshoot.
- **Conditional/templated behavior**: inspect templates + `chezmoi data`.
- **Command ambiguity / version-specific behavior**: fetch latest docs via Context7.

## Chezmoi expertise checklist

When helping with a request, explicitly consider:
- **Source vs target**: user might be editing the wrong side.
- **Source file naming**: `dot_` prefixes, `private_` files, templated variants, etc.
- **Ignore rules**: `.chezmoiignore` patterns and conditionals.
- **Templates**: `{{ ... }}` logic, `chezmoi data`, external template execution.
- **Secrets**: whether encryption/secret workflows are in play.
- **Safe operations**: prefer dry-runs and diffs before applying.

## Context7 usage (required when unsure)

When you are uncertain about the correct chezmoi command/flag, or suspect behavior has changed across versions:

1. Call `context7_resolve-library-id` with `libraryName="chezmoi"`.
2. Call `context7_query-docs` with a targeted question (exact command/flag/workflow).
3. Prefer the newest documented behavior, and mention any assumptions.

## Repo-local awareness

This repo is a chezmoi source directory. When asked to implement a change here:
- Prefer changing the **source** under version control (not `~`), unless the user explicitly wants target-side behavior.
- Use searches to find existing patterns for templates/ignore rules before inventing new ones.

## References

- Practical command patterns: `references/commands-and-workflows.md`
- Common pitfalls: `references/troubleshooting.md`

Files in this skill

  • SKILL.md2.9 KB
  • references/commands-and-workflows.md1.9 KB
  • references/troubleshooting.md1.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…