dotfile-sync

Manage dotfiles with symlinks from a central git repository. Use when tracking config files, syncing dotfiles between machines, or bootstrapping a new machine. Triggers include "dotfiles", "sync config", "dfs", "track dotfiles", "symlink config", "new machine setup".

7 stars

Best use case

dotfile-sync is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Manage dotfiles with symlinks from a central git repository. Use when tracking config files, syncing dotfiles between machines, or bootstrapping a new machine. Triggers include "dotfiles", "sync config", "dfs", "track dotfiles", "symlink config", "new machine setup".

Teams using dotfile-sync should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/dotfile-sync/SKILL.md --create-dirs "https://raw.githubusercontent.com/heldernoid/agentic-build-templates/main/projects/cli-tools/dotfile-sync/skills/dotfile-sync/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/dotfile-sync/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How dotfile-sync Compares

Feature / Agentdotfile-syncStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Manage dotfiles with symlinks from a central git repository. Use when tracking config files, syncing dotfiles between machines, or bootstrapping a new machine. Triggers include "dotfiles", "sync config", "dfs", "track dotfiles", "symlink config", "new machine setup".

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# dotfile-sync

CLI tool for tracking and syncing dotfiles via a git-backed symlink repository.

## Quick Start

```bash
# Initialize dotfiles repo (new)
dfs init --remote git@github.com:user/dotfiles.git

# Track a file
dfs add ~/.zshrc
dfs add ~/.gitconfig

# Push to remote
dfs push

# On a new machine: clone and link everything
dfs init --clone git@github.com:user/dotfiles.git
dfs link
```

## Track Files

```bash
dfs add ~/.zshrc                               # track file
dfs add ~/.config/nvim/init.lua                # nested path supported
dfs add ~/.config/work/config --profile work-mac  # add to specific profile
```

## List and Status

```bash
dfs list                    # all tracked files with symlink status
dfs status                  # overall health: linked count, git status
```

Status symbols:
- `ok` - file is correctly symlinked
- `*` - file needs linking (unlinked)
- `x` - conflict (file exists but is not a repo symlink)
- `?` - missing (symlink target not in repo)

## Link and Unlink

```bash
dfs link                    # create all missing symlinks
dfs link --force            # overwrite conflicting files
dfs link ~/.zshrc           # link specific file
dfs unlink                  # remove all symlinks (files remain tracked)
```

## Sync with Remote

```bash
dfs push                    # git add + commit + push
dfs push --message "add nvim config"   # custom commit message
dfs pull                    # git pull + re-link new files
dfs diff                    # show uncommitted changes
dfs diff ~/.zshrc           # diff specific file
```

## Machine Profiles

Profiles group files for specific machines:

```bash
dfs profile list                            # all profiles
dfs profile create work-mac                 # create profile
dfs profile add work-mac ~/.config/work     # add file to profile
dfs profile apply work-mac                  # link only this profile's files
```

The `common` profile includes all files with no profile assignment (linked on all machines).

## Bootstrap New Machine

```bash
# Clone existing dotfiles repo
dfs init --clone git@github.com:user/dotfiles.git

# Apply a specific profile
dfs link
# or
dfs init --clone git@github.com:user/dotfiles.git --profile home-linux
```

## Remove Tracking

```bash
dfs remove ~/.zshrc         # stop tracking, restore original file
```

## CLI Reference

| Command | Description |
|---|---|
| `init` | Initialize dotfiles repo |
| `add <file>` | Track a file |
| `remove <file>` | Stop tracking a file |
| `list` | List tracked files with status |
| `status` | Overall sync status |
| `link [file]` | Create symlinks |
| `unlink [file]` | Remove symlinks |
| `push` | Commit and push changes |
| `pull` | Pull and re-link |
| `diff [file]` | Show uncommitted changes |
| `profile` | Manage machine profiles |

## Environment Variables

| Variable | Default | Description |
|---|---|---|
| `DFS_REPO_PATH` | `~/dotfiles` | Dotfiles repository path |
| `DFS_NO_COLOR` | `0` | Disable ANSI color (1 to disable) |
| `DFS_DEBUG` | `0` | Enable debug logging (1 to enable) |

## Exit Codes

| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | File not tracked |
| 2 | Conflict (file exists, not a symlink) |
| 3 | Runtime error |

Related Skills

Skill: Uptime Monitoring

7
from heldernoid/agentic-build-templates

## Overview

Skill: Status Page

7
from heldernoid/agentic-build-templates

## Overview

Skill: unit-conversion

7
from heldernoid/agentic-build-templates

## Overview

Skill: recipe-scaler

7
from heldernoid/agentic-build-templates

## Overview

reading-list

7
from heldernoid/agentic-build-templates

Operate the reading-list API to save, manage, tag, search, and export articles.

email-digest

7
from heldernoid/agentic-build-templates

Configure, test, and troubleshoot the reading-list daily email digest delivered via nodemailer.

websocket-realtime

7
from heldernoid/agentic-build-templates

Use the WebSocket connection in poll-builder to receive live vote updates. Use when you need to stream real-time poll results, monitor a poll for new votes, or build a live dashboard. Triggers include "live results", "real-time updates", "stream votes", "watch poll", or "WebSocket".

poll-builder

7
from heldernoid/agentic-build-templates

Self-hosted poll creation tool with real-time results. Use when you need to create a poll, check vote counts, close a poll, export results, or get the shareable link for a poll. Triggers include "create poll", "vote", "poll results", "survey", "collect votes", "share poll", or any task involving polling or voting.

Skill: personal-finance

7
from heldernoid/agentic-build-templates

## Overview

Skill: csv-import

7
from heldernoid/agentic-build-templates

## Overview

Skill: Syntax Highlighting

7
from heldernoid/agentic-build-templates

## Purpose

Skill: Pastebin Core

7
from heldernoid/agentic-build-templates

## Purpose