adopt-dotfile

Adopts or removes dotfiles from dotfiles repository management with placement and secret extraction.

Updated Dec 25, 2021
One-click install
npx skills add https://github.com/kotahashihama/dotfiles --skill adopt-dotfile-kotahashihama
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adopt-dotfile
Source: https://github.com/kotahashihama/dotfiles/tree/main/.claude/skills/adopt-dotfile
Command: npx skills add https://github.com/kotahashihama/dotfiles --skill adopt-dotfile-kotahashihama

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Deciding where a new config file belongs in a dotfiles repository and wiring up symlinks by hand is error-prone: secrets can leak into the public side, mixed directories get over-linked, and name collisions silently overwrite files. This Skill guides the full adoption (or removal) workflow with explicit judgment criteria. ## Core Features & Use Cases - Managed adoption: Brings a config file under dotfiles management via scripts/adopt_dotfile.sh, choosing between the public home/ (git) and private private/ (encrypted archive) placements. - Secret extraction: Scans file contents before adoption and moves real credential values into ~/.secrets/env, replacing them with references. - Safety checks: Handles mixed-content parent directories via PARTIAL_DIRS, detects name collisions between home/ and private/, and triggers verification skills afterward. - Use Case: You want your .codex/config.toml backed up with your dotfiles. The Skill inspects it, decides it belongs in private/, strips any API keys, runs the adoption script, and reports the resulting symlink. ## Quick Start Ask the assistant to adopt ~/.codex/config.toml into dotfiles management and let it decide the placement.

Frequently Asked Questions about adopt-dotfile

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

FAQPage Schema
How do I add a config file to my dotfiles repository?

Run the adoption workflow with the file's path relative to your home directory, optionally specifying public or private placement. The underlying script moves the file into the repository and replaces the original with a symlink.

How do I decide between public and private placement for a dotfile?

Placement depends on how the file travels between machines: public files go in the git repository, private files go in an encrypted archive. When in doubt, choose private, and always scan contents for secrets before placing anything on the public side.

What happens if a directory mixes managed and unmanaged files?

Mixed directories like ~/.claude must not be symlinked wholesale, or unmanaged files get swept in. Add the parent directory to PARTIAL_DIRS in scripts/lib.sh first, then adopt only the individual files.

How do I remove a file from dotfiles management?

Delete the symlink and move the real file from the repository back to your home directory. If it was in private/, note that it will disappear from the next encrypted backup archive.

Why should large directories not be adopted wholesale?

Large directories inflate the encrypted backup archive, directly increasing backup and restore time. Instead, adopt only the specific config files inside and leave caches, logs, and regenerable data unmanaged.