US

using-git-worktrees

Use Git worktrees to maintain multiple branches simultaneously, ensuring isolated development environments.

Install

mkdir -p .claude/skills/using-git-worktrees-vobbilis && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15208" && unzip -o skill.zip -d .claude/skills/using-git-worktrees-vobbilis && rm skill.zip

Installs to .claude/skills/using-git-worktrees-vobbilis

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.

Use when working on multiple features simultaneously or when you need isolated development environments. MANDATORY for parallel development. FORBIDDEN is branch switching with uncommitted work. REQUIRED is worktree per feature.
227 chars✓ has a “when” trigger
Intermediate

Key capabilities

  • →Develop multiple features in parallel.
  • →Perform code reviews without interrupting current work.
  • →Implement hotfixes without losing context of ongoing development.
  • →Compare different implementation approaches in isolated environments.
  • →Create a new worktree for each feature.
  • →Remove worktrees after merging or completing work.

How it works

Git worktrees allow multiple branches to be checked out simultaneously in different directories, creating isolated development environments for parallel tasks.

Inputs & outputs

You give it
A Git repository and a need to work on multiple branches simultaneously.
You get back
Multiple isolated development environments, each with its own branch checked out, allowing parallel development and context switching.

When to use using-git-worktrees

  • →Developing multiple features in parallel
  • →Performing urgent hotfixes during feature development
  • →Comparing different implementation approaches

About using-git-worktrees

Prevents the dangerous practice of switching branches with uncommitted work by mandating one worktree per feature. It enables efficient context switching for code reviews and emergency hotfixes without losing current progress.

Use when working on multiple features simultaneously or when you need isolated development environments. MANDATORY for parallel development. FORBIDDEN is branch switching with uncommitted work. REQUIRED is worktree per feature.

When not to use it

  • →For quick, single-file changes.
  • →When already on the right branch.
  • →When only reading code.

Limitations

  • →Branch switching with uncommitted work is forbidden.
  • →Stashing for branch switches is forbidden.
  • →Multiple features in one worktree are forbidden.

How it compares

This skill mandates using Git worktrees to avoid switching branches with uncommitted work or stashing, providing a safer and more efficient way to manage parallel development than traditional Git workflows.

Compared to similar skills

using-git-worktrees side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
using-git-worktrees (this skill)08moReviewIntermediate
resolve-conflicts8112moReviewIntermediate
openspec-onboard109moReviewBeginner
codex-cli-bridge91yReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry