git-worktree

Manages Git worktrees for creation, listing, switching, cleanup, copying env files, updating .gitignore, and integrating with Claude Code commands.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/adamfeldman/compound-workflows --skill git-worktree-adamfeldman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-worktree
Source: https://github.com/adamfeldman/compound-workflows/tree/main/plugins/compound-workflows/skills/git-worktree
Command: npx skills add https://github.com/adamfeldman/compound-workflows --skill git-worktree-adamfeldman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the management of Git worktrees, providing a unified and safe interface for creating, listing, switching, and cleaning them up, preventing common errors and ensuring a smooth development workflow.

Core Features & Use Cases

  • Create Worktrees: Safely create new worktrees from a specified branch, automatically copying environment files and updating .gitignore.
  • List & Switch: Easily view all worktrees and switch between them.
  • Cleanup: Intelligently remove inactive worktrees with confirmation.
  • Use Case: When reviewing a pull request, if you're not on the correct branch, this skill can create an isolated worktree for the PR, ensuring your main branch remains clean.

Quick Start

Use the git-worktree skill to create a new worktree for the branch named 'feature-login'.

Frequently Asked Questions about git-worktree

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

FAQPage Schema
How do I manage Git worktrees for parallel development?

Managing Git worktrees for parallel development involves creating isolated working directories from different branches. This skill automates worktree creation, listing, switching, and cleanup while safely copying environment files and updating .gitignore.

What is the best way to review a pull request without switching branches?

Reviewing a pull request without switching branches is done by creating an isolated Git worktree for the PR. This keeps your main branch clean while providing a dedicated directory to checkout and test the feature code.

How do I create a Git worktree and copy environment files automatically?

Creating a Git worktree with automatic environment file copying is handled by this skill's creation script. It safely sets up the new worktree from a specified branch and duplicates your environment files to ensure the parallel workspace is immediately ready.

Can I integrate Git worktree management with my existing code review workflow?

Integrating Git worktree management with existing code review workflows is supported through built-in commands. This skill works seamlessly with Claude Code commands like /do:review and /do:work for a unified parallel development experience.

How do I safely clean up inactive Git worktrees?

Safely cleaning up inactive Git worktrees is managed by this skill's intelligent cleanup script. It identifies unused worktrees and removes them only after receiving explicit confirmation, preventing accidental data loss.