using-git-worktrees
並行開発のための分離された Git ワークスペースの作成
こちらからも入手できます: Cycleaddict,obra,davila7,Doyajin174,DYAI2025,Cygnusfear,CodingCossack
Git worktree を使用すると、コンテキストスイッチングなしで複数のブランチで同時に作業できます。このスキルは、信頼性の高いワークスペース分離のための体系的なディレクトリ選択と安全性検証を提供します。
スキルZIPをダウンロード
Claudeでアップロード
設定 → 機能 → スキル → スキルをアップロードへ移動
オンにして利用開始
テストする
「using-git-worktrees」を使用しています。 Create worktree for feature/auth branch
期待される結果:
Worktree ready at /Users/jesse/myproject/.worktrees/auth
Tests passing (47 tests, 0 failures)
Ready to implement auth feature
「using-git-worktrees」を使用しています。 Set up isolated workspace for code review
期待される結果:
Found existing .worktrees/ directory (git-ignored)
Created worktree: git worktree add .worktrees/review-pr123 -b review/pr-123
Dependencies installed (npm install)
Baseline verified: 52 tests passing
セキュリティ監査
安全Static analyzer flagged 42 patterns but all are false positives. The skill is documentation-only (markdown file) containing bash command examples for teaching git worktrees. No executable code exists - all flagged patterns are code blocks in instructional content. External commands are git/bash examples, filesystem references are documentation paths, and crypto warnings are spurious.
リスク要因
⚙️ 外部コマンド (26)
品質スコア
作れるもの
機能開発の分離
メインの開発ブランチに影響を与えずに、新しい機能作業のための分離されたワークスペースを作成
コードレビュー準備
現在の作業状態に影響を与えることなく、プルリクエストのレビューのためのクリーンな worktree を設定
バグ修正の並列化
機能作業を継続しながら、緊急のホットフィックスのための分離された環境を迅速に立ち上げ
これらのプロンプトを試す
Create a new git worktree for feature branch 'feature/user-auth' using the standard directory selection process
Set up a worktree for 'hotfix/login-bug' in ~/.config/superpowers/worktrees/myproject/ for global access
Create worktree for 'feature/api-v2', verify it is properly ignored, run project setup, and confirm tests pass before I begin implementation
Check if worktree 'feature/payment-integration' already exists in .worktrees/, and if so switch to it instead of creating a new one
ベストプラクティス
- 誤ったコミットを防ぐために、worktree ディレクトリが git-ignored されていることを常に確認
- 新たなバグと既存の問題を区別するために、worktree 作成直後にベースラインテストを実行
- 既存のディレクトリ、次に CLAUDE.md 設定、そしてユーザーへの確認というディレクトリ優先順位に従う
回避
- git-ignore 状態を検証せずに worktree を作成すると、リポジトリの汚染を引き起こす
- ベースラインテストの検証をスキップすると、バグの原因特定が不可能になる
- ディレクトリパスのハードコーディングは、プロジェクトの規約とチームのワークフローに違反する