Git Worktree

This skill manages Git worktrees for isolated parallel development. It handles creating, listing, switching, and cleaning up worktrees with a simple interactive interface, following KISS principles.

59 stars 10 forksGit & Code Review

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add ratacat/claude-skills --skill git-worktree
Manual install
git clone --depth 1 https://github.com/ratacat/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/skills/git-worktree ~/.claude/skills/git-worktree

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Git Worktree Manager

This skill provides a unified interface for managing Git worktrees across your development workflow. Whether you're reviewing PRs in isolation or working on features in parallel, this skill handles all the complexity.

## What This Skill Does

- **Create worktrees** from main branch with clear branch names
- **List worktrees** with current status
- **Switch between worktrees** for parallel work
- **Clean up completed worktrees** automatically
- **Interactive confirmations** at each step
- **Automatic .gitignore management** for worktree directory
- **Automatic .env file copying** from main repo to new worktrees

## CRITICAL: Always Use the Manager Script

**NEVER call `git worktree add` directly.** Always use the `worktree-manager.sh` script.

The script handles critical setup that raw git commands don't:
1. Copies `.env`, `.env.local`, `.env.test`, etc. from main repo
2. Ensures `.worktrees` is in `.gitignore`
3. Creates consistent directory structure

```bash
# ✅ CORRECT - Always use the script
bash ${CLAUDE_PLUGIN_ROOT}/skills/git-worktree/scripts/worktree-manager.sh create feature-name

# ❌ WRONG - Never do this directly
git worktree add .worktrees/feature-name -b feature-name main
```

## When to Use This Skill

Use this skill in these scenarios:

1. **Code Review (`/workflows:review`)**: If NOT already on the target branch (PR branch or requested branch), offer worktree for isolated review
Read the full skill on GitHub

Details

Skill name
git-worktree
Path
skills/git-worktree/SKILL.md
Repo updated
11 February 2026

FAQ

What does the Git Worktree skill do?

This skill manages Git worktrees for isolated parallel development. It handles creating, listing, switching, and cleaning up worktrees with a simple interactive interface, following KISS principles.

How do I install the Git Worktree skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add ratacat/claude-skills --skill git-worktree. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Git Worktree popular?

It lives in ratacat/claude-skills, which has 59 GitHub stars and 10 forks.

Related skills

Skill Creator

59

ratacat/claude-skills

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Codex's capabilities with specialized knowledge, workflows, or tool integrations.

Skill & Plugin Authoring10

Skill Installer

59

ratacat/claude-skills

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

Software Development10

Agent Browser

59

ratacat/claude-skills

Browser automation using Vercel's agent-browser CLI. Use when you need to interact with web pages, fill forms, take screenshots, or scrape data. Alternative to Playwright MCP - uses Bash commands with ref-based element selection. Triggers on "browse website", "fill form", "click button", "take screenshot", "scrape page", "web automation".

AI, LLMs & Agents10

PR Comment Resolver

59

ratacat/claude-skills

Use this agent when you need to address comments on pull requests or code reviews by making the requested changes and reporting back on the resolution. This agent handles the full workflow of understanding the comment, implementing the fix, and providing a clear summary of what was done. <example>Context: A reviewer has left a comment on a pull request asking for a specific change to be made.user: "The reviewer commented that we should add error handling to the payment processing method"assistant: "I'll use the pr-comment-resolver agent to address this comment by implementing the error handlin

Git & Code Review10

Git History Analyzer

59

ratacat/claude-skills

Use this agent when you need to understand the historical context and evolution of code changes, trace the origins of specific code patterns, identify key contributors and their expertise areas, or analyze patterns in commit history. This agent excels at archaeological analysis of git repositories to provide insights about code evolution and development patterns. <example>Context: The user wants to understand the history and evolution of recently modified files.\ user: "I've just refactored the authentication module. Can you analyze the historical context?"\ assistant: "I'll use the git-histor

Git & Code Review10

Shepherd

49

robinebers/skills

Shepherd a GitHub pull request all the way to merge-ready by relentlessly polling status and only acting once all automatic reviewers have finished. NEVER merges without explicit human approval. Use when the user says things like "shepherd this PR", "babysit this PR", "get this PR merge-ready", "wait for Cubic", "wait for Bugbot", or asks to drive a PR through review.

Git & Code Review

Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.