edit-dotfile

Edits Chezmoi-managed dotfiles and applies changes with `chezmoi apply`.

Updated Jul 8, 2017
One-click install
npx skills add https://github.com/mczkzk/dotfiles --skill edit-dotfile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: edit-dotfile
Source: https://github.com/mczkzk/dotfiles/tree/main/dot_claude/skills/edit-dotfile
Command: npx skills add https://github.com/mczkzk/dotfiles --skill edit-dotfile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures that when you need to edit configuration files (dotfiles), you are always modifying the source files managed by chezmoi, rather than potentially outdated copies in your home directory. This prevents configuration drift and ensures consistency across your environment.

Core Features & Use Cases

  • Prioritizes chezmoi: Automatically directs edits to files within ~/.local/share/chezmoi/ instead of directly in the home directory.
  • Path Mapping: Understands and translates common home directory paths to their chezmoi equivalents (e.g., ~/.zshrc to ~/.local/share/chezmoi/dot_zshrc).
  • Zsh Alias/Function Handling: Provides guidance on how to add new aliases or functions to Zsh configurations.
  • Ensures chezmoi apply: Reminds the user to apply changes after editing.

Quick Start

Edit the .zshrc file using the edit-dotfile skill.

Frequently Asked Questions about edit-dotfile

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

FAQPage Schema
How do I edit dotfiles managed by chezmoi without causing configuration drift?

To prevent configuration drift when editing dotfiles managed by chezmoi, always modify the source files within `~/.local/share/chezmoi/` rather than directly updating your home directory. This ensures environment consistency.

What is the correct path mapping for editing a `.zshrc` file with chezmoi?

The correct path mapping for editing a `.zshrc` file translates the home directory path `~/.zshrc` to its chezmoi source equivalent located at `~/.local/share/chezmoi/dot_zshrc`. This mapping ensures edits target the correct managed source file.

How do I add new aliases and functions to my Zsh configuration using chezmoi?

To add new aliases or functions to your Zsh configuration, edit the appropriate chezmoi-managed source files instead of your active shell configuration. This Skill provides specific guidance on routing these Zsh additions through the correct chezmoi paths.

Do I need to run `chezmoi apply` after editing configuration files?

Yes, you need to run `chezmoi apply` after editing configuration files. Applying changes is a required step to synchronize your edits from the chezmoi source directory into your active home directory environment.

Why should I prioritize chezmoi source files over direct home directory modifications?

Prioritizing chezmoi source files over direct home directory modifications prevents your configuration from becoming outdated or inconsistent. Editing chezmoi sources directly ensures all changes are tracked and applied uniformly across your environment.