dotfiles-manage
Skill1 starsChanged 3 months agoMITView on GitHub
Use when the user wants their config files (shell, editor, git, tmux) versioned in git and deployable to a new machine in one command, or wants to sync dotfiles across multiple machines.
- Reads credentials
- Installs packages
- Commits and pushes
In this repository58 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- api-test-suiteSkill
- ascii-artSkill
- caddy-reverse-proxySkill
- changelog-generatorSkill
- color-palette-generatorSkill
- cron-taskSkill
- csv-toolkitSkill
- discord-bot-buildSkill
- docker-umbrellaSkill
- email-sendSkill
- env-config-managerSkill
- excalidraw-diagramSkill
- file-organizerSkill
- forgejo-self-hostSkill
- frontend-design-toolkitSkill
- generate-dockerfileSkill
- gif-searchSkill
- git-backupSkill
- github-actions-ciSkill
- hallmark-readmeSkill
- http-api-testerSkill
- invoice-generatorSkill
- json-formatterSkill
- log-analyzerSkill
- markdown-linterSkill
- markdown-to-pdfSkill
- markdown-to-slidesSkill
- mcp-server-buildSkill
- media-id-mappingSkill
- movie-catalogue-siteSkill
- movie-night-calendarSkill
- ntfy-notifierSkill
- ocr-documentsSkill
- ollama-localSkill
- openapi-generatorSkill
- password-generatorSkill
- pdf-extractSkill
- portfolio-upkeepSkill
- qr-code-generatorSkill
- regex-testerSkill
- resume-builderSkill
- rss-monitorSkill
- searxng-self-hostSkill
- skill-publishSkill
- skill-registry-catalogSkill
- skills-portfolio-scaffoldSkill
- snippet-managerSkill
- sqlite-dashboardSkill
- streaming-provider-embedsSkill
- tailscale-deploySkill
- telegram-bot-buildSkill
- tmdb-metadataSkill
- uptime-kuma-self-hostSkill
- watchlist-syncSkill
- webhook-receiverSkill
- youtube-transcriptSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 39
No extra software needed — just git.
- Distinctive: line 209
Never commit plaintext secrets (API keys, tokens, passwords).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
dotfiles-manage
Overview
Set up dotfiles management — version control for your configuration files (shell config, editor config, git config, etc.) with the ability to deploy them to any new machine in one command.
When to Use
- The user wants their config files versioned and backed up.
- The user is setting up a new machine and wants their configs deployed automatically.
- The user wants to sync configs across multiple machines.
- The user says "set up dotfiles", "version my configs", or "I want my settings on my new laptop".
Strategies
Four approaches, ranked by simplicity:
| Strategy | How it works | Best for |
| Git bare repo | A bare git repo stores dotfiles; alias manages add/commit | Minimalists, no extra tools |
| GNU Stow | Symlinks from a directory to your home dir | Organized by package, standard tool |
| chezmoi | Templated dotfiles with encryption and machine-specific values | Multiple machines with different needs |
| yadm | Yet Another Dotfiles Manager — git wrapper for home dir | Git-familiar users who want extras |
Strategy 1: Git Bare Repo (simplest)
No extra software needed — just git.
Setup
# Create a bare repo
git init --bare $HOME/.cfg
# Add an alias to your shell config
echo "alias config='/usr/bin/git --git-dir=\$HOME/.cfg/ --work-tree=\$HOME'" >> ~/.bashrc
source ~/.bashrc
# Ignore untracked files in your home dir
config config --local status.showUntrackedFiles noAdd files
config add .bashrc .vimrc .gitconfig .tmux.conf
config commit -m "Initial dotfiles"
config remote add origin git@github.com:youruser/dotfiles.git
config push -u origin mainDeploy on a new machine
# Clone as bare repo
git clone --bare git@github.com:youruser/dotfiles.git $HOME/.cfg
# Add the alias
echo "alias config='/usr/bin/git --git-dir=\$HOME/.cfg/ --work-tree=\$HOME'" >> ~/.bashrc
source ~/.bashrc
# Checkout the files
config checkout
# If it fails because files already exist, back them up first:
mkdir -p .config-backup
config checkout 2>&1 | grep "\t" | awk {'print $1'} | xargs -I{} mv {} .config-backup/{}
config checkout
# Set ignore
config config --local status.showUntrackedFiles noStrategy 2: GNU Stow
Organizes dotfiles into "packages" and symlinks them into your home directory.
Setup
# Install stow
# Linux: apt install stow / pacman -S stow
# macOS: brew install stow
# Create a dotfiles directory
mkdir ~/dotfiles
cd ~/dotfiles
# Organize by package (each package is a directory)
mkdir -p bash vim git tmux
# Move configs into the package directories
mv ~/.bashrc ~/dotfiles/bash/.bashrc
mv ~/.vimrc ~/dotfiles/vim/.vimrc
mv ~/.gitconfig ~/dotfiles/git/.gitconfig
# Stow (create symlinks)
stow bash vim git
# Verify
ls -la ~/.bashrc # → ~/dotfiles/bash/.bashrcDeploy on a new machine
git clone git@github.com:youruser/dotfiles.git ~/dotfiles
cd ~/dotfiles
stow bash vim git tmuxRemove a package
stow -D vim # removes the symlinks for the vim packageStrategy 3: chezmoi (for multiple machines with differences)
chezmoi handles machine-specific values, templating, and secrets.
Setup
# Install
# Linux: snap install chezmoi --classic / or download
# macOS: brew install chezmoi
# Initialize
chezmoi init
# Add a file
chezmoi add ~/.bashrc
chezmoi add ~/.gitconfig
# Edit managed files
chezmoi edit ~/.bashrc
# Apply changes to your home dir
chezmoi apply
# Push to git
chezmoi cd
git add -A
git commit -m "Initial dotfiles"
git remote add origin git@github.com:youruser/dotfiles.git
git push -u origin mainDeploy on a new machine
chezmoi init git@github.com:youruser/dotfiles.git
chezmoi applyMachine-specific values
# Template file (chezmoi edit ~/.gitconfig)
[user]
name = {{ .name }}
email = {{ .email }}
# Set values per machine
chezmoi data --format json # see current values
# Edit config:
chezmoi edit-config
# Add:
# data:
# name: "Your Name"
# email: "your@email.com"Managing Different OSes
For configs that differ between Linux and macOS:
chezmoi:
# OS-specific files are named with .linux_ or .darwin_ prefix
# chezmoi automatically picks the right oneGit bare repo / Stow:
# Use conditionals in your shell config:
if [ "$(uname)" = "Darwin" ]; then
# macOS-specific settings
elif [ "$(uname)" = "Linux" ]; then
# Linux-specific settings
fiSecrets in Dotfiles
Never commit plaintext secrets (API keys, tokens, passwords).
| Method | How |
| chezmoi encryption | chezmoi add --encrypt ~/.config/secrets — encrypts with age or gpg |
| Env vars | Store secrets in a file that's gitignored, load via shell config |
| Password manager | Reference secrets from pass, 1password-cli, or bitwarden-cli in config |
# Example: load API key from password manager in .bashrc
export OPENAI_API_KEY=$(pass openai/api-key)Common Pitfalls
- Committing secrets — Before pushing, check for API keys, tokens, and passwords in your dotfiles. Use
git log -pto review history. If secrets are already pushed, rotate them immediately — git history is forever. - Symlink loops with Stow — If you stow a directory that contains a symlink pointing back to your home dir, you'll create a loop. Stow will warn you, but check manually.
- Bare repo checkout fails — If files already exist in your home dir,
config checkoutfails. Back up the conflicting files first (the deploy script above handles this). - Different paths on different OSes — A config that works on Linux (
~/.config/) may need a different path on macOS (~/Library/Application Support/). Use chezmoi for cross-OS setups, or conditional logic in shell configs. - Forgetting to stow/restow — After adding a new file to a Stow package, you need to re-run
stow <package>to create the symlink. It's not automatic. - Machine-specific values in git — If you hardcode a machine-specific value (hostname, IP, path) in a dotfile, it breaks on other machines. Use templates (chezmoi) or conditionals.
Verification Checklist
config status/git -C ~/dotfiles status(orstow -n/chezmoi diff) shows no unexpected changes after setup- A clean-machine deploy (fresh clone + checkout/
stow/chezmoi apply) reproduces the expected files or symlinks git log -previewed for accidentally committed secrets before the first pushstatus.showUntrackedFilesis set tonofor the bare-repo approach sogit status/config statusin$HOMEstays quiet
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

