shepherdjerred/monorepo/chezmoi-helper
Claude Code and agent skill by shepherdjerred/monorepo
- community
- ext:[{"type":"template","description":"Custom templates for code generation"},{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
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
Install
npx vskill@latest install shepherdjerred/monorepo/chezmoi-helperSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Chezmoi Helper Agent
What's New
Recent chezmoi releases (latest: v2.69.3):
| Version | Key Changes | |
|---|---|---|
| v2.69.x | transcrypt/git-crypt encryption, Proton Pass support, TOML 1.1, --pq flag for age-keygen, --include/--exclude on unmanaged | |
| v2.68.x | --new flag on add, --re-encrypt on re-add, new edit-encrypted command, sourceFile variable fix | |
| v2.67.x | re-add manages exact\_ entries, fromIni/toIni round-trip fix, non-UTF-8 template warnings | |
| v2.66.x | --override-data-file/--override-data flags, --less-interactive mode, exec template function, grouped help output |
Overview
Chezmoi manages dotfiles across multiple machines from a single source of truth. The source directory (default: ~/.local/share/chezmoi) contains the declarative desired state. Run chezmoi apply to update the destination directory (~) to match.
Core workflow:
- Add files:
chezmoi add ~/.gitconfig - Edit source:
chezmoi edit ~/.gitconfig - Preview changes:
chezmoi diff - Apply changes:
chezmoi apply - Commit and push:
chezmoi cd && git add . && git commit && git push
Source directory location: ~/.local/share/chezmoi (view with chezmoi source-path)
Configuration file: ~/.config/chezmoi/chezmoi.toml (or .yaml/.json/.jsonc)
Naming Conventions
Chezmoi maps source filenames to target filenames using prefix/suffix attributes:
File Prefixes (applied in order)
| Source Prefix | Effect | Example | |
|---|---|---|---|
create_ | Only create if target missing | create_dot_bashrc -> .bashrc | |
modify_ | Modify script (stdin=existing, stdout=new) | modify_dot_gitconfig | |
remove_ | Remove target | remove_dot_old_config | |
encrypted_ | Decrypt on apply | encrypted_private_dot_ssh/id_rsa | |
private_ | Set permissions 0o600/0o700 | private_dot_ssh | |
readonly_ | Remove write bits | readonly_dot_config | |
empty_ | Keep file even if empty | empty_dot_placeholder | |
executable_ | Set executable bit | executable_dot_local/bin/myscript | |
symlink_ | Create symlink (contents = target) | symlink_dot_vimrc | |
dot_ | Replace with leading . | dot_gitconfig -> .gitconfig | |
.tmpl | Process as Go template | dot_bashrc.tmpl |
Directory Prefixes
| Source Prefix | Effect | |
|---|---|---|
exact_ | Remove entries not in source | |
private_ | Set 0o700 permissions | |
readonly_ | Remove write bits |
Script Prefixes
| Source Prefix | Execution | |
|---|---|---|
run_ | Every chezmoi apply | |
run_once_ | Once per unique content hash | |
run_onchange_ | When content changes | |
before_ | Before file operations | |
after_ | After file operations |
Combined Prefix Examples
Prefixes combine: private_dot_config -> .config (mode 0o700), run_onchange_after_install.sh.tmpl -> templated script that runs after apply when content changes.
CLI Quick Reference
Template Basics
Chezmoi uses Go text/template syntax with sprig functions. Files ending in .tmpl or placed in .chezmoitemplates/ are processed as templates.
Common Variables
OS-Conditional Configuration
Password Manager Integration (1Password)
Reusable Templates
Place shared templates in .chezmoitemplates/ and include with:
Template Data
Define custom data in .chezmoidata.yaml, .chezmoidata.toml, or .chezmoidata.json at the root of the source directory. Access with {{ .customKey }}.
User's Chezmoi Patterns
This repository demonstrates several chezmoi patterns:
- OS-conditional ignoring:
.chezmoiignoreuses templates to ignore Windows-only paths on non-Windows, and macOS-only paths on non-macOS - OS-conditional Brewfile:
dot_Brewfile.tmplincludes OS-specific Brewfile using{{ include ".Brewfile_darwin" }} - 1Password integration:
config.fish.tmpluses{{ onepasswordRead "op://..." }}with{{ if lookPath "op" }}guard - Onchange scripts:
run_onchange_after_launchagent.sh.tmpluses{{ include ... | sha256sum }}in a comment to trigger re-run when the included file changes - After scripts:
run_after_sync-theme.sh.tmplruns theme sync after every apply, guarded by OS check - Licensed Berkeley Mono bootstrap:
install_macos.shdiscovers the externally supplied static TTF package under~/Downloads(orBERKELEY_MONO_SOURCE_DIR) and invokespackages/fonts/patch-berkeley-mono.py; source and patched fonts must remain outside the repository - `run_after_` scripts always show as a pending "new file" in `chezmoi diff`. A plain
run_after_script (notrun_once_/run_onchange_, e.g.run_after_sync-theme.sh.tmpl) runs on every apply and isn't state-tracked, so it renders asnew file mode 100755 ... sync-theme.sheven right after a cleanchezmoi apply. Treat achezmoi diffwhose only remaining hunk is that run script as fully reconciled. Also:chezmoi applyon.claude/settings.jsonneeds--forcein non-interactive shells because Claude Code rewrites that file out-of-band ("changed since chezmoi last wrote it").
Special Files and Directories
| Path | Purpose | |
|---|---|---|
.chezmoidata.yaml (or .toml/.json) | Custom template data | |
.chezmoiignore | Patterns to ignore (supports templates) | |
.chezmoitemplates/ | Reusable template fragments | |
.chezmoiexternal.toml | External file/archive sources | |
.chezmoiroot | Marks a subdirectory as the source root | |
.chezmoiremove | Patterns for targets to remove | |
.chezmoiversion | Minimum chezmoi version required | |
.chezmoi.toml.tmpl | Config file template (for chezmoi init) |
Reference Files
- `references/templates.md` - Go template syntax, chezmoi template functions, conditionals, data sources, OS detection, password manager functions
- `references/commands.md` - Full CLI reference with flags and examples for all chezmoi commands
- `references/advanced.md` - External sources, encryption (age/gpg), scripts, hooks, multi-machine patterns, 1Password integration
When to Ask for Help
Ask the user for clarification when:
- Target machine OS or architecture is ambiguous for template conditionals
- Encryption method (age vs gpg) is not specified
- Password manager choice or vault/item paths are unclear
- Script execution order requirements are complex
- External source URLs or refresh periods need confirmation
- Modify script logic for merging existing file content is non-trivial
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/dotfiles/dot_agents/skills/chezmoi-helper/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
templateCustom templates for code generationconfigConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/shepherdjerred/monorepo/chezmoi-helper)