Agent skill

Git Worktree

by davekilleen in davekilleen/Dex

This skill manages Git worktrees for isolated parallel development.

Custom licenceAuto-check: notesDevelopment

Install Git Worktree

skills CLI
$ npx skills add davekilleen/Dex --skill git-worktree -a claude-code

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

GitHub CLI
$ gh skill install davekilleen/Dex git-worktree --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/davekilleen/Dex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/plugins/compound-engineering/skills/git-worktree .claude/skills/git-worktree && 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-worktree
GitHub stars
493
Used in
1 other repo
Token cost
~2.2k tokens
SKILL.md length
616 words
Files
2 (incl. scripts)
Skills in repo
91
Repo updated
First seen
Licence
Custom licence

At a glance

This skill manages Git worktrees for isolated parallel development.

  • Works in 3 steps: Copies .env, .env.local, .env.test, etc.… → Ensures .worktrees is in .gitignore → Creates consistent directory structure
  • Tasks that involve Git worktrees
  • SKILL.md covers What This Skill Does, CRITICAL: Always Use the…, When to Use This Skill and How to Use, plus 6 more sections
  • Runs Shell scripts from its folder; calls bash, git and go

What it does

Git Worktree is an agent skill from davekilleen/Dex. This skill manages Git worktrees for isolated parallel development. It handles creating, listing, switching, and cleaning up worktrees with a simple interactive interface, following KISS principles.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including scripts (for example `scripts/worktree-manager.sh`).

It sits in Development, covering Git worktrees. It works with Git. The repository describes itself as: Your AI Chief of Staff — a personal operating system starter kit that adapts to your role. No coding required.

When your agent uses it

  • Tasks that involve Git worktrees

Example prompts

  • “/git-worktree”

Requirements

  • A Bash shell

Workflow steps

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

  1. Copies .env, .env.local, .env.test, etc. from main repo
  2. Ensures .worktrees is in .gitignore
  3. Creates consistent directory structure

What it can do on your machine

Read from SKILL.md and the folder at commit ab5d6ad. 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

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • git
    • go

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

  • Network

    No URLs in SKILL.md. Its commands use git, 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 Worktree loads about 2.2k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 616 words of instructions outside code blocks.

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

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:18
    - **Automatic .env file copying** from main repo to new worktrees
  • NoteMentions a .env fileSKILL.md:25
    1. Copies `.env`, `.env.local`, `.env.test`, etc. from main repo
  • NoteMentions a .env fileSKILL.md:62
    # Create a new worktree (copies .env files automatically)
  • NoteMentions a .env fileSKILL.md:71
    # Copy .env files to an existing worktree (if they weren't copied)
  • NoteMentions a .env fileSKILL.md:97
    4. **Copies all .env files from main repo** (.env, .env.local, .env.test, etc.)
  • NoteMentions a .env fileSKILL.md:151
    # Script runs (copies .env files automatically):
  • NoteMentions a .env fileSKILL.md:165
    # For first feature (copies .env files):
  • NoteMentions a .env fileSKILL.md:168
    Later, start second feature (also copies .env files):
  • NoteMentions a .env fileSKILL.md:256
    ### .env files missing in worktree?
  • NoteMentions a .env fileSKILL.md:258
    If a worktree was created without .env files (e.g., via raw `git worktree add`), copy them:

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); the scripts in this folder are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 616 words (~2,156 tokens).

“This skill provides a unified interface for managing Git worktrees across your development workflow. Whether you're reviewing PRs in isolation or working on features in parallel, this skill handles all the complexity.”

— opening of SKILL.md by davekilleen, Custom licence
name
git-worktree

Read the full SKILL.md on GitHub

Files

SKILL.md and 1 other file (scripts) in .claude/plugins/compound-engineering/skills/git-worktree of davekilleen/Dex.

  • SKILL.md
  • scripts/worktree-manager.sh

