dev.worktrees
Installation
SKILL.md
dev.worktrees
Overview
Use this skill to create and manage git worktrees with a fixed on-disk layout rooted at ~/.worktrees.
Conventions
- Resolve the repo name from the main repo directory basename (folder containing
.git), unless the user provides an override. - Always store worktrees under
~/.worktrees/<repo>/<branch-name>. - Keep the branch name as-is; if it contains
/, it naturally becomes nested folders. - Run worktree commands from the main repo unless the user specifies a different worktree.
- If the user requests a different location, confirm the deviation before proceeding.
Quick Tasks
Create worktree for an existing branch
mkdir -p ~/.worktrees/<repo>
git worktree add ~/.worktrees/<repo>/<branch-name> <branch-name>