Git Worktree

Use Git worktrees to isolate parallel coding tasks. Use when setting up a task checkout, working in a shared repo, or managing existing worktrees.

4,336 stars 628 forksGit & Code Review

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add davidondrej/skills --skill git-worktree
Manual install
git clone --depth 1 https://github.com/davidondrej/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/skills/git-worktree ~/.claude/skills/git-worktree

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Git Worktrees for Parallel Agents

## In Cloudroom (`$ROOM_THREAD_ID` is set)

Never run `git worktree add` yourself. Cloudroom only deletes worktrees it made, so hand-made ones pile up in `~/code` forever.

- **New task:** start the thread with **New worktree** instead.
- **Move this thread to its own worktree:** fork it into a Cloudroom-managed worktree. Cloudroom makes the branch and deletes the folder once its last thread is archived (after the worktree retention setting, default 21 days).

  ```bash
  room-cli thread fork "$ROOM_THREAD_ID" --new-environment worktree --title "<task>" \
    --prompt "You now run in a new worktree. Copy the gitignored .env files from <primary checkout> into it, then stop and wait for the user."
  ```

  It branches from `main`, so uncommitted edits stay behind; commit them first or pass `--base-branch <ref>`. Then tell the user to continue in the new thread and archive this one. Skip the rest of this skill.

## Start here

Detect where you are before editing:

```bash
[ "$(git rev-parse --path-format=absolute --git-dir)" = "$(git rev-parse --path-format=absolute --git-common-dir)" ] \
  && echo "primary checkout" || echo "worktree"
```

- **Primary checkout** → create a task-named worktree, complete the setup below, and `cd` into it before editing.
- **Worktree** (including one created by Cursor) → proceed with the task.

## Working model
Read the full skill on GitHub

Details

Skill name
git-worktree
Path
skills/git-worktree/SKILL.md
License
MIT
Repo updated
17 November 2026

FAQ

What does the Git Worktree skill do?

Use Git worktrees to isolate parallel coding tasks. Use when setting up a task checkout, working in a shared repo, or managing existing worktrees.

How do I install the Git Worktree skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add davidondrej/skills --skill git-worktree. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Git Worktree popular?

It lives in davidondrej/skills, which has 4,336 GitHub stars and 628 forks.

Related skills

Browser Harness

4.3k

davidondrej/skills

Direct browser control via CDP. Use when the user wants to automate, scrape, test, or interact with web pages. Connects to the user's already-running Chrome.

Testing & QAIn 2 lists628

4x4

4.3k

davidondrej/skills

Pull 16 fast decisions out of the user with 4 sets of 4 open questions, then present an implementation plan. Only for risky changes, large product decisions, or large refactors. Run when the user types /4x4. Agents may suggest it in one line but never start it on their own.

AI, LLMs & Agents628

Adr Verbatim

4.3k

davidondrej/skills

Record concise ADRs that preserve the user's decisions without conversational noise. Use for "adr-verbatim", "new ADR", "document that as an ADR", "record this decision", or supplied ADR wording.

Other628

Github Outside Sandbox

4.3k

davidondrej/skills

Run Git and GitHub CLI commands on the host when sandboxing blocks Keychain auth, network access, or .git writes. Use for gh auth, repo/PR operations, index.lock, or permission errors; covers execution context only.

Git & Code Review628

Fable Review

4.3k

davidondrej/skills

Launch an independent Fable code review and return it verbatim. Use for /fable-review, or when the user or another agent asks for a Fable review.

Git & Code Review628

Kimi Review

4.3k

davidondrej/skills

Launch an independent Kimi K3.1 Pro Max code review and return it verbatim, falling back across harnesses and routes until one works. Use for /kimi-review, or when the user or another agent asks for a Kimi review.

Git & Code Review628

Browse the most popular Claude skills, all git & code review skills, or write your own with the skills generator.