Agent skill

Worktree

by TechDufus in TechDufus/oh-my-claude

Git worktree automation for isolated feature development. An agent skill from TechDufus/oh-my-claude.

MITAuto-check: warningsDevelopment

Install Worktree

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

skills CLI
$ npx skills add TechDufus/oh-my-claude --skill worktree -a claude-code

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

GitHub CLI
$ gh skill install TechDufus/oh-my-claude 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/TechDufus/oh-my-claude.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/oh-my-claude/skills/worktree .claude/skills/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
worktree
GitHub stars
174
Token cost
~3.5k tokens
SKILL.md length
660 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Git worktree automation for isolated feature development. An agent skill from TechDufus/oh-my-claude.

  • Works in 7 steps: Generate branch name: feat/ → Create worktree: git worktree add… → Copy environment files (if they exist) → …
  • : /worktree create
  • SKILL.md covers When This Skill Activates, Commands, Directory Structure and Environment Files, plus 6 more sections
  • Calls git, npm and yarn

What it does

Worktree is an agent skill from TechDufus/oh-my-claude. Git worktree automation for isolated feature development. Triggers on: '/worktree create', '/worktree list', '/worktree remove'. Creates isolated working directories with automatic setup.

Its SKILL.md is about 3.5k 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. It works with Git. The repository describes itself as: Add ultrawork to any prompt for maximum parallel execution. The licence is MIT.

When your agent uses it

  • : /worktree create
  • /worktree remove

Example prompts

  • “/worktree create”
  • “/worktree list”
  • “/worktree remove”
  • “/worktree”

Requirements

  • Node.js
  • Pre-approved tools (allowed-tools): Bash(git worktree:*), Bash(git branch:*), Bash(git checkout:*), Bash(mkdir:*), Bash(cp:*), Bash(rm:*), Bash(ls:*), Bash(npm:*), Bash(yarn:*), Bash(pnpm:*), Read, Write, Glob

Workflow steps

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

  1. Generate branch name: feat/
  2. Create worktree: git worktree add .worktrees/ -b feat/
  3. Copy environment files (if they exist)
  4. Detect and run package manager install
  5. Add .worktrees/ to .gitignore if not present
  6. Verify worktree creation
  7. Report path and instructions

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(git worktree:*)
    • Bash(git branch:*)
    • Bash(git checkout:*)
    • Bash(mkdir:*)
    • Bash(cp:*)
    • Bash(rm:*)
    • Bash(ls:*)
    • Bash(npm:*)
    • Bash(yarn:*)
    • Bash(pnpm:*)

    …and 3 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • npm
    • yarn
    • pnpm
    • bun

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

  • Network

    No URLs in SKILL.md. Its commands use git, npm, yarn and pnpm, 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

Worktree loads about 3.5k tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 660 words of instructions outside code blocks.

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

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.

  • NoteMentions a .env fileSKILL.md:47
    - `.env`, `.env.local`, `.env.development`
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:49
    - `.npmrc`
  • NoteMentions a .env fileSKILL.md:65
    cp .env .worktrees/auth-feature/ 2>/dev/null || true
  • NoteMentions a .env fileSKILL.md:123
    | `.env` | Environment variables |
  • NoteMentions a .env fileSKILL.md:124
    | `.env.local` | Local overrides |
  • NoteMentions a .env fileSKILL.md:125
    | `.env.development` | Development config |
  • WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:128
    | `.npmrc` | npm configuration |
  • NoteMentions a .env fileSKILL.md:202
    $ cp .env .worktrees/auth-refactor/ 2>/dev/null && echo "Copied .env" || echo "No .env found"
  • NoteMentions a .env fileSKILL.md:203
    Copied .env
  • NoteMentions a .env fileSKILL.md:238
    - .env

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 TechDufus/oh-my-claude at commit ede75db, republished under its MIT licence (© TechDufus). 660 words, ~3,483 tokens.

