This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This repository stores chezmoi source state, not literal $HOME paths. .chezmoiroot points to home/, so all managed dotfiles should be edited under home/.
Always reason in two steps:
- source state path in this repository
- rendered target state under
$HOME
Use chezmoi source-path <target> and chezmoi target-path <source> when mapping between the two. Do not edit real $HOME targets directly or create target-home files at the repository root.
chezmoi encodes target behavior in source filenames. Preserve these attributes when moving or editing files:
dot_maps to hidden target filesprivate_sets restricted permissionsexact_makes target directories exact, so unmanaged target files may be removednoexact_escapes an exact parent.tmplfiles are Go templates evaluated by chezmoi
If a change touches an exact_ directory, consider the deletion behavior before applying it.
Templates may use chezmoi data, .chezmoi.* variables, and onepasswordRead.
Do not replace onepasswordRead references with literal secrets. Template rendering depends on the 1Password CLI and configured account access.
For template changes, verify rendered output with chezmoi instead of guessing.
Files with the run_ attribute are chezmoi scripts; script attributes such as onchange, before, and after can be combined in filenames. run_onchange_ scripts run when their rendered content changes, and run_after_ scripts run after target state updates.
In this repo, OS-specific scripts live under .chezmoiscripts/darwin/ and .chezmoiscripts/linux/, with inclusion managed by .chezmoiignore.tmpl.
Changing data used inside script templates can trigger package/tool installation on the next apply.
.chezmoiexternal.toml.tmpl defines downloaded archives and external files. Prefer changing the external definition; do not treat manual edits to downloaded contents as persistent changes.
Prefer chezmoi-aware verification:
chezmoi diff
chezmoi apply --dry-run --verbose
chezmoi execute-template < path/to/template.tmplUse chezmoi apply only when the rendered target state is understood.
Claude Code configuration is managed as chezmoi source state under home/.
The global Claude instruction source is home/dot_agents/AGENTS.md, which maps to ~/.agents/AGENTS.md; home/dot_claude/symlink_CLAUDE.md creates the target symlink to it.
Claude marketplace plugins are git submodules. Do not edit plugin code in-place; update submodules instead.
Use Conventional Commits with scopes such as claude, nvim, deps, go, git, and zsh.