🎯

manage-dotfiles

🎯Skill

from poorrican/dotfiles

VibeIndex|
What it does

Manages dotfiles across Linux/macOS systems using GNU stow, enabling seamless synchronization and configuration import/export.

manage-dotfiles

Installation

Install skill:
npx skills add https://github.com/poorrican/dotfiles --skill manage-dotfiles
1
AddedJan 27, 2026

Skill Details

SKILL.md

Manage dotfiles and keep synced with external directories. Use on Linux / macOS systemswhen thetre are external connfigs which are being imported into the dotfiles, or when stored dotfiles need to be brought outside to the XDG environment.

Instructions

On Linux and macOS, dotfiles will be managed via GNU stow.

The stored dotfiles will use the XDG configuration for simplicity and organization.

The commands below assume that there is a specific config package which is being interacted with (eg: nvim)

Syncing Dotfiles - Exporting Configurations

Sync a dotfiles package to its target location using GNU stow.

Instructions

  1. Validate the package exists at ~/dotfiles/{package}:

- If it doesn't exist, list available packages (top-level directories in ~/dotfiles that aren't hidden or special like result, docs, β–‘β–’β–“ OLD β–“β–’β–‘)

- Fail with a clear error message

  1. Run stow to deploy the package:

```bash

stow -v -d ~/dotfiles -t ~ {package}

```

  1. Report what was linked. If stow reports conflicts, explain what's blocking and suggest using stow -D to unstow first, or stow -R to restow.

Importing Configurations

Import an external config into the dotfiles repository and stow it.

Instructions

  1. Resolve the path: Expand ~ and resolve to an absolute path. Verify the file/directory exists.
  1. Compute the home-relative path: The path must be under $HOME. Strip the $HOME prefix to get the relative path.

- Example: ~/.config/foo/bar.conf β†’ .config/foo/bar.conf

- Example: ~/.zshrc β†’ .zshrc

  1. Derive the package name:

- For .config//... paths β†’ package name is

- For . (hidden file in home root) β†’ package name is without the leading dot

- For .local/share//... β†’ package name is

- For other structures β†’ use the first directory component, or ask the user

  1. Create the package structure in ~/dotfiles:

```bash

mkdir -p ~/dotfiles//

```

Where mirrors the home-relative path's directory structure.

  1. Move the config into the package:

```bash

mv ~/dotfiles//

```

  1. Stow the package to create symlinks:

```bash

stow -v -d ~/dotfiles -t ~

```

  1. Verify: Confirm the original path is now a symlink pointing into dotfiles.

Example

Importing ~/.config/wezterm/wezterm.lua:

  • Package name: wezterm
  • Creates: ~/dotfiles/wezterm/.config/wezterm/wezterm.lua
  • Symlinks: ~/.config/wezterm/ β†’ ~/dotfiles/wezterm/.config/wezterm/

Notes

  • If the package already exists, merge the new config into it
  • Do NOT use ln - only use stow for symlinking
  • If importing a single file from a directory that has other files, ask if the user wants to import the entire directory or just the file