worktree-management

Create, review, and prune Git worktrees for pull request workflows.

56|20|Updated Aug 26, 2022
One-click install
npx skills add https://github.com/SocketDev/socket-sdk-js --skill worktree-management-socketdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: worktree-management
Source: https://github.com/SocketDev/socket-sdk-js/tree/main/.claude/skills/worktree-management
Command: npx skills add https://github.com/SocketDev/socket-sdk-js --skill worktree-management-socketdev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the hassle of managing multiple Git worktrees, enabling users to create, review, and prune worktrees efficiently to support parallel development and code review workflows.

Core Features & Use Cases

  • Create isolated worktrees for new development or testing without affecting the main repository.
  • Fan out open pull requests into separate worktrees for easy local review by multiple Claude sessions.
  • Prune stale worktrees linked to deleted branches after merges or upstream branch deletions. These functions facilitate a safer, cleaner, and more efficient multi-branch and multi-PR review process in collaborative development.

Quick Start

Use the worktree-management skill to spawn a new worktree named 'feature-x' for your current repository.

Frequently Asked Questions about worktree-management

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

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

Git worktree management automates creating isolated worktrees for new development or testing without affecting the main repository. This Skill streamlines the process by handling setup, review configurations, and cleanup to support safer multi-branch workflows.

What is the best way to review multiple pull requests locally at the same time?

Reviewing multiple pull requests locally is handled by fanning out open PRs into separate worktrees. This allows multiple development sessions to review code in parallel, ensuring a clean project state and reducing manual branch management tasks.

Do I need the GitHub CLI to automate worktree creation?

Yes, automating worktree creation and review setup requires Git commands and GitHub CLI tools. These dependencies are necessary to interact with remote repositories, manage branches, and fetch open pull requests.

How do I clean up stale Git worktrees after a branch is merged?

Cleaning up stale Git worktrees after merges or upstream branch deletions is automated by pruning linked worktrees. This ensures your repository remains clean and removes manual management tasks after pull requests are resolved.

Can I isolate testing environments without affecting my main Git repository?

Yes, you can create isolated worktrees for testing without affecting the main Git repository. This Skill automates the isolation process so developers can run parallel workflows safely across different branches without conflicts.