Creates a git worktree in a sub-folder to manage multiple branches without switching context.

Install

mkdir -p .claude/skills/wt && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2801" && unzip -o skill.zip -d .claude/skills/wt && rm skill.zip

Installs to .claude/skills/wt

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Create a git worktree in worktree/ subdirectory with up-to-date master
70 charsno explicit “when” trigger
Beginner

Key capabilities

  • Create isolated git worktrees
  • Initialize worktrees with master branch
  • Update submodules recursively
  • Manage multiple feature branches simultaneously
  • Remove worktrees after task completion

How it works

It automates the git worktree add command to create a separate directory linked to the main repository, allowing concurrent work on different branches.

Inputs & outputs

You give it
Branch name
You get back
Isolated directory containing the worktree

When to use wt

  • Work on multiple features simultaneously
  • Review PRs in an isolated environment
  • Avoid full branch switching

About this skill

Create Git Worktree

Create a new worktree in worktree/<branch-name> with branch <branch-name>.

Execution

# Return to repo root
cd "$(git rev-parse --show-toplevel)"

# Pull latest master
git checkout master
git pull origin master

# Create worktree
git worktree add worktree/"$ARGUMENTS" -b "$ARGUMENTS"

# Initialize submodules (skills-vendor)
git -C worktree/"$ARGUMENTS" submodule update --init --recursive

# Navigate to worktree
cd worktree/"$ARGUMENTS"

# Confirm location and branch
echo ""
echo "✅ Worktree created and ready:"
echo "   Location: $(pwd)"
echo "   Branch: $(git rev-parse --abbrev-ref HEAD)"
echo ""
echo "You can now work in this isolated environment."

Notes

  • Worktree inherits .claude/skills/ workflows
  • To remove when done: cd ../.. && git worktree remove worktree/"$ARGUMENTS"
  • List all worktrees: git worktree list

When not to use it

  • Environments without git support

Prerequisites

git

Limitations

  • Requires sufficient disk space for multiple worktrees
  • Worktrees share the same repository configuration

How it compares

It avoids the need to perform full branch switches in the main directory, preserving the state of the primary environment.

Compared to similar skills

wt side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
wt (this skill)13moReviewBeginner
resolve-conflicts818moReviewIntermediate
openspec-onboard106moReviewBeginner
codex-cli-bridge99moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry