using-git-worktrees

Creates isolated git worktrees with directory selection and safety verification.

92|12|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/ARounder-183/HiFiShifter --skill using-git-worktrees-arounder-183
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/ARounder-183/HiFiShifter/tree/main/.github/skills/using-git-worktrees
Command: npx skills add https://github.com/ARounder-183/HiFiShifter --skill using-git-worktrees-arounder-183

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 on separate branches simultaneously without touching your main working directory. ## Core Features & Use Cases - Smart Directory Selection: Automatically detects existing .worktrees/ or worktrees/ directories, checks CLAUDE.md for preferences, and asks the user only when no convention exists. - Safety Verification: Verifies project-local worktree directories are git-ignored before creation, and fixes the .gitignore if they are not, preventing accidental commits of worktree contents. - Automated Project Setup: Detects the project type (Node.js, Rust, Python, Go) and runs the appropriate dependency installation, then verifies a clean test baseline before reporting readiness. - Use Case: You are mid-way through debugging on main when a new feature request arrives. Use this Skill to spin up an isolated worktree at .worktrees/feature-auth with dependencies installed and tests passing, leaving your current workspace untouched. ## Quick Start Set up an isolated git worktree for the new authentication feature branch and verify the project tests pass there.

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 path selection, branch creation, and project setup in one workflow.

Where should git worktrees be stored in a project?

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

Why must the worktree directory be in .gitignore?

If a project-local worktree directory is not ignored, its contents can appear in git status and be accidentally committed to the repository. The Skill runs git check-ignore before creation and adds the directory to .gitignore if needed.

Does the worktree setup install dependencies automatically?

Yes. The Skill auto-detects the project type from files like package.json, Cargo.toml, requirements.txt, pyproject.toml, or go.mod, then runs the matching install command such as npm install, cargo build, or go mod download.

What happens if tests fail in a new worktree?

The Skill runs the project's test suite 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.