using-git-worktrees

Creates isolated git worktrees with directory selection, ignore verification, and baseline test validation.

Updated Jul 24, 2026
One-click install
npx skills add https://github.com/eklyukin/my-ai-config --skill using-git-worktrees-eklyukin
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/eklyukin/my-ai-config/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/eklyukin/my-ai-config --skill using-git-worktrees-eklyukin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on multiple branches simultaneously or running parallel agent sessions risks clobbering your current checkout, mixing unrelated changes, and losing work to branch collisions. This Skill sets up isolated git worktrees so each feature or session gets its own workspace sharing the same repository. ## Core Features & Use Cases - Smart Directory Selection: Follows a priority order (existing .worktrees/ or worktrees/, then CLAUDE.md preference, then asks the user) so worktrees land where the project expects them. - Safety Verification: Verifies project-local worktree directories are git-ignored before creation, and auto-detects project setup (npm, Cargo, pip, Poetry, Go) plus runs baseline tests before handing off the workspace. - Jira-Aware Branching: Derives branch names from linked Jira issue keys (e.g., IEO-121) and bases them on parent epic branches when present. - Use Case: Before implementing a feature from a plan document, spin up .worktrees/IEO-121 on the correct base branch, install dependencies, confirm tests pass, and start coding without touching your main checkout. ## Quick Start Use the using-git-worktrees skill to set up an isolated workspace for the current feature branch.

Frequently Asked Questions about using-git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a git worktree for a new feature branch?▼

Run git worktree add with a target path and -b to create the branch from a base, for example git worktree add .worktrees/auth -b feature/auth main. The skill automates this after picking the directory and verifying it is git-ignored.

Where should git worktrees be stored in a project?▼

Prefer an existing .worktrees/ directory, then worktrees/, then any location specified in CLAUDE.md. If none exist, choose between project-local .worktrees/ or a global path like ~/.config/superpowers/worktrees/<project>/.

Why must the worktree directory be in .gitignore?▼

Project-local worktree directories that are not ignored get their contents tracked by git, polluting git status and risking accidental commits. Verify with git check-ignore and add the directory to .gitignore before creating the worktree.

What happens if baseline tests fail in a new worktree?▼

The skill reports the failures and asks whether to proceed or investigate rather than continuing silently. Starting with a failing baseline makes it impossible to distinguish new bugs from pre-existing issues.

How do I avoid branch collisions between concurrent sessions?▼

Give each session its own worktree and branch. If two sessions still target the same branch, fetch the latest tip, diff against your work, keep the better solution, and surface the collision instead of silently pushing a competing commit.