init-worktree

Initialize a clean Git worktree with a new branch and stale cleanup.

3|1|Updated Jan 1, 2026
One-click install
npx skills add https://github.com/JacobPEvans/claude-code-plugins --skill init-worktree-jacobpevans
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: init-worktree
Source: https://github.com/JacobPEvans/claude-code-plugins/tree/main/git-workflows/skills/init-worktree
Command: npx skills add https://github.com/JacobPEvans/claude-code-plugins --skill init-worktree-jacobpevans

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill ensures that all development work is performed in an isolated and clean environment, preventing accidental modifications to the main branch and maintaining a clear separation between concurrent development tasks.

Core Features & Use Cases

  • Worktree Isolation: Creates a dedicated, clean directory for each new development task.
  • Branch Management: Automatically generates conventional branch names based on a provided description.
  • Stale Worktree Cleanup: Identifies and removes old or merged worktrees to keep the repository tidy.
  • Use Case: Before starting to implement a new feature, use this skill to set up a fresh worktree, ensuring your main branch remains untouched and your development is self-contained.

Quick Start

Initialize a clean worktree for a new feature by running the command /init-worktree with a description of your feature.

Frequently Asked Questions about init-worktree

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an isolated Git worktree for new feature development?

To create an isolated Git worktree, run the initialization command with a descriptive feature name. This sets up a dedicated directory and a new branch, ensuring your main branch remains untouched during development.

What is the best way to clean up stale Git worktrees in my repository?

Cleaning up stale Git worktrees is handled automatically during initialization. The process prunes old or merged worktrees to keep your repository tidy before creating a fresh, isolated development environment.

Why should I use Git worktrees instead of branching directly in the same directory?

Git worktrees provide directory-level isolation for concurrent development tasks. This prevents accidental modifications to the main branch and maintains a clear separation between multiple features.

Do I need to manually name my Git branch when setting up a worktree?

You do not need to manually name your Git branch. The worktree initialization automatically generates a conventional branch name based on the descriptive feature text you provide.

Can I maintain a linear Git history using isolated worktrees?

Yes, using isolated worktrees helps maintain a linear Git history. By creating a clean branch linked to the main branch for each task, you ensure structured and separated development environments.