worktree
Create and manage isolated git worktrees with dedicated app containers and databases. Non-interfering parallel development environments.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create and manage isolated git worktrees with dedicated app containers and databases. Non-interfering parallel development environments.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | worktree |
| description | Create and manage isolated git worktrees with dedicated app containers and databases. Non-interfering parallel development environments. |
| allowed-tools | Bash(.claude/skills/worktree/*), Bash(docker compose *), Bash(git worktree *) |
Create fully isolated development environments with their own app containers, databases, and ports.
$CLAUDE_PROJECT_DIR/.claude/skills/worktree/create.sh <branch-name> [base-branch]
branch-name: Name of the new git branch (required)base-branch: Branch or commit to base from (default: HEAD)Creates:
.claude/worktrees/<branch-slug>/bin/setup$CLAUDE_PROJECT_DIR/.claude/skills/worktree/cleanup.sh <worktree-slug> [--delete-branch]
worktree-slug: Directory name under .claude/worktrees/ (required)--delete-branch: Also delete the git branch (optional)Removes the Docker Compose stack (containers + volumes), the git worktree, and optionally the branch.
The devcontainer skill (detect.sh) auto-detects isolated worktree stacks. When you cd into an isolated worktree and run commands via the devcontainer skill, they execute in the worktree's own container.
# Create isolated worktree for a feature
.claude/skills/worktree/create.sh feature/new-search main
# Work in it
cd .claude/worktrees/feature-new-search
.claude/skills/devcontainer/run.sh "bin/rails test"
# Clean up when done
.claude/skills/worktree/cleanup.sh feature-new-search --delete-branch