using-git-worktrees
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
npx skills add sickn33/agentic-awesome-skills --skill using-git-worktrees --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Using Git Worktrees ## Overview Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching. **Core principle:** Systematic directory selection + safety verification = reliable isolation. **Announce at start:** "I'm using the using-git-worktrees skill to set up an isolated workspace." ## Directory Selection Process Follow this priority order: ### 1. Check Existing Directories ```bash # Check in priority order ls -d .worktrees 2>/dev/null # Preferred (hidden) ls -d worktrees 2>/dev/null # Alternative ``` **If found:** Use that directory. If both exist, `.worktrees` wins. ### 2. Check CLAUDE.md ```bash grep -i "worktree.*director" CLAUDE.md 2>/dev/null ``` **If preference specified:** Use it without asking. ### 3. Ask User If no directory exists and no CLAUDE.md preference: ``` No worktree directory found. Where should I create worktrees? 1. .worktrees/ (project-local, hidden) 2. ~/.config/superpowers/worktrees/<project-name>/ (global location) Which would you prefer? ``` ## Safety Verification ### For Project-Local Directories (.worktrees or worktrees) **MUST verify directory is ignored before creating w
- Overview
- Directory Selection Process
- 1. Check Existing Directories
- 2. Check CLAUDE.md
- 3. Ask User
- Safety Verification
- For Project-Local Directories (.worktrees or worktrees)
- For Global Directory (~/.config/superpowers/worktrees)
- Creation Steps
- 1. Detect Project Name
- 2. Create Worktree
- 3. Run Project Setup
- 4. Verify Clean Baseline
- 5. Report Location
Check in priority order ls -d .worktrees 2>/dev/null # Preferred (hidden) ls -d worktrees 2>/dev/null # Alternative grep -i "worktree.*director" CLAUDE.md 2>/dev/null Check if directory is ignored (respects local, global, and system gitignore) git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null Determine full path case $LOCATION in esac Create worktree with new branch
What does the using-git-worktrees skill do?
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
How do I install it?
Run `npx skills add sickn33/agentic-awesome-skills --skill using-git-worktrees --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From sickn33/agentic-awesome-skills, a repository with 44,414 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.