Skills

GIT Worktree Runner

Manages git worktrees using git-worktree-runner (gtr).

Install

npx skills add dyoshikawa/rulesync --skill git-worktree-runner -g -a claude-code -y
Repository
dyoshikawa/rulesync1.6k
Category
Git and review
Updated
3d ago
License
MIT
Context cost
Lightabout 1,188 tokens
Runs scripts
No, instructions only

What it does

Manages git worktrees using git-worktree-runner (gtr). Use when the user needs to create, list, remove, or navigate worktrees with `git gtr` commands, open editors or AI tools in worktrees, manage parallel development branches, or check out GitHub PRs (including from forks) into worktrees.

Git Worktree Runner (gtr)

git-worktree-runner (gtr) is a CLI tool that wraps git worktree with quality-of-life features for modern development workflows including editor and AI tool integration.

Quick Start

# Create a new worktree
git gtr new feature-branch

# Create from a remote branch
git gtr new my-branch --from origin/feature-branch

# Open editor in the worktree
git gtr editor feature-branch

# Start AI tool (claude, codex, etc.) in the worktree
git gtr ai feature-branch

# Remove a worktree
git gtr rm feature-branch

Commands

Creating Worktrees

# Create a new worktree with a new branch
git gtr new feature-name

# Create from a specific ref (remote branch, tag, commit)
git gtr new my-branch --from origin/main
git gtr new hotfix --from v1.2.3

# Create and immediately open in editor
git gtr new feature -e

# Create and immediately start AI tool
git gtr new feature -a

# Create with both editor and AI tool
git gtr new feature -e -a

Opening Editor / AI Tool

# Open the configured editor for a worktree
git gtr editor feature-branch

# Start configured AI tool in a worktree
git gtr ai feature-branch

Running Commands

# Run an arbitrary command in a worktree
git gtr run feature-branch npm test
git gtr run feature-branch pnpm build

Navigation

# Navigate to a worktree directory
cd "$(git gtr go feature-branch)"

Listing and Managing

# List all worktrees
git gtr list

# Remove a worktree
git gtr rm feature-branch

# Rename a worktree
git gtr mv old-name new-name

Configuration

# Set default editor (cursor, vscode, zed, etc.)
git gtr config set gtr.editor.default cursor

# Set default AI tool (claude, codex, opencode, aider, etc.)
git gtr config set gtr.ai.default claude
Read the whole SKILL.md on GitHub

More in Git and review