| name | adding-modules |
| description | Use when adding new modules, configs, or tools to dotfiles |
| user-invocable | false |
Adding Dotfiles Modules
When This Applies
Use this skill when:
- Adding a new tool/config to dotfiles
- Creating a new module directory
- Adding new config options
Checklist
- Create module directory:
modulename/
- Add
README.md with:
- Purpose description
- Files table
- Installation command
- Configuration overview
- Customization section
- Add
install.sh if needed (see template below)
- Add packages to
homebrew/bundle if needed
- Update root
README.md:
- Add to "What's Included" if major feature
- Add to "Directory Structure"
- Add link to Documentation section
- If new config option:
- Add to
config.sh.example with comment
- Add to
bash/exports.sh to export it
- Update
lib/README.md if new lib function
Install Script Template
#!/usr/bin/env bash
set -euo pipefail
source "$DOTFILES/lib/index.sh"
if ! command -v sometool &>/dev/null; then
echo "Skip: sometool not installed"
exit 0
fi
symlink "$DOTFILES/mymodule/config" "$HOME/.myconfig"
Testing
bash mymodule/install.sh --non-interactive --overwrite --allow
./install.sh --non-interactive --overwrite --allow
Reference Modules
Look at these for patterns:
git/install.sh — Config + run commands
bash/install.sh — Multiple symlinks
npm/install.sh — Simple symlink only
ssh/install.sh — Permissions + config generation