Download SKILL.mdSave it as .claude/skills/worktree/SKILL.md (or your agent's skills folder).
name
worktree
description
Git worktree automation for isolated feature development. Triggers on: '/worktree create', '/worktree list', '/worktree remove'. Creates isolated working directories with automatic setup.
allowed-tools
Bash(git worktree:*), Bash(git branch:*), Bash(git checkout:*), Bash(mkdir:*), Bash(cp:*), Bash(rm:*), Bash(ls:*), Bash(npm:*), Bash(yarn:*), Bash(pnpm:*), Read, Write, Glob

Worktree Skill

Git worktree automation for isolated feature development.

When This Skill Activates

CategoryTrigger Phrases
Create worktree/worktree create <name>, /worktree new <name>
List worktrees/worktree list, /worktree ls
Remove worktree/worktree remove <name>, /worktree rm <name>
Status/worktree status

Commands

Create Worktree
/worktree create <feature-name>

Creates an isolated worktree for feature development.

Workflow:

  1. Generate branch name: feat/<feature-name>
  2. Create worktree: git worktree add .worktrees/<feature-name> -b feat/<feature-name>
  3. Copy environment files (if they exist):
    • .env, .env.local, .env.development
    • .nvmrc, .node-version
    • .npmrc
  4. Detect and run package manager install:
    • If package-lock.json → npm install
    • If yarn.lock → yarn install
    • If pnpm-lock.yaml → pnpm install
    • If bun.lockb → bun install
  5. Add .worktrees/ to .gitignore if not present
  6. Verify worktree creation:
    • Run git -C .worktrees/<name> status to confirm clean state
    • Run git worktree list to confirm worktree is registered
    • If verification fails, run cleanup and report error
  7. Report path and instructions

Example:

bash
git worktree add .worktrees/auth-feature -b feat/auth-feature
cp .env .worktrees/auth-feature/ 2>/dev/null || true
cp .nvmrc .worktrees/auth-feature/ 2>/dev/null || true
cd .worktrees/auth-feature && npm install
List Worktrees
/worktree list

Shows all active worktrees:

bash
git worktree list
Remove Worktree
/worktree remove <name>

Removes a worktree and optionally its branch:

Workflow:

  1. Confirm removal with user
  2. Remove worktree: git worktree remove .worktrees/<name> --force
  3. Ask if branch should be deleted
  4. If yes: git branch -D feat/<name>
Status
/worktree status

Shows status of current worktree:

  • Current branch
  • Uncommitted changes
  • Relationship to main worktree

Directory Structure

project/
├── .worktrees/           # All worktrees live here
│   ├── auth-feature/     # Isolated worktree
│   └── api-refactor/     # Another worktree
├── .gitignore           # Should include .worktrees/
└── ...

Environment Files

These files are copied to new worktrees if they exist:

FilePurpose
.envEnvironment variables
.env.localLocal overrides
.env.developmentDevelopment config
.nvmrcNode version
.node-versionNode version (alternative)
.npmrcnpm configuration
.tool-versionsasdf version manager

Behavior Rules

MUST DO
  • Create worktrees under .worktrees/ directory
  • Add .worktrees/ to .gitignore automatically
  • Copy environment files to new worktrees
  • Run package install in new worktrees
  • Confirm before removing worktrees
MUST NOT
  • Create worktrees outside .worktrees/
  • Force delete branches without confirmation
  • Leave orphaned worktrees

Safety

Before removal, check:

  • No uncommitted changes in worktree
  • No unpushed commits on branch
  • Warn user if either condition exists

Recovery:

  • Worktrees can be recovered with git worktree add if directory deleted manually
  • Branches are not deleted unless explicitly requested

Decision Matrix: Worktree vs Branch

SituationUse WorktreeUse Branch
Working on two features simultaneouslyYESNO
Quick hotfix while mid-featureYESNO
Sequential feature developmentNOYES
Code review while continuing workYESNO
Simple branch for later workNOYES
Different node_modules neededYESNO
Testing against different depsYESNO
Just want to save work in progressNOYES (stash or branch)

Rule of thumb:

  • Parallel work = worktree (isolated directories, no context switching)
  • Sequential work = branch (single directory, normal git workflow)
  • Different dependencies = worktree (each has own node_modules)
Show full SKILL.md (243 more words)Show less

Example Sessions

Create Worktree - Complete Session
User: /worktree create auth-refactor

Claude: Creating worktree for auth-refactor...
bash
# Step 1: Verify we're in a git repo and check current state
$ git rev-parse --is-inside-work-tree
true

$ git worktree list
/Users/dev/myapp  abc1234 [main]

# Step 2: Check if branch already exists
$ git branch --list 'feat/auth-refactor'
(no output = branch doesn't exist, safe to proceed)

# Step 3: Create the worktree with new branch
$ git worktree add .worktrees/auth-refactor -b feat/auth-refactor
Preparing worktree (new branch 'feat/auth-refactor')
HEAD is now at abc1234 feat: add user dashboard

# Step 4: Copy environment files
$ cp .env .worktrees/auth-refactor/ 2>/dev/null && echo "Copied .env" || echo "No .env found"
Copied .env

$ cp .nvmrc .worktrees/auth-refactor/ 2>/dev/null && echo "Copied .nvmrc" || echo "No .nvmrc found"
Copied .nvmrc

# Step 5: Detect package manager and install
$ ls .worktrees/auth-refactor/package-lock.json
.worktrees/auth-refactor/package-lock.json

$ cd .worktrees/auth-refactor && npm install
added 847 packages in 32s

# Step 6: Ensure .worktrees/ is in .gitignore
$ grep -q "^\.worktrees/$" .gitignore || echo ".worktrees/" >> .gitignore
(added to .gitignore)

# Step 7: Verify worktree is functional
$ git -C .worktrees/auth-refactor status
On branch feat/auth-refactor
nothing to commit, working tree clean

$ git worktree list
/Users/dev/myapp                      abc1234 [main]
/Users/dev/myapp/.worktrees/auth-refactor  abc1234 [feat/auth-refactor]

Output to user:

Worktree created successfully.

Location: .worktrees/auth-refactor
Branch:   feat/auth-refactor
Base:     main (abc1234)

Environment files copied:
  - .env
  - .nvmrc

Dependencies installed via npm.

To work in this worktree:
  cd .worktrees/auth-refactor

To open in new terminal/editor:
  code .worktrees/auth-refactor
List Worktrees - Complete Session
User: /worktree list

Claude: Current worktrees:
bash
$ git worktree list
/Users/dev/myapp                          abc1234 [main]
/Users/dev/myapp/.worktrees/auth-refactor def5678 [feat/auth-refactor]
/Users/dev/myapp/.worktrees/api-cache     ghi9012 [feat/api-cache]

Output to user:

Active Worktrees:

1. main (primary)
   Path:   /Users/dev/myapp
   Commit: abc1234

2. auth-refactor
   Path:   .worktrees/auth-refactor
   Branch: feat/auth-refactor
   Commit: def5678

3. api-cache
   Path:   .worktrees/api-cache
   Branch: feat/api-cache
   Commit: ghi9012
Remove Worktree - Complete Session (With Warning)
User: /worktree remove auth-refactor

Claude: Checking worktree status before removal...
bash
# Step 1: Check for uncommitted changes
$ git -C .worktrees/auth-refactor status --porcelain
 M src/auth/login.ts
?? src/auth/temp.ts

# Step 2: Check for unpushed commits
$ git -C .worktrees/auth-refactor log origin/feat/auth-refactor..HEAD --oneline 2>/dev/null || git -C .worktrees/auth-refactor log origin/main..HEAD --oneline
a1b2c3d feat(auth): add session validation
d4e5f6g feat(auth): refactor token storage

Output to user:

WARNING: This worktree has uncommitted changes:

Modified:  src/auth/login.ts
Untracked: src/auth/temp.ts

WARNING: This worktree has 2 unpushed commits:

a1b2c3d feat(auth): add session validation
d4e5f6g feat(auth): refactor token storage

Are you sure you want to remove this worktree?
This will DELETE all uncommitted changes permanently.

Options:
1. Commit and push changes first, then remove
2. Force remove (loses uncommitted changes)
3. Cancel
User: force remove, I don't need those changes

Claude: Removing worktree...
bash
# Step 3: Force remove the worktree
$ git worktree remove .worktrees/auth-refactor --force
Removing worktree directory .worktrees/auth-refactor

# Step 4: Ask about branch deletion

Output to user:

Worktree removed.

The branch 'feat/auth-refactor' still exists with 2 commits.
Delete the branch as well? (y/n)
User: yes

Claude: Deleting branch...
bash
$ git branch -D feat/auth-refactor
Deleted branch feat/auth-refactor (was a1b2c3d).

$ git worktree list
/Users/dev/myapp                      abc1234 [main]
/Users/dev/myapp/.worktrees/api-cache ghi9012 [feat/api-cache]

Output to user:

Cleanup complete.
- Worktree directory removed
- Branch feat/auth-refactor deleted

Error Handling

Error: Branch Already Exists
bash
$ git worktree add .worktrees/auth-feature -b feat/auth-feature
fatal: a branch named 'feat/auth-feature' already exists

Recovery:

bash
# Option 1: Use existing branch (if worktree doesn't exist for it)
$ git worktree add .worktrees/auth-feature feat/auth-feature

# Option 2: Choose a different name
$ git worktree add .worktrees/auth-feature-v2 -b feat/auth-feature-v2

# Option 3: Delete the old branch first (if safe)
$ git branch -d feat/auth-feature  # safe delete (fails if unmerged)
$ git worktree add .worktrees/auth-feature -b feat/auth-feature

User message: "Branch 'feat/auth-feature' already exists. Would you like to: (1) use the existing branch, (2) choose a different name, or (3) delete the old branch first?"

Error: Worktree Directory Already Exists
bash
$ git worktree add .worktrees/auth-feature -b feat/auth-feature
fatal: '.worktrees/auth-feature' already exists

Recovery:

bash
# Check if it's a valid worktree
$ git worktree list | grep auth-feature

# If listed: worktree exists, inform user
# If not listed: orphaned directory, safe to remove
$ rm -rf .worktrees/auth-feature
$ git worktree prune
$ git worktree add .worktrees/auth-feature -b feat/auth-feature

User message: "Directory '.worktrees/auth-feature' already exists. This appears to be an orphaned directory (not a valid worktree). Remove it and retry?"

Error: Package Install Fails
bash
$ cd .worktrees/auth-feature && npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! peer dep missing: react@^17.0.0

Recovery:

bash
# Worktree is created but deps failed
# Option 1: Try with legacy peer deps
$ cd .worktrees/auth-feature && npm install --legacy-peer-deps

# Option 2: Use different package manager
$ cd .worktrees/auth-feature && yarn install

# Option 3: Skip install, let user handle

User message: "Worktree created successfully, but npm install failed with dependency conflicts. The worktree is ready at .worktrees/auth-feature. You may need to run npm install --legacy-peer-deps or resolve the conflicts manually."

Error: Disk Space Insufficient
bash
$ cd .worktrees/auth-feature && npm install
npm ERR! code ENOSPC
npm ERR! syscall write
npm ERR! errno -28
npm ERR! ENOSPC: no space left on device

Recovery:

bash
# Clean up the partial worktree
$ git worktree remove .worktrees/auth-feature --force
$ git branch -D feat/auth-feature

# Check disk space
$ df -h .

User message: "Disk space insufficient. The partial worktree has been cleaned up. Free up disk space and try again. Current usage: [show df output]"

Error: Invalid Worktree Name
bash
$ git worktree add ".worktrees/my feature" -b "feat/my feature"
fatal: 'feat/my feature' is not a valid branch name

Prevention: Validate names before attempting creation.

bash
# Valid patterns: alphanumeric, hyphens, underscores
# Invalid: spaces, special chars, starting with hyphen

# Sanitize input
name="my feature"
sanitized=$(echo "$name" | tr ' ' '-' | tr -cd 'a-zA-Z0-9-_')
# Result: my-feature

User message: "Invalid name 'my feature'. Branch names cannot contain spaces. Using 'my-feature' instead."

Error: Worktree Locked
bash
$ git worktree remove .worktrees/auth-feature
fatal: '.worktrees/auth-feature' is locked

Recovery:

bash
# Check why it's locked
$ cat .git/worktrees/auth-feature/locked
Process still running or editor has files open

# Unlock if safe
$ git worktree unlock .worktrees/auth-feature
$ git worktree remove .worktrees/auth-feature

User message: "Worktree is locked (possibly by another process or editor). Close any editors with files from this worktree open, then retry."

Cleanup Instructions for Partial Failures

If worktree creation fails partway through, clean up in reverse order:

bash
# 1. Remove node_modules if install started
$ rm -rf .worktrees/<name>/node_modules 2>/dev/null

# 2. Remove the worktree directory
$ git worktree remove .worktrees/<name> --force 2>/dev/null || rm -rf .worktrees/<name>

# 3. Prune worktree references
$ git worktree prune

# 4. Delete the branch if it was created
$ git branch -D feat/<name> 2>/dev/null

# 5. Verify clean state
$ git worktree list
$ git branch --list 'feat/<name>'

Automated cleanup function:

bash
cleanup_failed_worktree() {
    local name="$1"
    rm -rf ".worktrees/${name}/node_modules" 2>/dev/null
    git worktree remove ".worktrees/${name}" --force 2>/dev/null || rm -rf ".worktrees/${name}"
    git worktree prune
    git branch -D "feat/${name}" 2>/dev/null
    echo "Cleaned up failed worktree: ${name}"
}

Note: This skill manages worktrees only. Use standard git commands for commits, pushes, and merges within worktrees.

© TechDufus, MIT. 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 plugins/oh-my-claude/skills/worktree of TechDufus/oh-my-claude.

Open the folder on GitHubat commit ede75db

Compare with similar skills

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.

Worktree compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Worktree this skillTechDufus/oh-my-claude174—~3.5kAutomated safety check: WarnMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Finishing A Development Branchfarm-fe/farm5.6k34 repos~1.8kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence
Pre-Release PR Triagejamiepine/voicebox57k—~3.1kAutomated safety check: PassMIT
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 34 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Builds a Cap feature in an isolated Git worktree with disposable dev resources, verification, a recorded demo and a neutral pull request, started with /building.

    23k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check: warnings

More from TechDufus/oh-my-claude

All 12 skills in this repo
  • Debugger

    TechDufus/oh-my-claude

    Systematic debugging methodology for diagnosing failures and root cause analysis.

    174 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed
  • Oh My Claude Runtime

    TechDufus/oh-my-claude

    A skill your agent uses when applying oh-my-claude workflow guidance, ultrawork modes, agent orchestration, plan execution, or plugin configuration.

    174 GitHub stars~4.3k tokensUpdated 2 mo ago
    Auto-check passed
  • PR Creation

    TechDufus/oh-my-claude

    MUST be used when creating pull requests. An agent skill from TechDufus/oh-my-claude.

    174 GitHub stars~1.8k tokensUpdated 2 mo ago
    Auto-check passed
  • Ralph Loop Init

    TechDufus/oh-my-claude

    Transform approved plans into ralph loop infrastructure. An agent skill from TechDufus/oh-my-claude.

    174 GitHub stars~4.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • Ralph Plan

    TechDufus/oh-my-claude

    Structured PRD generation with interview, research, and approval workflow.

    174 GitHub stars~2.4k tokensUpdated 2 mo ago
    Auto-check: notes
  • Writing Skills

    TechDufus/oh-my-claude

    Methodology for creating effective skills using TDD principles.

    174 GitHub stars~1.3k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Worktree

What does Worktree do?

Git worktree automation for isolated feature development. An agent skill from TechDufus/oh-my-claude. Worktree is an agent skill from TechDufus/oh-my-claude. Git worktree automation for isolated feature development.

When should I use Worktree?

Worktree fits situations like: : /worktree create; /worktree remove.

How do I install Worktree in Claude Code?

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

How do I install Worktree in Codex?

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

Can I use 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 TechDufus/oh-my-claude --skill 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/worktree, .gemini/skills/worktree, .github/skills/worktree and .opencode/skills/worktree in your project.

What does Worktree need to run?

Going by SKILL.md and its folder, Worktree needs the command-line tools its instructions call (git, npm, yarn, pnpm and bun). Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash(git worktree:*), Bash(git branch:*), Bash(git checkout:*), Bash(mkdir:*), Bash(cp:*), Bash(rm:*), Bash(ls:*), Bash(npm:*), Bash(yarn:*), Bash(pnpm:*), Read, Write, Glob.

Does Worktree access the network?

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

Is Worktree safe to install?

Our automated static check of SKILL.md flagged 2 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 Worktree use?

Worktree is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Worktree use?

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

Skills that share tags, products or a category with Worktree: Finishing a Development Branch (obra/superpowers, 296k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars), Git Worktree Cleanup (lobehub/lobehub, 83k stars) and Pre-Release PR Triage (jamiepine/voicebox, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktree?

TechDufus (a GitHub user) maintains it in TechDufus/oh-my-claude, which has 174 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on July 13, 2026.

Source: TechDufus/oh-my-claude on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.