Guide · Agent skill
How to use the Git Worktree Isolation agent skill (ce-worktree)
Updated · written with AI from the project's own documentation and checked against our catalogue data
The ce-worktree skill is an agent skill that makes a coding agent do its work in an isolated copy of your git repository, instead of editing your main project folder directly. This guide explains what the skill does, how to install it, how to ask for it, and what it needs from your system. By the end you will be able to set it up, trigger it, and recognise what it reports back.
Quick start
- 1Download the ZIP. Download the ce-worktree ZIP from this page. It contains SKILL.md.
- 2Unzip into a skills folder. Unzip into ~/.claude/skills/ for all projects, or into a project's .claude/skills/ for one project.
- 3Or upload in the Claude apps. In the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
- 4Confirm git is ready. Make sure git is installed and that you are working inside a git repository.
- 5Describe the work in plain language. Ask for a new isolated workspace, or name a branch, PR, or commit you want isolated.
- 6Check the reported path and branch. When the agent finishes, note the worktree path and branch it reports before editing anything.
What the ce-worktree skill makes the agent do
Coding agents often edit code directly in your main project folder. This skill first checks whether the agent is already working in an isolated copy of the project, which is a git worktree: a second working folder linked to the same repository. If it is not isolated, the skill creates a new worktree on a fresh, meaningfully named branch, or attaches one to an existing branch, pull request, or commit.
The skill then reports the path and branch where it is working. It prefers the coding tool's built-in worktree feature and only falls back to plain git commands when no native tool exists.
- Detects whether the session is already isolated before creating anything
- Creates a new branch with a descriptive name such as feat/login or fix/email-validation
- Attaches a worktree to an existing branch, tag, pull request, or commit
- Reports the worktree path and branch when finished
Install the ce-worktree skill
Download the ZIP for this skill from this page. It contains the skill file SKILL.md. Choose one of the following locations.
For a personal install available across your projects, unzip the download into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder so it applies only there.
In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.
- Personal: ~/.claude/skills/
- Project only: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Trigger the skill with natural requests
You do not need a special command. Describe the work in plain language when you start a task, and the agent will use the skill when the request matches its purpose: starting isolated work, or isolating an existing ref.
For a new piece of work, ask for a separate workspace. For an existing pull request, branch, or commit, name it so the agent can attach a worktree to it.
- "Start this login feature in an isolated worktree so my main checkout stays untouched."
- "Set up a separate worktree for the email validation fix."
- "Check out PR 42 in its own worktree so I can fix review comments without changing my branch."
- "Isolate branch release-2.1 in a worktree."
What it needs and how it runs
The skill requires git. It must run inside a git repository. The source says the skill expects an origin remote but continues without one, so a local-only repository still works. The GitHub CLI (gh) is referenced for one pull request path.
The skill runs scripts and uses the network. It may run git commands such as fetching from origin, and it can add a .worktrees/ line to your .gitignore file if that entry is missing.
- git installed and available on your PATH
- A git repository (not required to have an origin remote)
- GitHub CLI (gh) for the PR checkout path that uses gh pr checkout
Safety notes: scripts and network access
The skill runs scripts and makes network calls, so review it before installing, as you would with any skill. The skill's own rules limit what it does. It never creates a worktree the harness cannot see, and it does not proceed in your current checkout if git reports a permission error while creating a worktree.
Creating a worktree may add a .worktrees/ entry to .gitignore. Newly created folders and branches will appear in your project, which is expected behaviour but can surprise people new to git.
- Review SKILL.md before installing.
- Expect a fetch from origin before the worktree is created; this step is non-fatal.
- Expect a .worktrees/ folder and possibly a .gitignore change.
- If permission fails, the agent reports the failure and asks you rather than retrying elsewhere.
Tips for getting good results
Name the pull request or branch explicitly when you want to review or fix existing work, so the agent attaches to the right ref. Check the reported path before you open files, because the agent works in the new folder rather than your main checkout.
A branch can be checked out in only one worktree at a time. If the branch is already open in your main checkout, the agent will report that instead of creating a second worktree, and you can decide how to proceed.
- Give the ref name or PR number in your request
- Read the reported path and branch before continuing
- Remember that a branch can live in only one worktree at a time
git worktree add -b <branch-name> .worktrees/<branch-name> origin/<from-branch>What people use it for
- Starting a new feature on a fresh branch while your main checkout stays on your current work
- Reviewing or fixing an existing pull request without switching your current branch
- Running several agent tasks on the same repository at once, each in its own worktree
- Isolating an older release branch to check something without disturbing your current branch
Frequently asked questions
How do I install the ce-worktree skill?
Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills.
What do I need to use the ce-worktree skill?
You need git and a git repository. The source says the skill expects an origin remote but continues without one. The GitHub CLI (gh) is referenced for one pull request checkout path.
Is the ce-worktree skill free?
The skill is published under the MIT licence, as listed on this page. This page does not state pricing for any other service you may use with it.
Does the skill work in a project that is not a git repository?
No. Worktrees require git, so the skill is not suitable for projects that are not git repositories.
Why did the agent say the branch is already checked out?
Git allows a branch to be checked out in only one worktree at a time. If the branch is already the current branch of your main checkout, the skill reports its path and does not create a second worktree for it.
How is this different from just letting the agent edit my current branch?
This skill deliberately avoids editing your current branch in place. It places work in a separate worktree so your main checkout is not disturbed, which suits people running several tasks or reviewing pull requests at once.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use ce-worktree if you want an agent's work kept separate from your main checkout, or you are reviewing or fixing a pull request without disturbing your current branch. Pick something else if your project is not a git repository, if you want the agent to edit your current branch directly, or if new branches and folders appearing in your project would confuse you.
Download the skill