using-git-worktrees

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

1|Updated Oct 11, 2025
One-click install
npx skills add https://github.com/ibytechaos/claude --skill using-git-worktrees-ibytechaos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/ibytechaos/claude/tree/main/plugins/superpowers/skills/using-git-worktrees
Command: npx skills add https://github.com/ibytechaos/claude --skill using-git-worktrees-ibytechaos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on a new feature often requires switching branches or stashing changes, which disrupts your current workspace. This Skill creates isolated git worktrees so you can develop features in parallel without touching your main working directory, while preventing common mistakes like committing worktree contents or starting from a broken baseline. ## Core Features & Use Cases - Smart Directory Selection: Follows a priority order (existing .worktrees/ or worktrees/ directory, then CLAUDE.md preference, then asks the user) to pick a consistent worktree location. - Safety Verification: Checks with git check-ignore that project-local worktree directories are gitignored before creation, and fixes the .gitignore automatically if not. - Automated Project Setup: Auto-detects Node.js, Rust, Python, or Go projects and runs the appropriate dependency install, then runs the test suite to verify a clean baseline. - Use Case: You are about to implement an approved feature design. The Skill creates .worktrees/feature-auth on a new branch, runs npm install, confirms all 47 tests pass, and reports the workspace is ready. ## Quick Start Ask the AI to set up an isolated git worktree for your new feature branch before starting implementation.

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 Skill automates that plus directory selection, dependency install, and baseline tests.

Where should git worktrees be stored in a project?

This Skill checks for an existing .worktrees or worktrees directory first, then any CLAUDE.md preference, then asks you to choose between a project-local .worktrees/ folder or a global ~/.config/superpowers/worktrees location.

Why must the worktree directory be in .gitignore?

If a project-local worktree directory is not ignored, its contents can be accidentally tracked and pollute git status. The Skill verifies this with git check-ignore and adds the entry to .gitignore with a commit if missing.

What happens if tests fail in a new worktree?

The Skill runs the project's test suite after setup to establish a clean baseline. If tests fail, it reports the failures and asks whether to proceed or investigate, so pre-existing issues are not confused with new bugs.

Does git worktree setup work with Rust or Python projects?

Yes. The Skill auto-detects the project type from marker files: package.json triggers npm install, Cargo.toml triggers cargo build, requirements.txt or pyproject.toml trigger pip or poetry install, and go.mod triggers go mod download.