gh-issue-worktree

Create isolated Git worktrees per GitHub issue using gh issue develop.

5|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/gabrielkoerich/skills --skill gh-issue-worktree
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gh-issue-worktree
Source: https://github.com/gabrielkoerich/skills/tree/main/gh-issue-worktree
Command: npx skills add https://github.com/gabrielkoerich/skills --skill gh-issue-worktree

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage isolated Git worktrees per GitHub issue by leveraging git worktrees, enabling per-issue development environments that keep the main workspace clean and permit rapid context switching.

Core Features & Use Cases

  • Per-issue isolation: Create a separate worktree for each issue to ensure clean, task-specific contexts.
  • Linked branches via gh issue develop: Seamlessly associate an issue with a dedicated branch and automatically set up a worktree.
  • Lifecycle guidance: Provides naming conventions, lifecycle steps, and cleanup procedures to prevent orphaned worktrees.

Quick Start

Start a per-issue worktree by linking an issue and then creating a dedicated worktree path for development.

Frequently Asked Questions about gh-issue-worktree

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

FAQPage Schema
How do I create a Git worktree for a specific GitHub issue?

To create a Git worktree per GitHub issue, you link the issue to a dedicated branch using the gh issue develop command and set up an isolated worktree path for development, ensuring clean context separation.

What is the benefit of using Git worktrees for issue-based development?

Git worktrees provide per-issue isolation by creating separate development environments. This allows rapid context switching between concurrent issues while keeping the main workspace clean and preventing branch conflicts.

Do I need the GitHub CLI to manage per-issue worktrees?

Yes, managing per-issue worktrees requires Git, the GitHub CLI (gh), and a configured repository origin. The gh CLI enables the linked branches via the gh issue develop command to associate issues with dedicated branches.

What's the best way to handle worktree cleanup for closed GitHub issues?

Worktree cleanup for closed GitHub issues involves following lifecycle steps and naming conventions to remove isolated worktrees, preventing orphaned worktree directories and maintaining a clean local repository state.

Can I use this worktree workflow for projects with multiple concurrent GitHub issues?

Yes, this workflow is designed for projects with multiple concurrent issues. It enables per-issue branches, linked pull requests, and clean context separation by managing isolated Git worktrees for each active issue.

Why should I isolate development environments per GitHub branch instead of switching branches in place?

Isolating development environments per GitHub branch with worktrees prevents context switching overhead. It keeps task-specific contexts separate, avoids stashing changes, and allows rapid switching between concurrent issue branches without disrupting the main workspace.