using-git-worktrees

Create an isolated git worktree for feature development with safety checks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers set up isolated git workspaces for feature work, preventing interference with the main branch and simplifying context switching.

Core Features & Use Cases

  • Safe directory discovery: prioritizes existing local worktree directories, honors CLAUDE.md preferences, and validates ignore rules before creation.
  • Automatic project context: detects the repository name and crafts the correct worktree path for predictable isolation.
  • Flexible workflow: supports project-local and global locations, with automatic setup steps to bootstrap the new worktree.

Quick Start

Create an isolated git worktree for a new feature branch in the repository.

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, this skill auto-detects your project name, selects a safe directory path by honoring existing local folders and CLAUDE.md preferences, and runs setup steps to bootstrap a clean baseline.

What is the best way to prevent interference with my main git branch during feature work?

Using a git worktree isolates your feature work from the main branch. This skill ensures safe isolation by validating gitignore rules and prioritizing existing local worktree directories before creating the new workspace.

Does the git worktree creation process respect existing CLAUDE.md preferences?

Yes, the git worktree creation process consults CLAUDE.md when present. It uses these preferences alongside existing local folder prioritization to determine the correct worktree path for predictable isolation.

Can I use a global directory location instead of a project-local path for my git worktree?

Yes, you can use global locations for your git worktree. The workflow supports both project-local and global directory locations, automatically detecting the repository name to craft the correct path.

Why does my git worktree setup check gitignore rules before creation?

Git worktree setup checks gitignore rules to ensure the new worktree directory is safely ignored. This safety check prevents the isolated workspace from accidentally polluting your main repository tracking.

How do I bootstrap project setup steps automatically after creating a git worktree?

To bootstrap project setup steps automatically, this skill runs the required initialization actions immediately after creating the worktree in the selected path, preparing a clean baseline for feature development.