git-worktree-setup

Automate git worktree creation, management, and cleanup for multi-branch workflows.

7|3|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/cskiro/annex --skill git-worktree-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree-setup
Source: https://github.com/cskiro/annex/tree/main/skills/git-worktree-setup
Command: npx skills add https://github.com/cskiro/annex --skill git-worktree-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates creating and managing Git worktrees for Claude Code sessions, including prerequisite checks, development environment setup, and safe cleanup. It supports single worktrees, batch creation, and comprehensive cleanup workflows.

Core Features & Use Cases

  • Prerequisite checks: repository presence, clean state, branch existence
  • Flexible modes: single, batch, and cleanup workflows
  • Dev environment setup: automatic package manager detection and install
  • Safe cleanup: confirm before removal and verify state

Quick Start

  • Trigger: "create a worktree for [branch]"
  • Example: "set up worktree for feature-auth"

Frequently Asked Questions about git-worktree-setup

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

FAQPage Schema
How do I automate creating Git worktrees for parallel development?

Git worktree automation creates isolated branch checkouts in a single repository, enabling parallel work across multiple branches without switching. This Skill handles prerequisite checks, environment setup, and safe cleanup to streamline multi-branch workflows in Claude Code sessions.

Can I set up multiple worktrees at once?

Yes, batch worktree creation is supported alongside single worktree modes. The Skill detects your package manager and configures each environment automatically, then verifies state before returning control.

What checks does the Skill run before creating a worktree?

Prerequisite checks verify repository presence, confirm the working directory is clean, and validate that the target branch exists. These gates prevent invalid worktree creation and ensure safe state before proceeding.

How does environment setup work across different projects?

The Skill auto-detects your package manager during setup and installs dependencies for each worktree environment. This eliminates manual configuration and ensures consistent dev environments across parallel branches.

What happens when I clean up worktrees?

Safe cleanup confirms removal before deleting worktrees and verifies final state to prevent accidental data loss. The Skill also supports listing all active worktrees to track parallel sessions.