Official agent skill

Git Worktrees

by trailofbits in trailofbits/dropkit

Use git worktrees when running multiple Claude Code instances in parallel for different features - creates isolated workspaces with separate branches and virtual environments

OfficialApache-2.0Auto-check: warningsDevelopment

Install Git Worktrees

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add trailofbits/dropkit --skill git-worktrees -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install trailofbits/dropkit git-worktrees --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/trailofbits/dropkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/git-worktrees .claude/skills/git-worktrees && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
git-worktrees
GitHub stars
128
Token cost
~693 tokens
SKILL.md length
239 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Use git worktrees when running multiple Claude Code instances in parallel for different features - creates isolated workspaces with separate branches and virtual environments

  • Works in 5 steps: One worktree per Claude Code instance -… → Separate branches - Each worktree should… → Independent uv sync - Run uv sync in… → …
  • Tasks that involve Git worktrees
  • SKILL.md covers Overview, When to Use, Setup and Guidelines for Parallel…, plus 4 more sections
  • Calls git and uv

What it does

Git Worktrees is an agent skill from trailofbits/dropkit, published by the product's own GitHub organization. Use git worktrees when running multiple Claude Code instances in parallel for different features - creates isolated workspaces with separate branches and virtual environments

Its SKILL.md is about 690 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees. The repository describes itself as: A CLI tool for managing DigitalOcean droplets with automated setup, SSH configuration, and lifecycle management. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Git worktrees

Example prompts

  • “/git-worktrees”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. One worktree per Claude Code instance - Never run multiple instances in the same directory
  2. Separate branches - Each worktree should be on its own feature branch
  3. Independent uv sync - Run uv sync in each worktree (creates separate .venv)
  4. Tests run independently - Each worktree can run its own test suite without conflicts
  5. Merge via main branch - When features are complete, merge branches to main

What it can do on your machine

Read from SKILL.md and the folder at commit d71f906. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Git Worktrees loads about 693 tokens when it runs. Until then it costs about 47 tokens; SKILL.md has 239 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~47
When it runs · the whole SKILL.md, loaded when a task matches
~693

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:59
    | `~/.ssh/config` | SSH config is shared | Coordinate droplet names |

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from trailofbits/dropkit at commit d71f906, republished under its Apache-2.0 licence (© trailofbits). 239 words, ~693 tokens.

