Git worktree操作を支援します。ブランチごとのworktree作成、worktree間の移動、worktreeの一覧表示・削除に使用します。「wtp」「worktree」「ブランチで作業」「別のブランチに切り替え」「並行開発」などの言及時にトリガーします。
/plugin marketplace add ei-sugimoto/ei-claude-code-plugins/plugin install ei-sugimoto-ei-claude-code-plugins@ei-sugimoto/ei-claude-code-pluginsThis skill is limited to using the following tools:
wtpはGit worktree操作を柔軟にサポートするCLIツールです。ブランチごとのworktree作成、worktree間の移動、worktreeの一覧表示・削除に使用します。
wtp add <branch>新しいworktreeを作成してブランチをチェックアウトします。
# 既存ブランチ用のworktreeを作成
wtp add feature/auth
# 新規ブランチでworktreeを作成
wtp add -b feature/new-feature
# 特定のコミットから新規ブランチでworktreeを作成
wtp add -b hotfix/urgent-fix origin/main
# リモートブランチからworktreeを作成
wtp add origin/feature/remote-branch
動作:
-bオプションで新規ブランチを作成wtp cd <branch>指定したブランチのworktreeディレクトリに移動します。
# 特定のworktreeに移動
wtp cd feature/new-feature
# mainブランチのworktreeに移動
wtp cd main
# メインworktree(リポジトリのルート)に戻る
wtp cd @
注意: シェルの制約上、wtp cdは直接ディレクトリを変更できません。以下のように使用してください:
cd $(wtp cd feature/new-feature)
# または
eval $(wtp cd feature/new-feature)
wtp list現在のworktree一覧を表示します。
wtp list
出力例:
/home/user/project main [main]
/home/user/project-feature feature [feature/new-feature]
wtp remove <branch>指定したブランチのworktreeを削除します。
# worktreeのみ削除
wtp remove feature/old-feature
# worktreeとブランチを同時削除
wtp remove --with-branch feature/done
注意: 未コミットの変更がある場合は警告が表示されます。
# 強制削除(未コミットの変更を無視)
wtp remove --force feature/old-feature
# worktreeとブランチを同時に削除(作業完了後のクリーンアップに便利)
wtp remove --with-branch feature/done
# 詳細表示
wtp list --verbose
プロジェクトルートに.wtp.ymlを配置すると、worktree作成時に自動でセットアップを実行できます。
defaults:
base_dir: "../worktrees" # worktree保存先
hooks:
post_create:
- type: copy
from: ".env"
to: ".env"
- type: command
command: "npm install"
活用例:
.envファイルの自動コピー並行開発時
長時間のビルド・テスト中
比較・参照時
# 1. 新機能の開発開始
wtp add feature/user-auth
# 2. 作業ディレクトリに移動
cd $(wtp cd feature/user-auth)
# 3. 開発作業...
# 4. 緊急のバグ修正が必要になった
wtp add hotfix/critical-bug
cd $(wtp cd hotfix/critical-bug)
# 5. バグ修正後、元の作業に戻る
cd $(wtp cd feature/user-auth)
# 6. 不要になったworktreeを削除
wtp remove hotfix/critical-bug
~/projects/
├── my-project/ # メインworktree (main/master)
├── my-project-feature-a/ # feature/a用worktree
├── my-project-feature-b/ # feature/b用worktree
└── my-project-hotfix/ # hotfix用worktree
fatal: 'feature/xxx' is already checked out at '/path/to/worktree'
原因: 同じブランチが別のworktreeでチェックアウトされている 解決:
# 既存のworktreeを確認
wtp list
# 該当worktreeを削除するか、別のブランチに切り替え
wtp remove feature/xxx
# worktree一覧を確認
git worktree list
# 壊れたworktree参照を修復
git worktree prune
# 強制削除
wtp remove --force <branch>
# または手動で削除
rm -rf /path/to/worktree
git worktree prune
wtpがインストールされているか確認
which wtp
Gitリポジトリ内にいるか確認
git rev-parse --git-dir
Git worktree機能が利用可能か確認
git worktree list
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.