chezmoi-development

Merge application settings into existing files using chezmoi modify_ scripts.

1|1|Updated Jul 20, 2025
One-click install
npx skills add https://github.com/fx/dotfiles --skill chezmoi-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chezmoi-development
Source: https://github.com/fx/dotfiles/tree/main/.claude/skills/chezmoi-development
Command: npx skills add https://github.com/fx/dotfiles --skill chezmoi-development

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the development and modification of dotfiles using chezmoi, enabling sophisticated configuration management without overwriting user preferences.

Core Features & Use Cases

  • Non-Destructive Configuration: Safely merge application settings into existing files using modify_ scripts.
  • Data-Driven Templates: Utilize .chezmoidata/ for reusable configuration data (YAML, JSON, TOML).
  • Symlink Management: Handle configuration in symlinked directories with run_onchange_after_ scripts.
  • Use Case: When configuring a new application, you want to ensure specific settings are present (e.g., API keys, feature flags) while allowing users to keep their custom configurations intact.

Quick Start

Use the chezmoi-development skill to create a modify_ script for merging settings into ~/.config/app/settings.json.

Frequently Asked Questions about chezmoi-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I merge application settings into existing dotfiles without overwriting user preferences?

Non-destructive configuration merging is handled using chezmoi `modify_` scripts. These scripts safely inject specific settings like API keys into existing files while preserving any custom user configurations already present.

What is the best way to manage reusable configuration data in chezmoi templates?

Reusable configuration data in chezmoi templates is managed through the `.chezmoidata/` directory. This approach centralizes application settings in YAML, JSON, or TOML formats for consistent data-driven templating across environments.

How do I handle symlinked directories in chezmoi for cross-environment compatibility?

Symlinked directories are handled using `run_onchange_after_` scripts in chezmoi. This scripting mechanism ensures robust cross-environment compatibility by executing targeted scripts whenever tracked configuration changes occur.

Can I use chezmoi for advanced dotfile development and configuration management?

Yes, chezmoi facilitates advanced dotfile development through templating and scripting capabilities. It enables sophisticated configuration management by combining `.chezmoidata/` for settings with `modify_` scripts for non-destructive merges.

Why does my chezmoi configuration overwrite existing settings when applying changes?

Overwriting occurs without non-destructive merging mechanisms. To prevent this, implement `modify_` scripts that merge specific application settings into existing files, ensuring your custom user preferences remain intact during updates.

When do I need to use scripts instead of standard templating for dotfile management?

Scripts are needed for non-destructive configuration merging via `modify_` and for managing symlinked directories using `run_onchange_after_`. They provide robust cross-environment compatibility where standard templating falls short.