using-git-worktrees

Create isolated Git worktrees for feature branches with safety checks.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/ilderaj/superpowering-with-files --skill using-git-worktrees-ilderaj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/ilderaj/superpowering-with-files/tree/main/harness/upstream/superpowers/skills/using-git-worktrees
Command: npx skills add https://github.com/ilderaj/superpowering-with-files --skill using-git-worktrees-ilderaj

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When starting feature work that must stay isolated from the current workspace, this skill creates and manages isolated git worktrees to provide safe, reproducible environments.

Core Features & Use Cases

  • Isolated workspace creation: automatically sets up a git worktree in a project-local or global location to isolate feature work from the main repo.
  • Directory selection policy: follows a clear priority to reuse existing worktrees, respect CLAUDE.md preferences, or prompt the user when needed.
  • Safety verifications: checks that the chosen directories are ignored by git to prevent accidental commits of worktree contents; validates baselines before proceeding.

Quick Start

Announce and run the skill to initialize an isolated git worktree for your feature branch.

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?

You can create an isolated git worktree by running the skill, which automatically detects the preferred location, checks that the path is ignored by git, and sets up the worktree to isolate feature work from the main repository.

What is the best way to keep experimental code branches isolated from my main workspace?

Git worktrees provide the best way to keep experimental code isolated by creating separate working directories for each branch, ensuring feature work stays separated from the main repository while maintaining safety verifications.

How does git worktree directory selection work when starting a new feature?

Directory selection for git worktrees follows a clear priority: reuse existing worktrees, respect CLAUDE.md preferences, or prompt the user when needed, ensuring the chosen path is ignored by git to prevent accidental commits.

Does this git worktree setup check if the directory is ignored by git?

Yes, the setup includes safety verifications that check whether the chosen worktree paths are properly ignored by git to prevent accidental commits of worktree contents into the main repository.

Can I use git worktrees for experiments that require different tooling configurations?

Yes, git worktrees support experiments requiring different tooling configurations by providing branch isolation across project contexts, creating safe and reproducible environments separate from the main repository.

Why do I need to verify a clean baseline before creating a git worktree?

Verifying a clean baseline before creating a git worktree ensures the main repository state is stable, preventing accidental commits of worktree contents and ensuring a safe, reproducible environment for feature development.