ostepan8/dotfiles/dotfiles-worktree
Claude Code and agent skill by ostepan8/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
The way to make ANY change to ~/dotfiles — each change in its own git worktree, landed straight onto origin/main with `dfw`, conflicts resolved, worktree deleted. Lets many sessions change dotfiles at once without stepping on each other. Use whenever a task edits ~/dotfiles or any live config that is symlinked into it (~/.zshrc, ~/.config/*, ~/.claude-personal/*, skills, hooks, manifest.conf), whenever Owen asks for a dotfiles/config/skill/hook change, or when ~/dotfiles has leftover worktrees, a stuck rebase, or a dotfiles merge conflict. Pairs with dotfiles-sync, which says WHERE things go; this says HOW the change lands.
Install
npx vskill@latest install ostepan8/dotfiles/dotfiles-worktreeSKILL.md
The same SKILL.md was published earlier as ostepan8/dotfiles/dotfiles-worktree.
dotfiles-worktree
Never edit files in ~/dotfiles directly, and never edit a live config that is a symlink into it. Most live configs (~/.zshrc, ~/.config/..., ~/.claude-personal/...) are symlinks into that one checkout. So every session editing "its" file is editing the same working tree. sync.sh also autostashes over that tree every 30 min. That is how half-merged lockfiles and stray stashes happen. Every change gets its own worktree.
The loop
dfw land:
- Commits anything uncommitted, using
-m. - Rebases onto the latest
origin/main. Structured JSON configs merge automatically (see
below).
- Pushes to
origin/main. If another session landed first, it rebases and retries.
The pre-push make check secret scan runs here.
- Fast-forwards
~/dotfilesand runsapply.sh, so the change is live on this
machine. Other machines pick it up on their next sync.sh tick, or right away with make fleet.
- Deletes the worktree and its
df/<slug>branch.
Landing is the default: Owen asked for dotfiles changes to go all the way to main without asking. Several changes at once is fine. Give each one its own slug, which can be several worktrees in one session or one per session.
Pick a slug that names the change (aerospace-ws-pin, claude-kill-guard). dfw start is idempotent. Re-running it with the same slug returns the existing worktree, so an interrupted session can resume.
Verify before landing
The worktree is not live. To check it:
- shell:
zsh -n $WT/base/zsh/zshrc - JSON:
python3 -m json.tool $WT/base/claude/settings.json - repo checks:
make -C $WT check - apply engine:
make -C $WT verify
For a behaviour you can only see live (a hotkey, a bar item), land it, look at it, and fix forward with another dfw start.
Conflicts (exit 3)
settings.json,codex/hooks.jsonandnvim/lazy-lock.jsonmerge by structure
through the dfjson driver in .gitattributes. Keys, hooks and permissions added on both sides are all kept.
lazy-lockpin clashes take the incoming side.- When the same setting was changed to two different values, you get normal conflict
markers.
- Anything else:
dfw landstops, lists the conflicted files and leaves the rebase open
in the worktree. For each file:
git -C $WT diff <file>. Read both sides andgit log origin/main -3 -- <file>for
what the other change wanted.
- Edit to keep both intents. Never pick a side wholesale. Dropping the other
session's change is the one unacceptable outcome.
grep -c '^<<<<<<<\|^>>>>>>>' <file>must print 0, and the file must still parse
(zsh -n, json.tool, …).
git -C $WT add <file>.- Re-run
dfw land <slug>. It continues the rebase and carries on.
- Only if two changes truly contradict each other (both set the same key to different
values on purpose) do you ask Owen which one wins.
Other exits and states
| Output | Meaning / action | |
|---|---|---|
exit 4, make check output | The secret scan or exec-bit check refused the push. Fix it in $WT (e.g. move a private domain/IP into ~/.config/... and read it at runtime), commit, re-run land. | |
landed, but ~/dotfiles could not fast-forward | Someone left uncommitted edits in the main checkout on a file you changed. The change IS on main. Move those edits into their own worktree (dfw start, copy them over, git -C ~/dotfiles checkout -- <file> only after confirming they are copied), then git -C ~/dotfiles merge --ff-only origin/main && make -C ~/dotfiles apply. | |
locked by another sync | sync.sh was running. The change is on main, and the next sync tick applies it. | |
exit 2 uncommitted changes | Commit in $WT or pass -m. |
Housekeeping
dfw lslists open worktrees withclean/dirty/CONFLICTand commits ahead.
Check it at the start of dotfiles work. A worktree you did not create belongs to another session: leave it alone.
dfw gcremoves worktrees whose work is already on main and that have nothing
uncommitted.
dfw abort <slug>discards a worktree and its unlanded commits. Only when Owen says to
drop that change.
Tests
make dfw-test runs the JSON-merge unit tests and an end-to-end run of parallel lands, JSON overlap, text conflict and resume against a throwaway origin. Run it after editing scripts/dfw or scripts/json-merge.py. Those two are themselves dotfiles, so change them through a worktree too.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbase/agents/skills/dotfiles-worktree/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ostepan8/dotfiles/dotfiles-worktree)