Back to list
Raphael67

dotfiles

by Raphael67

My dotfiles

0🍴 0📅 Jan 18, 2026

SKILL.md


Dotfiles Management Skill

Expert guidance for managing this cross-platform dotfiles repository using GNU Stow.

Quick Reference

TopicFileUse When
Zsh/ShellZSH.mdEditing .zshrc, aliases, plugins, Oh-My-Zsh
NeovimNEOVIM.mdEditing nvim config, adding plugins, LSP
StarshipSTARSHIP.mdCustomizing prompt, modules, palettes
TmuxTMUX.mdEditing tmux config, plugins, keybindings
GhosttyGHOSTTY.mdTerminal config, shell integration, keybindings
GNU StowSTOW.mdUnderstanding symlinks, stow commands
CLI ToolsTOOLS.mdConfiguring bat, eza, fzf, zoxide, lazygit, bitwarden
ProblemsTROUBLESHOOTING.mdFixing common issues

Critical Repository Pattern

The .stowrc file configures:

  • --dir=./dotfiles - stow source directory
  • --target=~/ - symlinks created in home
  • --dotfiles - dot- prefix converts to .

Example: dot-zshrc becomes ~/.zshrc

Directory Structure

/Users/raphael/Projects/dotfiles/
├── .stowrc                    # Stow configuration
├── CLAUDE.md                  # Claude Code project instructions
├── setup.sh                   # Main installation script
├── homebrew/
│   └── Brewfile               # Package manifest
├── dotfiles/                  # Stow source directory
│   ├── dot-zshrc              # -> ~/.zshrc
│   ├── dot-zprofile           # -> ~/.zprofile
│   ├── dot-config/            # -> ~/.config/
│   │   ├── nvim/              # Neovim (lazy.nvim)
│   │   ├── tmux/              # Tmux + TPM
│   │   ├── starship/          # Starship prompt
│   │   ├── ghostty/           # Ghostty terminal
│   │   ├── zsh/               # Zsh aliases
│   │   ├── bat/               # bat config
│   │   ├── lazygit/           # lazygit config
│   │   ├── karabiner/         # Keyboard mods
│   │   └── nushell/           # Nushell config
│   ├── dot-claude/            # -> ~/.claude/
│   │   ├── settings.json      # Claude Code settings
│   │   ├── statusline.sh      # Token usage tracker
│   │   ├── hooks/             # PreToolUse hooks
│   │   └── skills/            # Claude Code skills
│   └── dot-local/
│       └── bin/               # Utility scripts
└── scripts/                   # Installation helpers

Essential Commands

# Apply configuration changes
stow .                           # Create/update symlinks
stow -R .                        # Force restow (unlink + relink)
stow -D .                        # Remove all symlinks
stow -n .                        # Dry run (show what would happen)

# Reload configurations
source ~/.zshrc                  # Shell changes
tmux source-file ~/.config/tmux/tmux.conf  # Tmux changes

# Neovim
:Lazy sync                       # Update plugins
:Mason                           # Manage LSP servers
:checkhealth                     # Diagnose issues

# Tmux plugins (TPM)
prefix + I                       # Install plugins
prefix + U                       # Update plugins

# Package management
brew bundle --file=homebrew/Brewfile  # Install all packages

Theme Consistency

ToolConfig LocationTheme Setting
Neovimlua/plugins/catppuccin-macchiato
Tmuxtmux.catppuccin.confmacchiato
Starshipstarship.tomlcatppuccin_macchiato palette
Ghosttyconfigtheme = catppuccin-mocha
fzfdot-zshrcCatppuccin colors in FZF_DEFAULT_OPTS
batbat/configOneHalfDark
lazygitlazygit/config.ymlCatppuccin

Key Colors (Macchiato):

  • Base: #24273a
  • Text: #cad3f5
  • Blue: #8aadf4
  • Green: #a6da95
  • Red: #ed8796

Performance Patterns

Version managers (jenv, pyenv, nvm) are lazy-loaded to speed up shell startup:

