using-git-worktrees

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

1|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/Emmanuel-R8/aikos --skill using-git-worktrees-emmanuel-r8
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/Emmanuel-R8/aikos/tree/main/.cursor/skills/using-git-worktrees
Command: npx skills add https://github.com/Emmanuel-R8/aikos --skill using-git-worktrees-emmanuel-r8

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on a new feature often requires switching branches, stashing changes, or risking contamination of your current workspace. This Skill sets up isolated git worktrees so you can develop on separate branches simultaneously without disrupting your main working directory. ## Core Features & Use Cases - Smart Directory Selection: Follows a priority order (existing .worktrees/ or worktrees/ directories, then CLAUDE.md preferences, then user prompt) to pick a consistent worktree location. - Safety Verification: Confirms project-local worktree directories are git-ignored before creation, automatically fixing .gitignore and committing the change if needed. - Automated Project Setup: Detects project type (Node.js, Rust, Python, Go) and runs the appropriate dependency installation, then verifies a clean test baseline before reporting readiness. - Use Case: Before implementing an approved feature design, create an isolated worktree at .worktrees/feature-auth, install dependencies, and confirm all 47 existing tests pass so new bugs are distinguishable from pre-existing issues. ## Quick Start Set up an isolated git worktree for my new feature branch and verify the project tests pass before I start implementing.

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 the -b flag to create a new branch, for example git worktree add .worktrees/auth -b feature/auth. This creates an isolated workspace sharing the same repository without switching your current branch.

Where should git worktrees be stored in a project?▼

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

Why must worktree directories be added to .gitignore?▼

Project-local worktree contents would otherwise appear as untracked files and could be accidentally committed, polluting the repository. Verify with git check-ignore before creation, and if not ignored, add the directory to .gitignore and commit the change first.

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

Failing baseline tests mean pre-existing issues exist before any new work begins. Report the failures and ask whether to proceed or investigate, since continuing without a clean baseline makes it impossible to distinguish new bugs from old ones.

Does worktree setup work with Python or Rust projects?▼

Yes, setup is auto-detected from project files: npm install for package.json, cargo build for Cargo.toml, pip or poetry install for requirements.txt or pyproject.toml, and go mod download for go.mod. If no recognized file exists, dependency installation is skipped.