This skill should be used when the user invokes /gtr:* commands to manage git worktrees using git-worktree-runner (gtr). Enables parallel branch development through worktree creation, editor/AI integration, and lifecycle management.
Manages parallel git worktrees for multi-branch development using git-worktree-runner.
/plugin marketplace add vampik33/claude-plugins/plugin install vampik33-gtr-plugins-gtr@vampik33/claude-pluginsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/commands.mdThis skill provides workflows for managing git worktrees using the git gtr CLI tool. Git worktrees enable working on multiple branches simultaneously in separate directories without stashing changes or switching branches.
To check if gtr is installed:
git gtr --version
If not installed, guide user through installation:
git clone https://github.com/coderabbitai/git-worktree-runner.git
cd git-worktree-runner
sudo ln -s "$(pwd)/bin/git-gtr" /usr/local/bin/git-gtr
Full lifecycle for feature development:
# 1. Create worktree for new feature
git gtr new feature-name
# 2. Open in editor (uses configured default)
git gtr editor feature-name
# 3. Launch AI tool in worktree (see note about nested Claude)
git gtr ai feature-name
# 4. Run commands in worktree
git gtr run feature-name npm test
git gtr run feature-name npm run build
# 5. When done, remove worktree
git gtr rm feature-name
For quick context switching between branches:
# List existing worktrees
git gtr list
# Create worktree from existing branch
git gtr new existing-branch
# Navigate to worktree (prints path - use quotes for spaces)
cd "$(git gtr go branch-name)"
# Or run commands directly
git gtr run branch-name git status
For different aspects of the same feature:
git gtr new feature --force --name frontend
git gtr new feature --force --name backend
For automation scenarios:
git gtr new ci-test --yes --no-copy
git gtr rm ci-test --yes --delete-branch
| Command | Description |
|---|---|
git gtr new <branch> | Create new worktree |
git gtr list | List all worktrees |
git gtr editor <branch> | Open worktree in editor |
git gtr ai <branch> | Launch AI tool in worktree |
git gtr run <branch> <cmd> | Execute command in worktree |
git gtr go <branch> | Print worktree path |
git gtr rm <branch> | Remove worktree |
git gtr copy <target> | Sync files to worktree(s) |
git gtr config | Manage configuration |
Key settings via git gtr config set:
# Set default editor (cursor, vscode, zed)
git gtr config set gtr.editor.default cursor
# Set default AI tool (claude, aider, codex, continue, cursor)
git gtr config set gtr.ai.default claude
# Set worktrees directory
git gtr config set gtr.worktrees.dir ~/worktrees
# Set files to auto-copy on worktree creation
git gtr config set gtr.copy.include ".env*,*.local"
Hooks run at worktree lifecycle events and receive environment variables:
REPO_ROOT - Repository root pathWORKTREE_PATH - Worktree directory locationBRANCH - Branch nameConfigure hooks:
git gtr config set gtr.hook.postCreate "npm install"
git gtr config set gtr.hook.preRemove "npm run clean"
git gtr config set gtr.hook.postRemove "echo 'Cleaned up'"
Copy files to worktrees:
# Copy specific patterns to one worktree (note the -- separator)
git gtr copy feature -- ".env*" "*.json"
# Copy to all worktrees
git gtr copy -a -- ".env*"
For detailed command options and configuration, see references/commands.md.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.