Help us improve
Share bugs, ideas, or general feedback.
From shiiman-git
gtr のインストールと .gtrconfig を設定する。「worktree セットアップ」「gtr 設定」「gtrconfig 設定」「.gtrconfig 作成」「gtr インストール」「worktree 設定」などで起動。
npx claudepluginhub shiiman/claude-code-plugins --plugin shiiman-gitHow this skill is triggered — by the user, by Claude, or both
Slash command
/shiiman-git:worktree-setupThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
gtr (git-worktree-runner) のインストール確認と .gtrconfig の生成・更新を行うスキル。
Creates isolated git worktrees for parallel development without disrupting the main workspace. Includes safety verification to prevent accidental commits of worktree contents.
Automates Git worktree creation for isolated feature branches, listing, removal, and status checks. Copies env files like .env/.nvmrc and runs npm/yarn/pnpm/bun install.
Creates p5.js generative art with seeded randomness, noise fields, and interactive parameter exploration. Use for algorithmic art, flow fields, or particle systems.
Share bugs, ideas, or general feedback.
gtr (git-worktree-runner) のインストール確認と .gtrconfig の生成・更新を行うスキル。 実行するたびにプロジェクトの現状に合わせて .gtrconfig を更新する。
$ARGUMENTS に --help が含まれる場合、以下を表示して終了:
/shiiman-git:worktree-setup - Worktree Setup
概要:
gtr のインストール確認と .gtrconfig の生成・更新を行う。
実行するたびにプロジェクトの現状に合わせて .gtrconfig を更新する。
使用方法:
/shiiman-git:worktree-setup [オプション]
オプション:
--help このヘルプを表示
git gtr --version
未インストール時の対応:
インストール手順を案内して処理を終了する。
gtr がインストールされていません。以下の手順でインストールしてください:
## インストール方法
# Homebrew(推奨)
brew install coderabbitai/gtr/git-gtr
# または手動インストール
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
# 確認
git gtr --version
パッケージファイルからプロジェクトタイプを自動検出する。
# Node.js
[ -f "package.json" ] && PROJECT_TYPE="nodejs"
# Python
[ -f "pyproject.toml" ] || [ -f "requirements.txt" ] && PROJECT_TYPE="python"
# Go
[ -f "go.mod" ] && PROJECT_TYPE="go"
# Rust
[ -f "Cargo.toml" ] && PROJECT_TYPE="rust"
# PHP
[ -f "composer.json" ] && PROJECT_TYPE="php"
# その他
PROJECT_TYPE="generic"
既存の .gtrconfig があれば読み込む:
cat .gtrconfig 2>/dev/null
プロジェクトタイプに応じたテンプレートをベースに生成する。 既存設定がある場合は差分を提示してユーザーに確認する。
[copy]
include = **/.env.example
include = **/.nvmrc
include = **/tsconfig.json
include = **/.prettierrc
include = **/.eslintrc*
exclude = **/.env
exclude = **/.env.local
excludeDirs = node_modules
excludeDirs = dist
excludeDirs = .next
excludeDirs = build
[hooks]
postCreate = npm install
[defaults]
editor = cursor
ai = claude
[copy]
include = **/.env.example
include = **/pyproject.toml
include = **/requirements*.txt
include = **/.python-version
exclude = **/.env
exclude = **/.env.local
excludeDirs = .venv
excludeDirs = venv
excludeDirs = __pycache__
excludeDirs = .mypy_cache
excludeDirs = .pytest_cache
excludeDirs = *.egg-info
[hooks]
postCreate = pip install -e ".[dev]"
[defaults]
editor = cursor
ai = claude
[copy]
include = **/.env.example
include = **/go.mod
include = **/go.sum
exclude = **/.env
exclude = **/.env.local
excludeDirs = vendor
excludeDirs = bin
[hooks]
postCreate = go mod download
[defaults]
editor = cursor
ai = claude
[copy]
include = **/.env.example
include = **/Cargo.toml
include = **/Cargo.lock
exclude = **/.env
exclude = **/.env.local
excludeDirs = target
excludeDirs = .cargo
[hooks]
postCreate = cargo fetch
[defaults]
editor = cursor
ai = claude
[copy]
include = **/.env.example
include = **/composer.json
include = **/composer.lock
exclude = **/.env
exclude = **/.env.local
excludeDirs = vendor
[hooks]
postCreate = composer install
[defaults]
editor = cursor
ai = claude
[copy]
include = **/.env.example
exclude = **/.env
exclude = **/.env.local
[hooks]
postCreate = echo "Worktree created successfully"
[defaults]
editor = cursor
ai = claude
初回の場合はそのまま生成する。 既存ファイルがある場合はバックアップを作成し、差分を表示してユーザー確認後に更新する。
# バックアップ(既存ファイルがある場合)
[ -f .gtrconfig ] && cp .gtrconfig .gtrconfig.backup
## .gtrconfig を更新しました
プロジェクトタイプ: {PROJECT_TYPE}
{変更内容の差分 or 生成された内容}
### 次のステップ
- worktree を作成: `/shiiman-git:worktree`
worktree 作成時にコピーするファイルのルールを定義する。
| 設定項目 | 説明 | 例 |
|---|---|---|
include | コピーする glob パターン | **/.env.example |
exclude | 除外する glob パターン | **/.env |
includeDirs | コピーするディレクトリ | node_modules |
excludeDirs | 除外するディレクトリ | node_modules/.cache |
worktree ライフサイクルで自動実行するコマンドを定義する。
| フック名 | 説明 | 例 |
|---|---|---|
postCreate | worktree 作成後 | npm install |
preRemove | worktree 削除前(失敗時中断) | npm run clean |
postRemove | worktree 削除後 | echo "removed" |
デフォルトのエディタと AI ツールを定義する。
| 設定項目 | 説明 | 例 |
|---|---|---|
editor | デフォルトエディタ | cursor, code, vim |
ai | デフォルト AI ツール | claude, other |
worktree - gtr で worktree を管理