Create git worktrees in .worktrees/ for working on different branches without touching current working directory. Use this when the user needs to switch to another branch for quick fixes or temporary work while preserving uncommitted changes in their current worktree.
This skill creates git worktrees in a standardized .worktrees/ directory structure, enabling work on multiple branches simultaneously without stashing or committing current changes. Each worktree is created in .worktrees/<branch-name> for easy organization and discovery.
Use this skill when the user needs to:
The skill uses a bash script (scripts/create_worktree.sh) that:
/ with -) for use as a directory namegit fetch --all to ensure remote branches are up-to-dateorigin or prompts user to select.worktrees/ directory if it doesn't exist.worktrees/<sanitized-branch-name>To create a worktree for a branch, run:
scripts/create_worktree.sh <branch-name>
Arguments:
<branch-name>: Name of the branch (can be local or remote)Examples:
# Create worktree for a local branch
scripts/create_worktree.sh feature/new-feature
# Create worktree for a remote branch
scripts/create_worktree.sh hotfix/urgent-fix
# Branch names with slashes are automatically sanitized
# Branch: user.name/AOF-123 → Worktree: .worktrees/user.name-AOF-123
scripts/create_worktree.sh user.name/AOF-123
The script will error if:
.worktrees/<branch-name>The script ensures Claude configuration is available in the worktree:
This ensures a consistent Claude setup across all worktrees.
All worktrees are created in the .worktrees/ directory at the repository root:
repo-root/
├── .worktrees/
│ ├── feature-branch/ # Worktree for feature-branch
│ ├── hotfix-123/ # Worktree for hotfix-123
│ ├── user.name-AOF-456/ # Worktree for user.name/AOF-456 (sanitized)
│ └── bugfix-fix-critical-issue/ # Worktree for bugfix/fix-critical-issue (sanitized)
├── .git/
└── [main working directory files]
This convention keeps all temporary worktrees organized and easy to find.
Note: Branch names containing slashes (/) are automatically sanitized by replacing slashes with hyphens (-) to avoid nested directory structures. The script will inform you when sanitization occurs.
npx skills add alex-popov-tech/git-worktree-create下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer