Agent skill
dotfiles
Manage dotfiles configuration with bidirectional sync between local environment and ~/.dotfiles repository. Understand the automation script, configuration structure, and common commands.
Install this agent skill to your Project
npx add-skill https://github.com/dreikanter/dotfiles/tree/main/config/claude/skills/dotfiles
SKILL.md
Dotfiles Management Skill
Overview
The dotfiles automation provides bidirectional sync between local configuration files and a centralized ~/.dotfiles repository. Configuration is managed via dotfiles.json and the dotfiles command.
Structure
Repository: ~/.dotfiles/ (git-tracked)
Key Files:
dotfiles.json- Configuration mapping (tool → file paths)config/- Organized dotfile storage by tool namebin/dotfiles- Ruby automation script (also in~/bin/dotfiles)
Storage Pattern:
~/.dotfiles/config/{tool_name}/
Examples:
~/.dotfiles/config/git/.gitconfig~/.dotfiles/config/zsh/.zshrc~/.dotfiles/config/sublimetext/Preferences.sublime-settings
Configuration Format
File: ~/.dotfiles/dotfiles.json
Structure:
{
"tool_name": [
"~/path/to/config_file",
"~/path/to/directory/*",
"~/path/to/directory/"
]
}
Path Types:
- Single file:
~/.gitconfig - Directory (recursive):
~/.config/nvim/*or~/.config/nvim/ - Preserves relative directory structure
Commands
Save (local → dotfiles):
dotfiles save # Copy local configs to dotfiles repo
dotfiles save -n # Dry run (show what would be done)
dotfiles save -v # Verbose output
dotfiles save -p # Prune removed files from dotfiles
Apply (dotfiles → local):
dotfiles apply # Apply configs from dotfiles repo to local
dotfiles apply -n # Dry run
dotfiles apply -v # Verbose output
dotfiles apply -p # Prune removed files from local
Status:
dotfiles status # Show sync status of managed files
# Output: in sync, local changes, dotfile changes, missing, etc.
Config:
dotfiles config # Show configuration mapping as JSON
Status Indicators
| Status | Meaning | Color |
|---|---|---|
in sync |
Files match | Green |
local changes |
Local file newer | Red |
dotfile changes |
Dotfile newer | Red |
local copy missing |
Only dotfile exists | Gray |
dotfile missing |
Only local exists | Gray |
neither exists |
Both missing | Red |
Options
-n, --dry-run- Preview changes without applying-v, --verbose- Show detailed file operations-p, --prune- Remove destination files missing from source-h, --help- Show help message
Expected Workflows
Save: dotfiles save -v (optionally check dotfiles status first)
Apply: dotfiles apply -v (optionally check dotfiles status first)
Push/Pull: Git operations on ~/.dotfiles repo
- Push (optionally after save):
cd ~/.dotfiles && git add . && git commit -m "..." && git push - Pull (optionally before apply):
cd ~/.dotfiles && git pull
Usage Guidelines
- Check
dotfiles statuswhen it makes sense before saving/loading - Use dry-run (
-n) for safety when you consider it necessary - Edit
dotfiles.jsonto add new config files - Config stored in
~/.dotfiles/config/{tool_name}/ - The
~/.dotfilesrepo is git-tracked - Single source of truth for configuration across machines
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
z-tools
Review GitHub pull requests with Jira context using local `prdump`, `jiradump`, and `gh` tools. Use when a user asks for a PR review by providing a PR URL and Jira ticket URL(s), or when a PR description references Jira IDs/URLs that should be pulled for additional context.
circleci
Fetch CircleCI CI status, test failures, and job logs for a GitHub PR. Use when checking if a PR passed CI, fetching test errors, or investigating CI failures.
notes
Create and access notes in date-based archive. Create notes with auto-incremented IDs, generate daily todos with task rollover, find latest notes by type (note/todo/backlog/weekly), search by ID/slug/tags/content.
jiradump
Dump Jira ticket details and comments using the local `jiradump` CLI tool. Use when a user wants to inspect a Jira ticket by URL or key (e.g., ABC-123).
prdump
Dump GitHub PR details (title, branch, description, discussion, reviews, inline comments) using the local `prdump` CLI tool. Use when a user wants to inspect or review a PR by URL.
z-tools
Review GitHub pull requests with Jira context using local `prdump`, `jiradump`, and `gh` tools. Use when a user asks for a PR review by providing a PR URL and Jira ticket URL(s), or when a PR description references Jira IDs/URLs that should be pulled for additional context.
Didn't find tool you were looking for?