Open the folder on GitHubat commit ab5d6ad

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in davekilleen/Dex, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Git Worktree 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 Worktree compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Git Worktree this skilldavekilleen/Dex4931 repos~2.2kAutomated safety check: NotesCustom licence
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
Git Worktree Setupk8zdev/k8z155—~930Automated safety check: PassNone
New Featuremichaelshimeles/skills1.3k1 repos~699Automated safety check: PassNone

Similar skills

  • 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
  • New Feature

    michaelshimeles/skills

    Start a new task in an isolated Git worktree branched from origin/main so multiple agents can work on the same repo in parallel without conflicts.

    1.3k GitHub starsUsed in 1 repo~699 tokens
    DevelopmentAuto-check passed
  • Use Mori CLI to enable agent-to-agent communication and coordination across Mori-managed panes.

    303 GitHub stars~1.7k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed

More from davekilleen/Dex

All 91 skills in this repo
  • Diff Adopt Profile

    davekilleen/Dex

    Adopt a full published Heydex profile by handle ('set me up like @davekilleen').

    493 GitHub stars~2.1k tokensUpdated 5 days ago
    Auto-check passed
  • Diff Generate

    davekilleen/Dex

    Package one workflow — how you use Dex for a specific job — into a shareable DexDiff methodology doc.

    493 GitHub stars~1.4k tokensUpdated 5 days ago
    Auto-check passed
  • Creating Agent Skills

    davekilleen/Dex

    Expert guidance for creating, writing, and refining Claude Code Skills.

    493 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Feedback

    davekilleen/Dex

    Report a Dex bug to the Dex team with zero homework — Dex investigates locally, builds a privacy-safe report, shows it to you (or auto-sends if you've chosen that), and tracks the ticket until it's…

    493 GitHub stars~2.4k tokensUpdated 5 days ago
    Auto-check passed
  • Dhh Rails Style

    davekilleen/Dex

    This skill should be used when writing Ruby and Rails code in DHH's distinctive 37signals style.

    493 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Skill Score

    davekilleen/Dex

    Grade a Dex skill against the shape-aware quality rubric and report a ship/revise/no verdict with the exact fixes.

    493 GitHub stars~2.6k tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about Git Worktree

What does Git Worktree do?

This skill manages Git worktrees for isolated parallel development. Git Worktree is an agent skill from davekilleen/Dex. This skill manages Git worktrees for isolated parallel development.

When should I use Git Worktree?

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

How do I install Git Worktree in Claude Code?

Run `npx skills add davekilleen/Dex --skill git-worktree -a claude-code`. Or copy the skill folder (.claude/plugins/compound-engineering/skills/git-worktree in davekilleen/Dex) into .claude/skills/git-worktree in your project. Claude Code loads it when a task matches its description.

How do I install Git Worktree in Codex?

Run `npx skills add davekilleen/Dex --skill git-worktree -a codex`. Or copy the skill folder (.claude/plugins/compound-engineering/skills/git-worktree in davekilleen/Dex) into .agents/skills/git-worktree in your project. Codex loads it when a task matches its description.

Can I use Git Worktree 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 davekilleen/Dex --skill git-worktree -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-worktree, .gemini/skills/git-worktree, .github/skills/git-worktree and .opencode/skills/git-worktree in your project.

What does Git Worktree need to run?

Going by SKILL.md and its folder, Git Worktree needs a shell for the scripts in its folder and the command-line tools its instructions call (bash, git and go). Our summary lists: A Bash shell.

Does Git Worktree access the network?

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

Is Git Worktree safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Git Worktree use?

Git Worktree has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Git Worktree use?

About 2.2k tokens (SKILL.md is roughly 8.6k 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 Worktree?

Skills that share tags, products or a category with Git Worktree: Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars), Worktree (AgentsMesh/AgentsMesh, 2.4k stars), Cursor Composer Task Delegate (Chachamaru127/claude-code-harness, 3.2k stars) and Git Worktree Setup (k8zdev/k8z, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Git Worktree?

davekilleen (a GitHub user) maintains it in davekilleen/Dex, which has 493 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 2, 2026.

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