using-git-worktrees

Creates isolated git worktree workspaces with native tool detection and baseline test verification.

Updated Sep 6, 2026
One-click install
npx skills add https://github.com/kangjuhyup/study --skill using-git-worktrees-kangjuhyup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/kangjuhyup/study/tree/main/scoped-superpowers-ab/workflow-code-benchmark/fixture/workflows/full/skills/using-git-worktrees
Command: npx skills add https://github.com/kangjuhyup/study --skill using-git-worktrees-kangjuhyup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Starting feature work directly in your main checkout risks mixing experimental changes with your current branch state. This Skill ensures every implementation task begins in an isolated workspace, detecting existing isolation, preferring native worktree tools, and falling back to manual git worktrees only when needed. ## Core Features & Use Cases - Isolation Detection: Checks whether you are already inside a linked worktree or a git submodule before creating anything, avoiding duplicate or phantom workspaces. - Native Tool Preference with Git Fallback: Uses platform-native worktree tools (e.g., EnterWorktree) when available, otherwise creates a worktree under a verified, git-ignored .worktrees/ directory. - Project Setup and Baseline Verification: Auto-detects Node.js, Rust, Python, or Go projects, installs dependencies, and runs the test suite to confirm a clean baseline before implementation. - Use Case: Before implementing a new feature branch, ask the assistant to set up an isolated workspace; it will create .worktrees/feature-x, install dependencies, and report that all tests pass. ## Quick Start Ask the assistant to set up an isolated git worktree for your new feature branch and verify the project tests pass before starting work.

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 an isolated 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/feature-x -b feature-x. Verify the directory is git-ignored first so worktree contents are never committed to the repository.

How do I check if I am already inside a git worktree?

Compare git rev-parse --git-dir with git rev-parse --git-common-dir; if they differ, you are in a linked worktree. Also run git rev-parse --show-superproject-working-tree to rule out being inside a submodule, which shows the same difference.

Should I use git worktree add or a native worktree tool?

Prefer a native tool such as EnterWorktree or a /worktree command when one is available, since it manages directory placement, branching, and cleanup automatically. Manual git worktree add is the fallback when no native tool exists.

Why should the worktrees directory be added to .gitignore?

An unignored worktree directory causes the entire nested worktree contents to be committed into the parent repository. Run git check-ignore on the directory first, and if it is not ignored, add it to .gitignore and commit that change before creating the worktree.

What happens if git worktree add fails with a permission error?

A permission error usually means the sandbox blocked worktree creation. In that case, report the sandbox denial and continue working in the current directory, running dependency setup and baseline tests in place instead.