Individual skill
using-git-worktrees
Creates and removes isolated git worktrees for parallel development. Use when starting feature work needing isolation, working on multiple branches simultaneously, or removing one specific worktree and its branch after its PR merges. NOT for simple branch switching, sweeping multiple stale worktrees or merged branches at once (use cleanup-git), or git hook/config setup (use configuring-git-hygiene).
src/skills/using-git-worktrees/SKILL.md
Source commit 5ad5b8f0df027cf694ccbeb3311830890f01d582
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 7, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 38
- Repository last updated
- Oct 25, 2026
- License
- MIT
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- ai-coding Repository topic
- claude-code Repository topic
- code-review Repository topic
- developer-tools Repository topic
- codex Repository topic
- pi-coding-agent Repository topic
- agent-skills Repository topic
- codex-cli Repository topic
- coding-agents Repository topic
- cursor Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
.agentbundler/targets/claude.jsonasset · 548 bytesSKILL.mdcore · 3,246 bytesreferences/workflow.mddoc · 1,621 bytesscripts/cleanup-worktree.shruns · 4,984 bytesscripts/setup-worktree.shruns · 8,442 bytes
Read excerpt
# Git Worktrees
A worktree gives parallel work its own folder and branch while the main worktree stays clean on the integration branch. Each project gets one sibling root, `<project>.worktrees/`, with one directory per branch named by its slug (`/` → `-`, so `feature/auth` → `feature-auth`). Remove the worktree and branch after the PR merges.
A plain branch switch with no parallel work needs no worktree: check `git status --short`, then `git switch <branch>`. Trivial solo one-liners may also stay in the main worktree.
## Create
Check `git status --short` and `git worktree list` first. Leave uncommitted changes where they are and never stash them silently; pass `--allow-dirty` only when the user has authorized isolating new work while keeping them.
```bash
scripts/setup-worktree.sh <branch> [--base <ref>] [--allow-dirty] [--setup] [--test]
```