一键导入
speckit-worktree-create
Spawn an isolated git worktree for a new or existing feature branch
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Spawn an isolated git worktree for a new or existing feature branch
用 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-worktree-create |
| description | Spawn an isolated git worktree for a new or existing feature branch |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"worktree:commands/speckit.worktree.create.md"} |
Spawn an isolated git worktree for a feature branch so you can work on multiple features in parallel without switching branches. Each worktree gets its own directory with a full working copy.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). The user may specify a branch name (e.g., "003-user-auth") or "current" to create a worktree for the current branch.
.specify/ directoryDetermine target branch: Identify which feature branch to create a worktree for:
Choose worktree location: Determine the worktree directory path:
.worktrees/{branch-name}/ relative to the repository root.worktrees/ directory does not exist, create it.worktrees/ to .gitignore if not already presentCreate the worktree: Execute the git worktree command:
git worktree add .worktrees/{branch-name} {branch-name}git worktree add .worktrees/{branch-name} -b {branch-name} origin/{branch-name}Verify spec artifacts: Check that the worktree has access to spec artifacts:
specs/{branch-name}/ directory exists in the worktreeReport: Output a summary:
# Worktree Created
| Field | Value |
|-------|-------|
| **Branch** | {branch-name} |
| **Worktree path** | .worktrees/{branch-name}/ |
| **Spec artifacts** | spec.md ✅, plan.md ✅, tasks.md ❌ |
## Next Steps
- `cd .worktrees/{branch-name}/` to work in the isolated worktree
- Run `/speckit.implement` inside the worktree to build the feature
- Run `/speckit.worktree.list` to see all active worktrees
- When done, run `/speckit.worktree.clean` to remove the worktree
.worktrees/ only.worktrees/ is ignored to prevent accidental commits