スキル一覧に戻る
craigtkhill

chezmoi-dotfiles

by craigtkhill

dotfiles for macos

0🍴 0📅 2026年1月13日
GitHubで見るManusで実行

SKILL.md


name: chezmoi-dotfiles description: Manage dotfiles using chezmoi. Use when creating, modifying, or deploying dotfiles, shell functions, or configuration files in this repository.

Chezmoi Dotfiles Management

This skill helps manage dotfiles using chezmoi in this repository.

Repository Location

All dotfiles are managed in ~/.local/share/chezmoi which is a git repository synced to GitHub at https://github.com/craigtkhill/dotfiles.git.

Critical Workflow

When creating or modifying dotfiles, you MUST follow this exact order:

  1. Navigate to chezmoi source directory

    cd ~/.local/share/chezmoi
    
  2. Create or edit files using chezmoi naming conventions

    • Use dot_ prefix for dotfiles (e.g., dot_gitconfig~/.gitconfig)
    • Preserve directory structure (e.g., dot_config/fish/functions/~/.config/fish/functions/)
    • You can edit directly in ~/.local/share/chezmoi or use chezmoi edit <target-path>
  3. Apply changes to home directory

    chezmoi apply
    # or for specific file:
    chezmoi apply ~/.config/fish/functions/myfile.fish
    
  4. Commit and push to GitHub

    cd ~/.local/share/chezmoi
    git add .
    git commit -m "your message"
    git push origin main
    
  5. Verify it's managed

    chezmoi managed | grep myfile
    

Common Commands

  • chezmoi status - Show what has changed
  • chezmoi diff - Show detailed differences
  • chezmoi managed - List all managed files
  • chezmoi apply - Apply changes from dotfiles to home directory
  • chezmoi apply --force - Force apply, overriding conflicts
  • chezmoi add <file> - Add a file to chezmoi tracking
  • chezmoi re-add <file> - Re-add a tracked file

Fish Shell Specifics

Fish automatically loads functions from ~/.config/fish/functions/. Each function must be in its own file named functionname.fish.

After adding new fish functions:

  1. Copy to ~/.config/fish/functions/
  2. Functions are immediately available (fish auto-loads them)
  3. No need to source or reload

Adding Existing Files to Chezmoi

If you want to add an existing file from your home directory to chezmoi:

chezmoi add ~/.config/fish/functions/myfile.fish

This will copy the file to ~/.local/share/chezmoi with proper naming and make it managed.

Common Mistakes

DON'T: Edit files directly in ~/.config/fish/ without updating chezmoi

  • Changes will be lost when chezmoi applies source files

DON'T: Forget to commit and push changes to GitHub

  • Your dotfiles won't be backed up or available on other machines

DO: Edit in ~/.local/share/chezmoi → Apply → Commit → Push

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

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

+20
LICENSE

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

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

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

0/5
Issue管理

オープンIssueが50未満

+5
言語

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

+5
タグ

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

0/5

レビュー

💬

レビュー機能は近日公開予定です