using-git-worktrees

Create isolated git worktrees with validated ignore rules for feature work.

1|Updated Nov 22, 2025
One-click install
npx skills add https://github.com/gmliao/swift-state-tree --skill using-git-worktrees-gmliao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/gmliao/swift-state-tree/tree/main/.agent/skills/Superpowers/using-git-worktrees
Command: npx skills add https://github.com/gmliao/swift-state-tree --skill using-git-worktrees-gmliao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enables teams to start feature work in isolated git worktrees, preventing changes from affecting the main workspace and preserving a clean project baseline.

Core Features & Use Cases

  • Isolated Workspaces: Creates worktrees that share the same repository but keep feature work separate.
  • Directory Preference & Safety: Automatically selects preferred local directories or global locations, with safety checks (ignore verification) before creation.
  • Project Setup & Baseline: Detects the project name and ensures a clean baseline by verifying ignores and performing initial setup when needed.

Quick Start

Use the using-git-worktrees skill to set up an isolated workspace.

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 without affecting my main workspace?

To create an isolated git worktree, the skill sets up a separate directory that shares your repository while keeping feature work distinct. It auto-detects the project name and verifies gitignore rules to ensure your main workspace remains safe and unaffected.

What is the best way to manage multiple git worktrees for different features?

Managing multiple git worktrees is handled by supporting both project-local directories like .worktrees and global locations. This approach isolates feature work safely, preserving a clean project baseline while allowing you to switch contexts without stashing changes.

Do I need git installed to use isolated worktrees for feature work?

Yes, you need git installed in your environment and an active repository context. The skill requires git to perform safety verification by checking ignore rules before creating a new worktree and reporting readiness.

Why does creating a git worktree require checking gitignore rules?

Checking gitignore rules is required to validate safety before creating a git worktree. This verification ensures your isolated workspace respects existing ignore configurations, preventing unwanted files from polluting the new worktree and preserving project baseline integrity.

Can I specify a global location instead of a local directory for my git worktree?

Yes, you can use global locations instead of project-local directories like .worktrees. The skill automatically selects preferred local or global locations based on your setup, performing safety checks and ignore verification before creating the worktree.

How does using git worktrees help maintain a clean project baseline?

Git worktrees help maintain a clean project baseline by creating isolated workspaces that share the repository but keep feature changes separate. This prevents uncommitted changes from affecting your main workspace, ensuring a stable baseline.