using-git-worktrees

Create isolated Git worktrees with gitignore safety checks.

1|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/xiaobin/superpowers-kimi --skill using-git-worktrees-xiaobin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/xiaobin/superpowers-kimi/tree/main/.agents/skills/using-git-worktrees
Command: npx skills add https://github.com/xiaobin/superpowers-kimi --skill using-git-worktrees-xiaobin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Start feature work with isolation from the current workspace by creating isolated Git worktrees that share the repository, ensuring safe development environments.

Core Features & Use Cases

  • Prioritized directory selection (.worktrees or worktrees) with a fallback to user input
  • Safety verification to ensure project-local worktrees are ignored by gitignore rules
  • Automatic project-name detection and cross-platform worktree creation
  • Auto-run project setup and verify a clean baseline before development

Quick Start

Start by creating an isolated worktree for your feature branch using the configured location and automatic safety checks.

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 feature development?

To create an isolated Git worktree, the process selects a dedicated directory like `.worktrees`, verifies gitignore safety rules using `git check-ignore`, automatically detects the project name, and runs dependency installation to establish a clean baseline.

Why do I need to verify gitignore rules before creating a Git worktree?

Verifying gitignore rules prevents project-local worktrees from being accidentally tracked by Git. The safety verification uses `git check-ignore` to ensure your isolated workspace directory is properly ignored before starting feature development.

Can I specify a custom directory location for my Git worktree?

Yes, you can specify a custom directory for your Git worktree. The system uses prioritized directory selection, defaulting to `.worktrees` or `worktrees`, but will prompt for user input as a fallback if those standard locations are unavailable.

Does Git worktree creation automatically install dependencies and run tests?

Yes, Git worktree creation automatically runs project setup for common ecosystems to install dependencies. It also performs baseline test verification to ensure you start feature development with a clean and passing environment.

What is the best way to isolate feature development from my current workspace?

Using Git worktrees is an effective way to isolate feature development from your current workspace. This approach creates a dedicated working directory that shares the repository history while keeping your new branch changes completely separate.