Adding modules

From joshmanders/dotfiles · View interactive version

Adding modules is an AI agent skill from the GitHub repository joshmanders/dotfiles. Use when adding new modules, configs, or tools to dotfiles

How to use this skill

Skill file

Adding Dotfiles Modules

Checklist

  1. Create module directory: modulename/
  2. Add README.md with:
  1. Add install.sh if needed (see template below)
  2. If the module has an install.sh, register it in root install.sh, which runs only the modules it sources:
  1. Add packages to homebrew/bundle if needed
  2. Update root README.md:
  1. If new config option:

Install Script Template

#!/usr/bin/env bash
# What this module does
set -euo pipefail

source "$DOTFILES/lib/index.sh"

# Check dependencies (optional)
skip_unless sometool "sometool not installed" || {
    symlink "$DOTFILES/mymodule/config" "$HOME/.myconfig"
}

The main install.sh sources each module, so exit in a module ends the whole install and skips every module after it. Guard dependent work with skip_unless <requirement> <message> || { ... }: it prints Skip: <message> and skips the block when the requirement is missing. Keep exit 1 for errors that should stop the install.

lib/skip.sh holds the full contract.

Testing

# Test standalone
bash mymodule/install.sh --non-interactive --overwrite --allow

# Test via main installer
bash install.sh --non-interactive --overwrite --allow

Reference Modules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.