Git Worktrees

Sets up and manages git worktrees so Claude can run parallel coding sessions safely.

Development / Workflowdevelopmentworkflow
by AgentVoltv1.0.0Published 1y ago1 install
Free to sign up · every skill included with AgentVolt Pro

Before & after

Same prompt, same agent — the only difference is the skill.

PromptLet me work on two branches in parallel without git conflicts
Beforegeneric AI agent
You could create separate branches and switch between them, but that means your working directory changes each time. You might also use stashing to save your work temporarily. With git, you can usually handle multiple branches by committing your changes before switching. The downside is managing context in your head and avoiding mistakes. Would you want to use a separate clone of the repo to work in parallel?
Afterwith Git Worktrees
GIT WORKTREES SETUP

COMMAND SEQUENCE
• git worktree add ../fix-auth-bug origin/main
• git worktree add ../dashboard-redesign origin/develop

RESULT: Two isolated directories, same repo
~/agentvolt (main)
~/agentvolt-fix-auth-bug (main base, clean)
~/agentvolt-dashboard-redesign (develop base, clean)

EACH WORKTREE
• Separate .git/index (no conflicts)
• Separate node_modules (can install different versions)
• Independent git status, commits, branches
• Share .git/objects (efficient storage)

WORKFLOW
1. Session A: cd ../fix-auth-bug; make changes; git add/commit
2. Session B: cd ../agentvolt-dashboard-redesign; parallel work
3. Push both to their branches independently
4. Cleanup after merge: git worktree remove ../fix-auth-bug

AVOID
• Don't check out same branch in two worktrees (git will error)
• Don't share unstaged changes between them

BENEFIT: Two full Claude Code sessions in parallel, true isolation, no context switching tax

About this skill


name: git-worktrees description: Use when Sets up and manages git worktrees so Claude can run parallel coding sessions safely.

Git Worktrees

Git Worktrees, from the skill collection, teaches Claude how to create and manage git worktrees, letting you run multiple Claude Code sessions on the same repo in parallel without branches colliding.

What you get

  • Worktree setup, cleanup, and parallel-session management commands.

Customize your output

  • Adjust the branch naming convention or worktree cleanup rules.

Example output

Multiple isolated working directories ready for parallel AI coding sessions.

Best for

Developers running several Claude Code sessions on one codebase at once.

SKILL.md preview

SKILL.md
---
name: git-worktrees
description: Use this skill when the user needs to set up or manage git worktrees to run multiple coding sessions on the same repository in parallel without branches colliding.
version: 1.0.0
category: Development / Workflow
author: AgentVolt
license: proprietary
tags:
  - development
  - workflow
  - standard
---

# Git Worktrees

Sets up and manages git worktrees so parallel work streams can operate on the same repo without stepping on each other's checked-out branch.

## When to use

… (sign up to view the full skill)
Sign up to view, copy, and install the full skill

More development skills

View all Development skills →