using-git-worktrees

Create isolated Git worktrees with safety verification and automatic setup.

2|Updated Jan 7, 2026
One-click install
npx skills add https://github.com/yuma588/skill-gallery --skill using-git-worktrees-yuma588
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/yuma588/skill-gallery/tree/main/skill-gallery-deploy/skills/community/superpower/using-git-worktrees
Command: npx skills add https://github.com/yuma588/skill-gallery --skill using-git-worktrees-yuma588

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate feature work from the current workspace by creating and managing Git worktrees with safe directory selection and validation.

Core Features & Use Cases

  • Directory discovery and priority: prefer project-local .worktrees, then worktrees, then CLAUDE.md preferences, or prompt the user for a location.
  • Safety verification: ensure any project-local worktree directory is ignored by git; auto-fix .gitignore when needed.
  • Automatic setup and testing: auto-detect and run appropriate setup commands (npm, cargo, pip, etc.) to initialize the new worktree, followed by baseline tests.
  • Transparent reporting: provide a ready-to-implement Worktree status with location and test results.

Quick Start

Set up an isolated git worktree for the current project, prioritizing a project-local directory and performing safety checks before creation.

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 Skill automates safe directory selection by prioritizing project-local paths, verifying gitignore status, and running baseline setup commands to ensure a detached development environment.

How does git worktree isolation handle directory selection and safety?

Git worktree isolation handles safety by prioritizing project-local `.worktrees` paths, verifying the directory is ignored by git, and automatically applying `.gitignore` fixes to prevent accidental commits.

Can I automatically run setup and tests when creating a new git worktree?

Yes, the Skill auto-detects and executes environment initialization commands like npm or cargo, followed by baseline tests to validate the new git worktree workspace immediately after creation.

What is the best way to manage git worktrees without affecting my current workspace?

The best way to manage git worktrees without affecting your current workspace is using automated isolation that creates a separate directory, verifies gitignore rules, and initializes the environment independently from your main branch.

Why do I need to verify .gitignore before setting up a project-local worktree?

You need to verify `.gitignore` before setting up a project-local worktree to prevent the isolated directory from being accidentally tracked and committed to the main repository, ensuring safe isolation.