Download SKILL.mdSave it as .claude/skills/git-worktrees/SKILL.md (or your agent's skills folder).
name
git-worktrees
description
Use git worktrees when running multiple Claude Code instances in parallel for different features - creates isolated workspaces with separate branches and virtual environments

Parallel Development with Git Worktrees

Overview

Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching. This is essential when running multiple Claude Code instances in parallel.

Core principle: One worktree per Claude Code instance ensures isolation and prevents conflicts.

Announce at start: "I'm using the git-worktrees skill to set up an isolated workspace."

When to Use

  • Running multiple Claude Code instances for different features
  • Need to work on a feature branch while keeping main branch accessible
  • Parallel development on separate tasks

Setup

bash
# Create worktrees for parallel development
git worktree add ../dropkit-feature-a feature-a
git worktree add ../dropkit-feature-b feature-b

# Each worktree gets its own directory with full codebase
# Run Claude Code in each directory independently

Guidelines for Parallel Instances

  1. One worktree per Claude Code instance - Never run multiple instances in the same directory
  2. Separate branches - Each worktree should be on its own feature branch
  3. Independent uv sync - Run uv sync in each worktree (creates separate .venv)
  4. Tests run independently - Each worktree can run its own test suite without conflicts
  5. Merge via main branch - When features are complete, merge branches to main

Managing Worktrees

bash
# List all worktrees
git worktree list

# Remove a worktree when done
git worktree remove ../dropkit-feature-a

# Prune stale worktree entries
git worktree prune

Potential Conflicts to Avoid

ResourceRiskMitigation
~/.config/dropkit/User config is sharedDon't modify during parallel dev
~/.ssh/configSSH config is sharedCoordinate droplet names
DigitalOcean APICreating droplets with same nameUse unique droplet names per worktree

Quick Reference

SituationAction
Starting parallel workCreate new worktree with feature branch
New worktree createdRun uv sync to create isolated venv
Feature completeMerge to main, remove worktree
Stale worktreesRun git worktree prune

Example Workflow

You: I'm using the git-worktrees skill to set up an isolated workspace.

[Create worktree: git worktree add ../dropkit-auth feature/auth]
[Run uv sync]
[Run uv run pytest - all passing]

Worktree ready at ../dropkit-auth
Tests passing
Ready to implement auth feature

© trailofbits, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/git-worktrees of trailofbits/dropkit.

Open the folder on GitHubat commit d71f906

Compare with similar skills

Git Worktrees next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Git Worktrees compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Worktrees this skilltrailofbits/dropkit128—~693Automated safety check: WarnApache-2.0
Migrate Core Code to Submodulestinyhumansai/openhuman41k—~2.6kAutomated safety check: PassGPL-3.0
Nagentdavidondrej/skills4.1k—~1.7kAutomated safety check: NotesMIT
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT
WorktreeAgentsMesh/AgentsMesh2.4k—~553Automated safety check: NotesCustom licence
Cursor Composer Task DelegateChachamaru127/claude-code-harness3.2k—~4.4kAutomated safety check: NotesMIT

Similar skills

  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    41k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Nagent

    davidondrej/skills

    Launch a new bb worker thread with the right project, model, worktree, and task brief.

    4.1k GitHub stars~1.7k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Git Worktree Isolation

    jnMetaCode/superpowers-zh

    Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.

    8.3k GitHub starsUsed in 1 repo~982 tokens
    DevelopmentAuto-check passed
  • Worktree

    AgentsMesh/AgentsMesh

    Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.

    2.4k GitHub stars~553 tokensUpdated 14 days ago
    DevelopmentAuto-check: notes
  • Cursor Composer Task Delegate

    Chachamaru127/claude-code-harness

    Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.

    3.2k GitHub stars~4.4k tokensUpdated 2 days ago
    DevelopmentAuto-check: notes
  • Automate git worktree creation and copy private files (not tracked in git) to new workdirs.

    155 GitHub stars~930 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed

Questions about Git Worktrees

What does Git Worktrees do?

Use git worktrees when running multiple Claude Code instances in parallel for different features - creates isolated workspaces with separate branches and virtual environments. Git Worktrees is an agent skill from trailofbits/dropkit, published by the product's own GitHub organization.

When should I use Git Worktrees?

Git Worktrees fits situations like: tasks that involve Git worktrees.

How do I install Git Worktrees in Claude Code?

Run `npx skills add trailofbits/dropkit --skill git-worktrees -a claude-code`. Or copy the skill folder (.claude/skills/git-worktrees in trailofbits/dropkit) into .claude/skills/git-worktrees in your project. Claude Code loads it when a task matches its description.

How do I install Git Worktrees in Codex?

Run `npx skills add trailofbits/dropkit --skill git-worktrees -a codex`. Or copy the skill folder (.claude/skills/git-worktrees in trailofbits/dropkit) into .agents/skills/git-worktrees in your project. Codex loads it when a task matches its description.

Can I use Git Worktrees in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add trailofbits/dropkit --skill git-worktrees -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/git-worktrees, .gemini/skills/git-worktrees, .github/skills/git-worktrees and .opencode/skills/git-worktrees in your project.

What does Git Worktrees need to run?

Going by SKILL.md and its folder, Git Worktrees needs the command-line tools its instructions call (git and uv).

Does Git Worktrees access the network?

SKILL.md contains no URLs. Its commands use git and uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Git Worktrees safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Git Worktrees use?

Git Worktrees is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Git Worktrees use?

About 693 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Git Worktrees?

Skills that share tags, products or a category with Git Worktrees: Migrate Core Code to Submodules (tinyhumansai/openhuman, 41k stars), Nagent (davidondrej/skills, 4.1k stars), Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars) and Worktree (AgentsMesh/AgentsMesh, 2.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Worktrees?

trailofbits (a GitHub organization, an official publisher) maintains it in trailofbits/dropkit, which has 128 GitHub stars. The repository was last updated on October 6, 2026.

Source: trailofbits/dropkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.