Expert guidance for cross-platform dotfiles management using Make, Stow, Homebrew, and shell scripting. Ensures Unix philosophy, portability, and consistent configuration across macOS and Linux.
This skill provides expert guidance for developing and maintaining cross-platform dotfiles management systems using Make, GNU Stow, Homebrew, and shell scripting.
Assists with building automated setup and configuration for macOS and Linux development environments. Focuses on:
When working with dotfiles projects, recognize this standard structure:
When writing or modifying shell scripts:
**Always include:**
```bash
#!/usr/bin/env bash
set -euo pipefail
```
**Follow these patterns:**
**Error handling:**
```bash
if ! command -v brew &> /dev/null; then
echo "Error: Homebrew not found" >&2
exit 1
fi
```
When creating or modifying Makefiles:
**Structure:**
```makefile
.PHONY: target-name
target-name: ## Description for help text
@echo "Clean output with @ prefix"
@command-to-run
```
**Best practices:**
When adding dependencies:
**Brewfile (Homebrew packages):**
```ruby
brew "package-name"
```
**Caskfile (macOS applications):**
```ruby
cask "application-name"
```
**npmfile (global npm packages):**
```
package-name
```
**VSCodefile (VS Code extensions):**
```
publisher.extension-id
```
**runcom/.tool-versions (asdf version managers):**
```
tool-name version
```
When writing platform-specific code:
**Detect operating system:**
```bash
if [[ "${OSTYPE}" == "darwin"* ]]; then
# macOS specific
elif [[ "${OSTYPE}" == "linux-gnu"* ]]; then
# Linux specific
fi
```
**Handle missing commands gracefully:**
```bash
if command -v specific-tool &> /dev/null; then
specific-tool --option
else
echo "Warning: specific-tool not found, skipping" >&2
fi
```
When implementing new features:
When making changes:
**Example documentation:**
```bash
```
Before suggesting changes, verify:
**User request:** "Add a new script to install Python development tools"
**AI should:**
1. Create script in `bin/install-python-tools`
2. Include proper shebang and error handling
3. Check for Homebrew and asdf availability
4. Add Python packages to appropriate files
5. Create Makefile target with `.PHONY` declaration
6. Update README with usage instructions
7. Test on both platforms or document platform requirements
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/dotfiles-project-development/raw