# Pattern used in dot-zshrc
if [[ -d "$HOME/.jenv" ]]; then
  jenv() {
    unset -f jenv
    export PATH="$HOME/.jenv/bin:$PATH"
    _evalcache jenv init -
    jenv "$@"
  }
fi

evalcache Plugin

Expensive command outputs are cached using the evalcache oh-my-zsh plugin:

_evalcache zoxide init zsh --cmd cd
_evalcache gh copilot alias -- zsh

Benchmarking

zsh-time      # Quick timing: time zsh -i -c exit
zsh-debug     # Detailed profiling with zprof

Security Best Practices

These should NEVER be in the repository:

  • Passwords and API keys
  • SSH keys (~/.ssh/)
  • GPG keys (~/.gnupg/)
  • Session tokens

Environment Variables

Load secrets from secure sources:

# In dot-zshrc - loads ~/.env if it exists
if [[ -f ~/.env ]]; then
    while IFS= read -r line || [[ -n "$line" ]]; do
        if [[ -n "$line" && ! "$line" =~ ^[[:space:]]*# ]]; then
            export "$line"
        fi
    done < ~/.env
fi

Bitwarden CLI Integration

Use Bitwarden CLI for secure secret access:

bw-unlock              # Unlock vault, export BW_SESSION
bwp "GitHub Token"     # Get password by name
bwc "API Key"          # Copy to clipboard

See TOOLS.md for full Bitwarden CLI setup.

File Permissions

Sensitive files should have restricted permissions:

chmod 400 ~/.ssh/id_*
chmod 600 ~/.env

File Modification Workflow

  1. Apply changes with stow

    stow .
    
  2. Reload the relevant configuration

    source ~/.zshrc                    # For shell changes
    tmux source ~/.config/tmux/tmux.conf  # For tmux
    # Neovim auto-reloads on file save
    
  3. Test the changes

  4. Commit when satisfied

    git add -A && git commit -m "feat: description"
    

Adding New Configurations

Adding a New Dotfile

  1. Create the file with dot- prefix:

    # For ~/.newconfig
    touch dotfiles/dot-newconfig
    
    # For ~/.config/app/config
    mkdir -p dotfiles/dot-config/app
    touch dotfiles/dot-config/app/config
    
  2. Run stow . to create symlinks

  3. Verify with ls -la ~/ | grep newconfig

Adding to Brewfile

# Add formula
echo 'brew "package-name"' >> homebrew/Brewfile

# Add cask
echo 'cask "app-name"' >> homebrew/Brewfile

# Install
brew bundle --file=homebrew/Brewfile

Cross-Platform Notes

The repository supports both platforms with conditional logic:

# In dot-zshrc
if [[ -d /opt/homebrew/bin ]]; then
  export PATH=/opt/homebrew/bin:$PATH
fi

Platform-Specific Paths

ItemmacOSLinux
Homebrew/opt/homebrew//home/linuxbrew/
VSCode settings~/Library/Application Support/Code/~/.config/Code/
Ghostty configBoth use ~/.config/ghostty/Same

When to Read Reference Files

Read ZSH.md when:

  • Adding shell aliases or functions
  • Configuring Oh-My-Zsh plugins
  • Troubleshooting shell startup

Read NEOVIM.md when:

  • Adding or configuring plugins
  • Setting up LSP for a language
  • Customizing keymaps

Read TMUX.md when:

  • Modifying keybindings
  • Adding or updating plugins
  • Configuring status bar

Read GHOSTTY.md when:

  • Changing terminal appearance
  • Setting up shell integration
  • Customizing keybindings

Read STOW.md when:

  • Understanding how symlinks work
  • Resolving stow conflicts
  • Adding new configuration packages

Read TOOLS.md when:

  • Configuring CLI tool replacements
  • Setting up Bitwarden CLI
  • Customizing fzf, bat, eza, etc.

Read TROUBLESHOOTING.md when:

  • Shell startup is slow
  • Plugins aren't loading
  • Symlinks aren't working
  • Theme colors are wrong

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon