fotoetienne

Setup Worktree — Git skill for Claude Code

Git community

Create a git worktree for working on a GitHub issue.

How to install Setup Worktree

Installs to ~/.claude/commands/fotoetienne-gru-setup-worktree.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/fotoetienne/gru/HEAD/.claude/commands/setup-worktree.md -o ~/.claude/commands/fotoetienne-gru-setup-worktree.md

Restart Claude Code, or start a new session, for it to be picked up.

What Setup Worktree does


description: Create a git worktree for working on a GitHub issue allowed-tools: Bash(gh:*), Bash(git:*), Read, Glob argument-hint: ""

Create a git worktree using Gru's filesystem structure for working on an issue.

**Issue:** $ARGUMENTS

Steps

1. Fetch Issue Details

  • Use gh issue view $ARGUMENTS to get the issue title and number
  • Extract the issue number for naming the branch and worktree

2. Determine Repository Info

  • Get the repository owner and name fr

Alternatives in Git

Full documentation available on GitHub

View Source Repository