gtr-workflow
Git Worktree Runner (gtr) workflow guidance for parallel development with Claude Code. Use when the user asks about git worktrees, parallel AI development, running multiple Claude sessions, managing worktrees with gtr, or setting up isolated development environments for feature work.
Best use case
gtr-workflow is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Git Worktree Runner (gtr) workflow guidance for parallel development with Claude Code. Use when the user asks about git worktrees, parallel AI development, running multiple Claude sessions, managing worktrees with gtr, or setting up isolated development environments for feature work.
Teams using gtr-workflow should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/gtr-workflow/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How gtr-workflow Compares
| Feature / Agent | gtr-workflow | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Git Worktree Runner (gtr) workflow guidance for parallel development with Claude Code. Use when the user asks about git worktrees, parallel AI development, running multiple Claude sessions, managing worktrees with gtr, or setting up isolated development environments for feature work.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
Cursor vs Codex for AI Workflows
Compare Cursor and Codex for AI coding workflows, repository assistance, debugging, refactoring, and reusable developer skills.
SKILL.md Source
# gtr (Git Worktree Runner) Workflow `git gtr` is a CLI tool that wraps `git worktree` with quality-of-life features for parallel AI-assisted development. ## Core Commands ```bash git gtr new <branch> # Create worktree git gtr editor <branch> # Open in editor (cursor/vscode/zed) git gtr ai <branch> # Start AI tool (claude/aider/codex) git gtr go <branch> # Print path (use: cd "$(git gtr go feature)") git gtr run <branch> <cmd> # Run command in worktree git gtr rm <branch> # Remove worktree git gtr list # List all worktrees git gtr copy <branch> -- <pattern> # Copy files to worktree ``` Special ID `1` references the main repo: `git gtr go 1`, `git gtr ai 1` ## Installation ```bash 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 ``` ## Initial Setup (per repository) ```bash cd ~/your-project git gtr config set gtr.editor.default cursor git gtr config set gtr.ai.default claude ``` ## ブランチの起点に注意(重要) `git gtr new <branch>` はデフォルトで `gtr.defaultBranch`(通常は `develop` や `main`)からブランチを作成する。 **featureブランチから派生させたい場合は必ず `--from-current` または `--from` を指定すること。** ```bash # 現在のブランチから作成(最もよく使う) git gtr new feature/child-branch --from-current # 特定のブランチから作成 git gtr new feature/child-branch --from feature/parent-branch # NG: featureブランチにいてもデフォルトではdevelopから作成されてしまう git gtr new feature/child-branch # → developベースになる! ``` ## Parallel Development Workflow ### Single Feature with Claude Code ```bash git gtr new feature-auth git gtr ai feature-auth # Claude Code runs in isolated worktree # Main repo remains untouched git gtr rm feature-auth # Cleanup when done ``` ### Multiple Parallel Claude Sessions ```bash # Terminal 1: API work git gtr new feature-api git gtr ai feature-api # Terminal 2: UI work git gtr new feature-ui git gtr ai feature-ui # Terminal 3: Tests git gtr new feature-tests git gtr ai feature-tests ``` Each session has isolated context - no stashing, no branch switching. ### Same Branch, Multiple Worktrees Use `--force` with `--name` for parallel work on the same feature: ```bash git gtr new feature-auth git gtr new feature-auth --force --name backend git gtr new feature-auth --force --name frontend # Creates: feature-auth/, feature-auth-backend/, feature-auth-frontend/ # All on same branch - coordinate commits carefully ``` ### PR Review While Working ```bash # Working on feature git gtr new my-feature git gtr ai my-feature # Need to review PR - create separate worktree git gtr new review-pr-123 --from origin/pr-branch git gtr editor review-pr-123 # Review without interrupting Claude session git gtr rm review-pr-123 ``` ## Configuration ### Team-Shared Config (.gtrconfig) Create `.gtrconfig` in repo root: ```ini [copy] include = **/.env.example include = **/CLAUDE.md exclude = **/.env [copy] includeDirs = node_modules excludeDirs = node_modules/.cache [hooks] postCreate = npm install [defaults] editor = vscode ai = claude ``` ### Copy Files to Worktrees ```bash # Add patterns to config git gtr config add gtr.copy.include "**/.env.example" git gtr config add gtr.copy.include "**/CLAUDE.md" # Copy node_modules to avoid npm install git gtr config add gtr.copy.includeDirs "node_modules" ``` ### Post-Create Hooks ```bash git gtr config add gtr.hook.postCreate "npm install" git gtr config add gtr.hook.postCreate "cp .env.example .env" ``` ## Branch Name Mapping Slashes and special characters become hyphens: - `feature/user-auth` → folder `feature-user-auth` - `fix/bug#123` → folder `fix-bug-123` ## Worktree作成前の確認 ### 1. `.gtrconfig` の確認 worktree作成前に、プロジェクトルートに `.gtrconfig` が存在するか確認する。 なければ以下の内容で作成し、コミットする: ```ini [copy] include = **/.env* include = **/CLAUDE.md [hooks] postCreate = npm install ``` これにより、worktree作成時に自動で `npm install` が実行される。 ### 2. ベースブランチの確認 現在のブランチが `develop` / `main` 以外(featureブランチ等)の場合、 worktree作成時に **必ず `--from-current`** を付けること。 付け忘れると `develop` ベースになり、featureブランチの変更が含まれない。 ```bash # featureブランチから派生する場合 git gtr new feature/child --from-current ``` ## Best Practices 1. **One worktree per task** - Keep Claude sessions focused 2. **Copy CLAUDE.md** - Include project context in each worktree 3. **Use hooks** - Automate dependency installation 4. **Clean up regularly** - `git gtr rm` when PRs merge 5. **Use `git gtr list`** - Track active worktrees ## Troubleshooting ```bash git gtr doctor # Health check git gtr adapter # List available editors/AI tools git gtr clean # Remove stale worktrees git gtr clean --merged # Remove worktrees for merged PRs (requires gh CLI) ```
Related Skills
pull-request
プルリクエスト作成。コミット済みの変更内容を分析し、簡潔でわかりやすいPR内容を自動生成。 「PRを作成して」「プルリクエストを作って」「PRお願い」などのリクエストで発動。
issue-create
雑な要件や思考メモからGitHub Issueを生成するスキル。 「Issueを作成して」「Issueを作って」「Issue起票して」「これをIssueにして」などのリクエストで発動。 テキスト入力や添付ファイルから要件を抽出し、構造化されたIssueを作成する。 記載されていない仕様は推測せず、不明点はユーザーに質問する。
dev-plan
GitHub Issue群からClaude Code並列開発用の実行プロンプト集(docs/prompts/xxx.md)を自動生成するスキル。 「開発計画を作成して」「実行プロンプトを生成して」「dev-planを作って」「プロンプト集を作って」 「並列開発の計画を立てて」などのリクエストで発動。 Issue番号リストを受け取り、依存関係のWave構造を対話で決定し、 /gtr-workflow → 実装 → /e2e-test → /pull-request の一連の指示を各Issueごとに生成する。
repo-defining-workflows
Workflow pattern standards for creating multi-agent orchestrations including YAML frontmatter (name, goal, termination, inputs, outputs), execution phases (sequential/parallel/conditional), agent coordination patterns, and Gherkin success criteria. Essential for defining reusable, validated workflow processes.
git-workflow
Git operations and pull request workflows. Create PRs, rebase branches, resolve conflicts, merge to upstream. Use when ready to create PR or when working with git branches and upstream.
git-workflow-helper
Automates git workflow tasks including status checks, branch creation, file staging, conventional commit message generation, and pull request creation with gh CLI. Use this skill when you need to commit changes, create PRs, check git status, create branches, push code, or generate commit messages. Ensures proper git workflow and commit standards.
branchless-workflow
Git-branchless stacked diffs workflow patterns and command reference
github-pr-workflow
Full pull request lifecycle — create branches, commit changes, open PRs, monitor CI status, auto-fix failures, and merge. Works with gh CLI or falls back to git + GitHub REST API via curl.
workflow-core
Canonical repository workflow contract for all runtimes.
boilerplate-workflow
Minimal Codex adapter for this repository.
securing-github-actions-workflows
本技能涵盖加固 GitHub Actions 工作流以防范供应链攻击、凭据盗窃和权限提升。 内容包括将 action 固定到 SHA 摘要、最小化 GITHUB_TOKEN 权限、防止机密泄露、 防止工作流表达式中的脚本注入,以及为工作流变更实施必要的审阅者机制。
implementing-patch-management-workflow
补丁管理(Patch Management)是识别、测试、部署和验证软件更新以修复组织 IT 基础设施漏洞的系统化流程。有效的补丁管理工作流通过结构化测试、审批门禁和分阶段发布,在降低攻击面的同时将运营中断降至最低。