shunk031-manage-public-private-dotfiles
About shunk031-manage-public-private-dotfiles
An operational skill for managing public and private chezmoi dotfiles as separate but coordinated domains. It guides users in identifying ownership, selecting the source of truth, and validating changes without duplicating private configuration.
Key features
- 01Inspect both dotfiles repositories
- 02Determine configuration ownership
- 03Keep private content in its source
- 04Preserve symlinks and adapters
- 05Validate changes by repository
Use cases
- 01Choose which repository should own a setting
- 02Update private configuration without copying it publicly
- 03Coordinate changes across both dotfiles sources
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ shunk031/ skills --skill shunk031-manage-public-private-dotfilesAfter installing, type/shunk031-manage-public-private-dotfilesin Claude Code to confirm it loaded.
Bundled filesagents/openai.yaml
Details
From the project READMENote
After reading this
SKILL.md, say:🏠 I read shunk031-manage-public-private-dotfiles.
Manage Public and Private Dotfiles
Treat the public and private chezmoi sources as related but separate management domains. Establish their current ownership boundary before proposing or making changes.
Skill content is not one of those domains any more. It lives in shunk031/skills and shunk031/skills-private, and the dotfiles repositories hold only the subscription allowlist that installs it. Use the shunk031-manage-public-private-skills skill for anything that adds, edits, or removes a skill, and use this one for the configuration around it.
Workflow
-
Read the applicable instructions before investigating.
- Read
~/.agents/AGENTS.md, then read~/.agents/AGENTS-private.mdwhen it is readable. - Treat
~/.agents/AGENTS-private.mdas the stable user-level path. Its canonical content is~/.local/share/chezmoi-private/home/dot_config/codex/AGENTS-private.md, while its symlink wiring is managed by the public dotfiles source. - Keep the private content in
home/dot_config/codex/AGENTS-private.mdand change the public repository only for its symlink wiring. Do not duplicate the content. - Read the root
AGENTS.mdin both dotfiles repositories. Follow each repository's rules for changes made there.
- Read
-
Inspect both repositories before choosing an edit target.
- Public source:
~/.local/share/chezmoi, using~/.config/chezmoi/chezmoi.yaml. - Private source:
~/.local/share/chezmoi-private, using~/.config/chezmoi-private/chezmoi.yaml. - Check
git status --short --branchin both repositories and preserve all existing changes. - Search both sources for the relevant applied path, command, setting, identifier, and documentation. Use
chezmoi source-pathwith the corresponding source and config when the source mapping is unclear. - Inspect relevant history in both repositories when ownership, intent, or a previous migration cannot be determined from the current files alone.
- Public source:
-
Determine the current source of truth from evidence.
- Prefer the public repository for portable, shareable configuration and shared agent guidance.
- Prefer the private repository for credentials, internal infrastructure, private profiles, authentication helpers, internal endpoints, and private launchers.
- Treat these as defaults, not a substitute for reading the current repository instructions and implementation.
- Do not copy a setting into both repositories merely to make it available in both contexts. Preserve adapters and symlinks that expose one canonical source.
-
Make only the required source changes.
- Edit chezmoi source state rather than applied files under the home directory.
- Change only the authoritative repository when the task belongs to one management domain.
- When both repositories require coordinated changes, keep their worktrees, commits, and pull requests separate and explain the dependency between them.
- Create a clean task worktree for each affected repository when required by its instructions. Never mix unrelated local changes into the task.
-
Validate and report each affected domain independently.
- Run the checks required by each affected repository and report which repository owns each change.
- Keep credentials and secret values out of command output, diffs quoted in chat, and summaries.
- Ordinary implementation work may commit, push its task branch, and create or update its pull request under the shared workflow. Merging,
chezmoi apply, runtime changes, deletion, and cleanup still require explicit user permission. - When the user authorizes
chezmoi apply, run it asGITHUB_TOKEN="$(gh auth token)" chezmoi apply: the public source's external templates query the GitHub Releases API, and an anonymous request can fail on the API rate limit.
Expected Outcome
Report the evidence used to select each source of truth, the files changed in each repository, the validation performed, and any ordering required between public and private changes. If investigation shows that only one repository needs modification, say that explicitly.