원클릭으로
speckit-worktrees-create
Spawn an isolated git worktree for a feature branch (default-on, configurable layout)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Spawn an isolated git worktree for a feature branch (default-on, configurable layout)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Think before building. Use when the user asks to reason about, analyze, evaluate, compare options, make an architecture decision, choose between approaches, think through a problem, or assess trade-offs. Also use when the user asks 'why did we...', 'should we...', 'what are our options', 'is this the right approach', or wants to frame/reframe a problem.
Archive a feature specification into main project memory after merge, resolving gaps and conflicts
Generate spec-kit configuration tailored to the existing codebase
Incrementally adopt SDD for existing features with reverse-engineered specs
Auto-discover project structure, tech stack, frameworks, and architecture patterns
Verify bootstrap output matches actual project structure and conventions
| name | speckit-worktrees-create |
| description | Spawn an isolated git worktree for a feature branch (default-on, configurable layout) |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"worktrees:commands/speckit.worktrees.create.md"} |
Spawn an isolated git worktree for a feature branch so you can work on multiple features — or run multiple agents — in parallel without switching branches.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). The user may specify:
005-user-auth)current to create a worktree for the current branch--in-place or --no-worktree to skip worktree creation entirelygit rev-parse --show-toplevel)git worktree is available (git worktree list succeeds)Read configuration from .specify/extensions/worktrees/worktree-config.yml if it exists. Defaults apply when the file is absent.
| Key | Default | Description |
|---|---|---|
layout | sibling | sibling — worktree at ../<repo>--<branch> (IDE-friendly); nested — at .worktrees/<branch>/ inside repo |
auto_create | true | When true, the after_specify hook creates a worktree without prompting |
sibling_pattern | {{repo}}--{{branch}} | Name pattern for sibling directories |
dotworktrees_dir | .worktrees | Subdirectory name for nested layout |
Environment variable SPECIFY_WORKTREE_PATH overrides the computed path entirely.
Determine target branch:
current, use the output of git branch --show-currentafter_specify hook call, use the branch that /speckit.specify just created (read from SPECIFY_FEATURE env var or the most recent feature branch)Invoke the script: Run the deterministic bash script shipped with this extension:
bash "$(dirname "$0")/../scripts/bash/create-worktree.sh" \
--json \
[--layout sibling|nested] \
[--path <override>] \
[--in-place] \
[--dry-run] \
"$BRANCH_NAME"
The script reads worktree-config.yml automatically and outputs JSON:
{"branch":"005-user-auth","worktree":true,"path":"/Users/me/code/MyProject--005-user-auth","layout":"sibling"}
If the script is unavailable (e.g., non-bash environment), perform the equivalent operations directly:
git worktree add -b <branch> <path> <base-ref> (new branch) or git worktree add <path> <branch> (existing branch).worktrees/ is in .gitignoreVerify spec artifacts: Check that specs/<branch>/ exists in the new worktree. List which artifacts are present (spec.md, plan.md, tasks.md).
Report: Output a summary:
## Worktree Created
| Field | Value |
|-------|-------|
| **Branch** | 005-user-auth |
| **Layout** | sibling |
| **Worktree path** | /Users/me/code/MyProject--005-user-auth |
| **Spec artifacts** | spec.md, plan.md |
**Next steps:**
- Open the worktree directory in your IDE or a new terminal
- Run `/speckit.implement` from the worktree root
- Run `/speckit.worktrees.list` to see all active worktrees
--in-place or --no-worktree, or auto_create is false in config and this is a hook calldotworktrees_dir value if not presentafter_specify hook should have already created the branch via the git extension