using-git-worktrees

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

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Pgooone/oh-pgone-claudecode --skill using-git-worktrees-pgooone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/Pgooone/oh-pgone-claudecode/tree/main/.claude/plugins/cache/superpowers-marketplace/superpowers/5.0.6/skills/using-git-worktrees
Command: npx skills add https://github.com/Pgooone/oh-pgone-claudecode --skill using-git-worktrees-pgooone

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 sets up isolated git worktrees so you can develop on a separate branch without touching your main working directory. ## Core Features & Use Cases - Smart Directory Selection: Detects existing .worktrees/ or worktrees/ directories, respects CLAUDE.md preferences, and asks the user when no convention exists. - Safety Verification: Confirms project-local worktree directories are git-ignored before creation, automatically fixing .gitignore and committing the change if needed. - Automated Project Setup: Auto-detects Node.js, Rust, Python, or Go projects and runs the appropriate dependency install, then verifies a clean test baseline before work begins. - 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 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. The Skill automates this along with dependency installation and baseline test verification.

Where should git worktrees be stored in a project?▼

The 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 be accidentally tracked and committed, polluting git status. The Skill runs git check-ignore before creation 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 support Python and Rust projects?▼

Yes, the Skill auto-detects 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.