dotfiles-sync
Skill3 starsChanged 8 days agoMITView on GitHub
Check for and pull dotfiles updates, then re-run install.sh. Use when the user types /dotfiles-sync, starts a prompt with 'Sync', or asks to 'update my dotfiles', 'sync dotfiles', 'pull latest dotfiles', or 'are my dotfiles up to date'. Environment-aware for CWS (yadm) and local (git + symlinks).
1 other project uses a version of this.
Adopted by
Most recently taken up by
- AbdouMoumen/claude-skills-plugintheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- AbdouMoumen/claude-skills-plugin★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository36 other files it gives its agents.
- agent-statsSkill
- aristotle-deconstructorSkill
- babysit-prsSkill
- briefingSkill
- code-auditorSkill
- core-editSkill
- create-jira-ticketSkill
- create-tech-specSkill
- cyrus-tdd-engineerSkill
- doctorSkill
- forgeSkill
- google-docsSkill
- google-driveSkill
- grill-meSkill
- handoffSkill
- lessons-reviewSkill
- mermaid-diagramsSkill
- metrics-emitSkill
- obligationsSkill
- optimus-plannerSkill
- overlay-initSkill
- performance-reviewSkill
- pr-create-from-commitsSkill
- ranger-reviewerSkill
- record-demoSkill
- review-contextSkill
- review-respondSkill
- scout-reviewerSkill
- self-evaluateSkill
- smart-compactSkill
- smart-statuslineSkill
- swarm-retroSkill
- team-leadSkill
- ticket-pickupSkill
- ticket-swarmSkill
- to-prdSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 9 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Check for dotfiles updates, show what changed, pull with user approval, and re-run install.sh to apply.
- Very specific: line 34
CWS path: Use yadm commands (or git -C $HOME) for all git operations.
- Very specific: line 36
Local path: Use git commands in {dotfiles-dir}.
- Distinctive: line 78
If commits behind > 0, show the changes:
- Distinctive: line 124
Wait for user input. Do not pull without explicit approval.
- Very specific: line 126
If the user picks diff:
- Very specific: line 167
If install.sh produced warnings (e.g., "exists and is not a symlink"), surface them prominently.
- Distinctive: line 189
Branch mismatch: If the local branch is not master, note this and ask which branch to pull from.
- Distinctive: line 196
Never auto-pull on local machines: Always show changes and wait for approval.
- Distinctive: line 202
Network failures are non-blocking: If fetch fails, inform and offer retry.
- Very specific: line 212
After pulling overlay updates, check whether the dotfiles-core submodule has upstream changes available.
- Very specific: line 217
Check if .claude/dotfiles-core/ exists as a submodule in the overlay:
- Distinctive: line 223
If the submodule is absent or not initialized, skip this entire Step 7.
- Distinctive: line 241
If the two differed, report:
- Very specific: line 262
If count = 0, report "dotfiles-core is current." and skip Step 7c.
- Distinctive: line 283
Wait for user input.
- Distinctive: line 325
If you discover something during this task that would improve this skill, propose the change and ask me to confirm before saving it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Dotfiles Sync
Check for dotfiles updates, show what changed, pull with user approval,
and re-run install.sh to apply. Environment-aware for CWS (yadm) and
local (git + symlinks).
Step 1: Detect environment
Determine the layout the same way /doctor Step 1 does (_detect_layout
in core's scripts/_lib.sh; see PROTOCOL.md § Path ownership):
- CWS (yadm layout) —
yadm rev-parse --show-toplevelsucceeds: that is the repo root (normally$HOME). If yadm is absent but$HOME/.gitmodulesdeclaresdotfiles-core, the root is$HOME(a tree copied into$HOMEwithout its yadm repo; usegit -C $HOME). - Local (local layout) — otherwise. Resolve the
~/.claude/skills/forgesymlink and strip everything from/.claude/dotfiles-core/onward to get the repo root (a standalone core clone has no such segment; strip from/.claude/skills/instead):
Fall back totarget="$(readlink ~/.claude/skills/forge)" dotfiles_dir="${target%%/.claude/dotfiles-core/*}"~/dotfilesif the symlink doesn't exist.
CWS path: Use yadm commands (or git -C $HOME) for all git operations.
Local path: Use git commands in {dotfiles-dir}.
Step 2: Check for updates
Fetch the latest from origin (with a 10-second timeout to avoid hanging on network issues):
CWS:
cd $HOME && timeout 10 yadm fetch originLocal:
cd {dotfiles-dir} && timeout 10 git fetch originThen count commits behind:
git rev-list HEAD..origin/master --count
# (or yadm rev-list HEAD..origin/master --count)If fetch fails (network unavailable, timeout):
Cannot reach origin to check for updates.
-> retry = Try again
-> x = Skip (stay on current version)If already up to date (count = 0):
Dotfiles are current. Nothing to sync.Stop here.
Step 3: Show what changed
If commits behind > 0, show the changes:
git log HEAD..origin/master --oneline
# (or yadm log HEAD..origin/master --oneline)Also identify which categories of files changed:
git diff HEAD..origin/master --name-onlyCategorize changes for the user:
- Skills:
.claude/skills/*/SKILL.md - Agents:
.claude/agents/*.md - Global instructions:
.claude/CLAUDE.md - Hooks:
.cursor/hooks.json,.cursor/hooks/* - Install script:
install.sh - Aliases:
.aliases.local - Other: anything else
Step 4: Present and gate
Show the summary and ask:
Dotfiles are N commits behind origin/master.
Commits:
abc1234 feat: add swarm-retro skill
def5678 feat: strengthen Jira transition instructions
ghi9012 fix: branch creation default detection
Changed categories:
- Skills: ticket-swarm, swarm-retro (new), ticket-pickup
- Agents: (none)
- Global: CLAUDE.md
- Hooks: hooks.json
-> pull = Pull changes and re-run install.sh
-> diff = Show full diff before pulling
-> x = Skip (stay on current version)Wait for user input. Do not pull without explicit approval.
If the user picks diff:
git diff HEAD..origin/master
# (or yadm diff HEAD..origin/master)Then re-show the gate menu.
Step 5: Pull and install
CWS:
cd $HOME && yadm pull origin master && bash $HOME/install.shLocal:
cd {dotfiles-dir} && git pull origin master && bash {dotfiles-dir}/install.shCapture the output of install.sh and present a summary.
Step 6: Report results
Show what was applied:
Dotfiles synced successfully.
Pulled: N commits
New skills: swarm-retro
Updated skills: ticket-swarm, ticket-pickup
Updated: CLAUDE.md, hooks.json
install.sh: completed (no warnings)
Your agent definitions, skills, and hooks are now current.If install.sh produced warnings (e.g., "exists and is not a symlink"),
surface them prominently.
Edge cases
- Merge conflicts or dirty working tree (CWS): In CWS environments,
always discard local changes in favor of what's latest on master.
Local dotfiles edits in CWS are ephemeral — the source of truth is
the repo. Run:
Inform the user that local changes were discarded, but do not gate on approval — CWS local changes are never authoritative.yadm checkout -- . # or git -C $HOME checkout -- . yadm pull origin master - Merge conflicts or dirty working tree (local): On local machines, warn the user and suggest stashing or committing first. Do not auto-discard — local machines may have intentional uncommitted work.
- yadm not installed (CWS without yadm binary): Fall back to plain
git if the yadm repo is at
$HOME. Usegit -C $HOMEcommands. - Branch mismatch: If the local branch is not
master, note this and ask which branch to pull from.
Gate rules
- Never auto-pull on local machines. Always show changes and wait for approval.
- CWS environments auto-discard local changes. The remote master is always authoritative in CWS. Discard local modifications and pull without gating on dirty-tree approval (still show what was pulled).
- Never modify dotfiles content. This skill pulls and installs; it does not edit skill files, agents, or CLAUDE.md.
- Network failures are non-blocking. If fetch fails, inform and offer retry. Do not error out.
- install.sh is always re-run after pull. Even if only one file changed, the install script ensures all symlinks and plugins are current.
Step 7: Submodule pointer-bump (dotfiles-core)
After pulling overlay updates, check whether the dotfiles-core submodule has upstream changes available.
Step 7a — Detect submodule
Check if .claude/dotfiles-core/ exists as a submodule in the overlay:
git -C {dotfiles-dir} submodule status .claude/dotfiles-core 2>/dev/nullIf the submodule is absent or not initialized, skip this entire Step 7.
Step 7a.1 — Reconcile checked-out core with the recorded pointer
The checked-out submodule can lag the SHA the overlay records (a +
prefix in the submodule status output). That drift is not an upstream
change and must not be offered as a bump — the overlay already points
where it should. Reconcile first so 7b compares the right SHA:
recorded=$(git -C {dotfiles-dir} ls-tree HEAD .claude/dotfiles-core | awk '{print $3}')
checked_out=$(git -C {dotfiles-dir}/.claude/dotfiles-core rev-parse HEAD)
if [ "$recorded" != "$checked_out" ]; then
git -C {dotfiles-dir} submodule update --init --recursive .claude/dotfiles-core
fi
# (or the yadm equivalents on CWS)If the two differed, report:
dotfiles-core checkout was at <old-short-sha>; moved to the recorded pointer <new-short-sha>.Then re-run install.sh at the end of the sync even if no overlay commits
were pulled, since the core content on disk just changed.
Step 7b — Fetch core updates
git -C {dotfiles-dir}/.claude/dotfiles-core fetch origin 2>&1Count commits the submodule is behind:
git -C {dotfiles-dir}/.claude/dotfiles-core rev-list HEAD..origin/main --countIf count = 0, report "dotfiles-core is current." and skip Step 7c.
Step 7c — Show new core commits
git -C {dotfiles-dir}/.claude/dotfiles-core log --oneline HEAD..origin/mainPresent:
dotfiles-core has N new commits upstream:
abc1234 feat: migrate briefing skill into core
def5678 fix: trap cleanup in lib-overlays.sh
-> b = Bump submodule pointer to latest + reinstall
-> s = Skip (leave submodule at current SHA)
-> h = Help (explain what bumping does)Wait for user input.
On h:
Bumping the pointer means:
1. git -C .claude/dotfiles-core checkout origin/main
2. git add .claude/dotfiles-core
3. git commit -m "core: bump pointer to <short-sha>"
4. Re-run install-overlay.sh then dotfiles-core/install.sh
The overlay's submodule then tracks the new core SHA.Re-show the menu.
Step 7d — Bump pointer
On b:
# Advance submodule to origin/main
git -C {dotfiles-dir}/.claude/dotfiles-core checkout origin/main
# Commit the pointer bump in the overlay
cd {dotfiles-dir}
new_sha=$(git -C .claude/dotfiles-core rev-parse --short HEAD)
git add .claude/dotfiles-core
git commit -m "core: bump pointer to ${new_sha}"
# Re-run overlay install (apply fragments), then core install (symlinks)
bash {dotfiles-dir}/.claude/dotfiles-core/install.shReport:
dotfiles-core bumped to <new-sha>.
Reinstalled core symlinks and overlay fragments.Maintenance
If you discover something during this task that would improve this skill, propose the change and ask me to confirm before saving it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

