using-git-worktrees

Create isolated git worktrees for feature work with setup and test verification.

Updated Mar 20, 2026
One-click install
npx skills add https://github.com/sixscripts-ai/ghostssh --skill using-git-worktrees-sixscripts-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/sixscripts-ai/ghostssh/tree/main/skills/using-git-worktrees
Command: npx skills add https://github.com/sixscripts-ai/ghostssh --skill using-git-worktrees-sixscripts-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates creating isolated git worktrees to isolate feature work from the current repository.

Core Features & Use Cases

  • Priority-based directory selection among .worktrees and worktrees with safety verification.
  • CLAUDE.md preference support to steer directory choice without prompts.
  • Safety-first creation workflow including gitignore checks, patching .gitignore if needed, and automated setup/test baseline.

Quick Start

Create an isolated git worktree for a feature branch to safely experiment without touching the main 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 for feature work?

To create an isolated git worktree, the process selects a priority directory like .worktrees, verifies safety with git check-ignore, updates .gitignore if needed, and automatically runs project setup steps from your manifest files. This ensures your new worktree is fully configured and isolated from the main workspace.

What is the safest way to set up git worktrees without affecting my main workspace?

The safest way to set up git worktrees involves a safety-first workflow that checks directory priority, uses git check-ignore to prevent tracking issues, patches .gitignore automatically, and runs a post-creation test baseline. This guarantees your main workspace remains unaffected by feature branch experimentation.

How do I configure git worktree directory preferences using CLAUDE.md?

You can configure git worktree directory preferences by adding hints to your CLAUDE.md file. The creation process reads these preferences to automatically steer directory choice between local and global locations without requiring interactive prompts during setup.

Can I automatically run project setup steps when creating a git worktree?

Yes, you can automatically run project setup steps when creating a git worktree. The process auto-detects manifest files like package.json, Cargo.toml, requirements.txt, pyproject.toml, and go.mod, executing the necessary installations to establish a functional test baseline immediately after worktree creation.

Does git worktree creation handle .gitignore updates and commits automatically?

Git worktree creation handles .gitignore updates by performing safety verification with git check-ignore. If the worktree directory is not ignored, it optionally patches the .gitignore file and commits the changes to ensure the isolated feature work directory remains untracked by the main repository.