Our review
Creates a Git worktree to work on a separate branch in an isolated directory without switching branches.
Strengths
- Enables parallel work on multiple branches without workspace conflicts.
- Automates worktree path naming and base branch selection.
- Provides a cleanup reminder after creation.
Limitations
- Requires a properly initialized Git repository and the base branch to exist locally or remotely.
- Does not handle cases where the target directory already exists.
Use this skill when you need to work on a feature or fix in an isolated directory while keeping your current branch untouched.
Avoid using it for simple branch switching or if you prefer to manage worktrees manually.
Security analysis
SafeThe skill only runs standard git worktree commands (git rev-parse, branch, worktree list/add/remove) within the repository, with no destructive actions or external communication.
No concerns found
Examples
/worktree feature-auth/worktree fix-bug develop/worktree existing-branchname: worktree description: Create a git worktree for parallel development. Use when the user wants to work on a feature branch in a separate directory without switching branches. disable-model-invocation: true allowed-tools: Bash, Read
Git Worktree
Create a git worktree for working on a separate branch in parallel.
Current State
- Repository: !
basename $(git rev-parse --show-toplevel) - Current branch: !
git branch --show-current - Existing worktrees: !
git worktree list
Instructions
Parse $ARGUMENTS to determine:
- Branch name - required (first argument)
- Base branch - optional (second argument, defaults to
main)
Workflow
-
Determine the worktree path: Use
../<repo-name>-<branch-name>as the directory (sibling to the current repo). -
Check if the branch already exists:
git branch --list <branch-name> git branch -r --list "origin/<branch-name>" -
Create the worktree:
- If branch exists locally or remotely:
git worktree add <path> <branch-name> - If new branch:
git worktree add -b <branch-name> <path> <base-branch>
- If branch exists locally or remotely:
-
Report the result with the full path so the user can navigate to it.
Examples
/worktree feature-auth→ Creates../<repo>-feature-authon new branchfeature-authfrommain/worktree fix-bug develop→ Creates../<repo>-fix-bugon new branchfix-bugfromdevelop/worktree existing-branch→ If branch exists, checks it out in a new worktree
Cleanup Reminder
After reporting success, remind the user how to clean up when done:
git worktree remove <path>
# or to also delete the branch:
git worktree remove <path> && git branch -d <branch-name>
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.