worktree
git worktree操作(git-wt使用)- 一覧・作成・切替・削除を自在に実行する。ブランチ切替、並行作業、PRレビュー用チェックアウト、worktree管理に使用する。「別ブランチで作業したい」「worktreeを整理したい」「並行して作業したい」といった要求にも対応する。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
git worktree操作(git-wt使用)- 一覧・作成・切替・削除を自在に実行する。ブランチ切替、並行作業、PRレビュー用チェックアウト、worktree管理に使用する。「別ブランチで作業したい」「worktreeを整理したい」「並行して作業したい」といった要求にも対応する。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
WHEN: the user wants a critical review by the `code-critic` agent. The skill gathers the agent's required Invocation Contract inputs (review target, intent, layer), dispatches the agent via the Agent tool, and drives the **address-then-resubmit** loop until the agent returns an `Approved` verdict or the user explicitly defers what is left.
WHEN: PROACTIVELY when the change introduces or modifies design (new abstraction, new boundary, new module, contract change, security-sensitive interaction, refactor that reshapes responsibility). INPUT: File paths/directory + intent of the change. OUTPUT: Design-level critical issues — contract gaps, architectural misalignment, over-/under-engineered abstractions, security-designed-in failures, systemic problems hidden behind local fixes — with root causes and structural fixes. Implementation defects (logic bugs, races, resource leaks) are out of scope; route those to critic-implementation-review.
WHEN: PROACTIVELY when reviewing code that implements an already-settled design (bug fixes, feature implementation against an agreed shape, optimizations inside an existing module). INPUT: File paths/directory + the design contract being implemented. OUTPUT: Implementation-level critical defects — logic errors, race conditions, resource leaks, concrete security bugs, error-handling gaps, performance problems on real-sized inputs, contract drift between signature and behavior — with concrete fixes. Design-level concerns (abstraction quality, contract shape, architectural fit) are out of scope; route those to critic-design-review.
PRのライフサイクル全体をゲート付きで管理する。PR作成、レビュー対応、マージ、ポストマージまでの一連のワークフローを強制する。PRを作りたい、レビュー対応したい、マージしたい、といった場面で使用する。
OrbStack がホストの Docker runtime として常に利用可能である前提で、Docker Compose 開発環境にアクセスする方法。OrbStack 特有の自動 DNS・自動 port forwarding を活用し、dnsmasq や ports: 公開の手間を省く。Docker Compose 上の Rails/Node 等のサーバーにローカルからアクセスする場面、マルチテナントアプリのサブドメインルーティングを検証する場面で使用する。
Five Whys分析で問題の根本原因を特定し、本質的な解決策を導出する。問題の原因分析、根本原因の特定、なぜなぜ分析、トラブルシューティング、障害分析、インシデント振り返り、ポストモーテムなど、「なぜこの問題が起きたのか」を深掘りして解決策を考えたい場面で使用する。ユーザーが問題の原因について悩んでいたり、表面的な対処ではなく根本的な解決を求めている場合にも発動する。
| name | worktree |
| description | git worktree操作(git-wt使用)- 一覧・作成・切替・削除を自在に実行する。ブランチ切替、並行作業、PRレビュー用チェックアウト、worktree管理に使用する。「別ブランチで作業したい」「worktreeを整理したい」「並行して作業したい」といった要求にも対応する。 |
| user-invocable | true |
| allowed-tools | Bash(git:*) |
git-wtを使用してgit worktreeを効率的に操作する。
# 一覧表示
git wt
# 切替/作成(存在しなければ作成)
git wt <branch>
# 特定のcommit/branchから作成
git wt <branch> <start-point>
# 安全削除(マージ済みのみ)
git wt -d <branch>
# 強制削除
git wt -D <branch>
| フラグ | 用途 |
|---|---|
--copyignored | .gitignore対象ファイル(.env等)をコピー |
--copyuntracked | 未追跡ファイルをコピー |
--copymodified | 未コミット変更をコピー |
--hook "cmd" | 作成後にコマンド実行(npm install等) |
git wt
git status --short
新規作業開始:
git wt feat/new-feature
# または環境ファイル付き
git wt feat/new-feature --copyignored
PR/MRレビュー:
git fetch origin pull/<PR_NUMBER>/head:review-pr-<PR_NUMBER>
git wt review-pr-<PR_NUMBER>
作業終了・削除:
git wt -d <branch> # マージ済み確認後
<workspace root>/.wt 以下git wt --help を参照