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.
Work with git worktrees for isolated parallel development. An agent skill from heyitsnoah/claudesidian.
$ npx skills add heyitsnoah/claudesidian --skill git-worktrees -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install heyitsnoah/claudesidian git-worktrees --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/heyitsnoah/claudesidian.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/git-worktrees .claude/skills/git-worktrees && rm -rf skills-srcUse ~/.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/
Install the "git-worktrees" agent skill from https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/git-worktrees into .claude/skills/git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-worktrees", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/git-worktreesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add heyitsnoah/claudesidian --skill git-worktrees -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install heyitsnoah/claudesidian git-worktrees --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/heyitsnoah/claudesidian.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/git-worktrees .agents/skills/git-worktrees && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "git-worktrees" agent skill from https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/git-worktrees into .agents/skills/git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-worktrees", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add heyitsnoah/claudesidian --skill git-worktrees -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install heyitsnoah/claudesidian git-worktrees --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/heyitsnoah/claudesidian.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/git-worktrees .cursor/skills/git-worktrees && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "git-worktrees" agent skill from https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/git-worktrees into .cursor/skills/git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-worktrees", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/heyitsnoah/claudesidian.git --path .agents/skills/git-worktrees--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add heyitsnoah/claudesidian --skill git-worktrees -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install heyitsnoah/claudesidian git-worktrees --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/heyitsnoah/claudesidian.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/git-worktrees .gemini/skills/git-worktrees && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "git-worktrees" agent skill from https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/git-worktrees into .gemini/skills/git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-worktrees", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install heyitsnoah/claudesidian git-worktreesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add heyitsnoah/claudesidian --skill git-worktrees -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/heyitsnoah/claudesidian.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/git-worktrees .github/skills/git-worktrees && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "git-worktrees" agent skill from https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/git-worktrees into .github/skills/git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-worktrees", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add heyitsnoah/claudesidian --skill git-worktrees -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install heyitsnoah/claudesidian git-worktrees --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/heyitsnoah/claudesidian.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/git-worktrees .opencode/skills/git-worktrees && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "git-worktrees" agent skill from https://github.com/heyitsnoah/claudesidian/tree/main/.agents/skills/git-worktrees into .opencode/skills/git-worktrees/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "git-worktrees", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
git-worktreesWork with git worktrees for isolated parallel development. An agent skill from heyitsnoah/claudesidian.
Git Worktrees is an agent skill from heyitsnoah/claudesidian. Work with git worktrees for isolated parallel development. Use when starting feature work in isolation, when need separate workspace without branch switching, or when cleaning up worktrees after PR merge.
Its SKILL.md is about 1.1k 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 licence is MIT.
Read from SKILL.md and the folder at commit 6c56f35. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
gitnpmghFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, npm and gh, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Git Worktrees loads about 1.1k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 241 words of instructions outside code blocks.
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.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
cp ../.env .env.localAutomated 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.
The full file from heyitsnoah/claudesidian at commit 6c56f35, republished under its MIT licence (© heyitsnoah). 241 words, ~1,101 tokens.
.claude/skills/git-worktrees/SKILL.md (or your agent's skills folder).Git worktrees create isolated workspaces sharing the same repository, allowing
work on multiple branches simultaneously without switching. Each worktree is a
separate directory with its own working tree, but they share the same .git
history.
| Action | Command |
|---|---|
| List worktrees | git worktree list |
| Create worktree | git worktree add <path> -b <branch> |
| Create from existing branch | git worktree add <path> <branch> |
| Remove worktree | git worktree remove <path> |
| Prune stale worktrees | git worktree prune |
# Create worktree with new branch
git worktree add .worktrees/my-feature -b feat/my-feature
# Or specify base branch
git worktree add .worktrees/my-feature -b feat/my-feature main# Check out existing remote branch
git worktree add .worktrees/pr-review origin/fix-bug
# Check out existing local branch
git worktree add .worktrees/hotfix hotfix/urgent-fixproject/
├── .git/ # Shared git history
├── .worktrees/ # Convention: keep worktrees here
│ ├── feature-a/ # First worktree
│ └── feature-b/ # Second worktree
└── src/ # Main worktree filesAfter creating a worktree, you typically need to:
cd .worktrees/my-feature
# Install dependencies
npm install # or pnpm install, yarn, etc.
# Copy any required env files
cp ../.env .env.local
# Verify setup
npm testNEVER remove a worktree with uncommitted changes without confirmation.
# Check for uncommitted changes first
git -C .worktrees/my-feature status --porcelain
# If empty, safe to remove
git worktree remove .worktrees/my-feature
# Delete the branch after merge (-d is safe, fails if not merged)
git branch -d feat/my-feature| PR Merged? | Uncommitted Changes? | Action |
|---|---|---|
| Yes | No | Safe to remove |
| Yes | Yes | Ask user - changes will be lost |
| No | No | Do NOT remove - work not preserved |
| No | Yes | Do NOT remove - active work |
# 1. Check if work is merged (if using GitHub)
gh pr list --head feat/my-feature --state merged
# 2. Check for uncommitted changes
git -C .worktrees/my-feature status --porcelain
# 3. Remove worktree (only if merged or confirmed with user)
git worktree remove .worktrees/my-feature
# 4. Delete branch
git branch -d feat/my-featureIf a worktree directory was deleted manually:
git worktree prune# Create worktree from PR branch
git fetch origin pull/123/head:pr-123
git worktree add .worktrees/pr-123 pr-123
# Review, test, then clean up
git worktree remove .worktrees/pr-123
git branch -D pr-123# Main work continues in project root
# Start new feature in worktree
git worktree add .worktrees/new-api -b feat/new-api
# Work on both simultaneously
code .worktrees/new-api # Opens new VS Code windowA branch can only be checked out in one worktree at a time:
# Find where branch is checked out
git worktree list
# Remove that worktree first, or use different branch# Force add if directory exists but isn't a worktree
git worktree add --force <path> <branch>If a worktree is locked (prevents accidental removal):
# Unlock it
git worktree unlock <path>
# Then remove
git worktree remove <path>© heyitsnoah, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/git-worktrees of heyitsnoah/claudesidian.
Open the folder on GitHubat commit 6c56f35
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Git Worktrees this skillheyitsnoah/claudesidian | 2.6k | — | ~1.1k | Automated safety check: Notes | MIT | |
| Git Worktree IsolationjnMetaCode/superpowers-zh | 8.3k | 1 repos | ~982 | Automated safety check: Pass | MIT | |
| WorktreeAgentsMesh/AgentsMesh | 2.4k | — | ~553 | Automated safety check: Notes | Custom licence | |
| Cursor Composer Task DelegateChachamaru127/claude-code-harness | 3.2k | — | ~4.4k | Automated safety check: Notes | MIT | |
| Git Worktree Setupk8zdev/k8z | 155 | — | ~930 | Automated safety check: Pass | None | |
| New Featuremichaelshimeles/skills | 1.3k | 1 repos | ~699 | Automated safety check: Pass | None |
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.
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.
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.
k8zdev/k8z
Automate git worktree creation and copy private files (not tracked in git) to new workdirs.
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.
vaayne/mori
Use Mori CLI to enable agent-to-agent communication and coordination across Mori-managed panes.
heyitsnoah/claudesidian
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections.
heyitsnoah/claudesidian
Add or update YAML frontmatter properties to enhance Obsidian note organization.
heyitsnoah/claudesidian
Remove AI-generated jargon and restore human voice to text. An agent skill from heyitsnoah/claudesidian.
heyitsnoah/claudesidian
Download files from URLs to the Obsidian attachments folder and organize them with descriptive names.
heyitsnoah/claudesidian
Install claudesidian shell command to launch Claude Code from anywhere.
heyitsnoah/claudesidian
Interactive pragmatic code review focusing on YAGNI and KISS principles.
Works with
Categories
Work with git worktrees for isolated parallel development. An agent skill from heyitsnoah/claudesidian. Git Worktrees is an agent skill from heyitsnoah/claudesidian. Work with git worktrees for isolated parallel development.
Git Worktrees fits situations like: starting feature work in isolation; need separate workspace without branch switching; cleaning up worktrees after PR merge.
Run `npx skills add heyitsnoah/claudesidian --skill git-worktrees -a claude-code`. Or copy the skill folder (.agents/skills/git-worktrees in heyitsnoah/claudesidian) into .claude/skills/git-worktrees in your project. Claude Code loads it when a task matches its description.
Run `npx skills add heyitsnoah/claudesidian --skill git-worktrees -a codex`. Or copy the skill folder (.agents/skills/git-worktrees in heyitsnoah/claudesidian) into .agents/skills/git-worktrees in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add heyitsnoah/claudesidian --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.
Going by SKILL.md and its folder, Git Worktrees needs the command-line tools its instructions call (git, npm and gh). Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use git, npm and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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. Review the folder before installing.
Git Worktrees is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Git Worktrees: 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.
heyitsnoah (a GitHub user) maintains it in heyitsnoah/claudesidian, which has 2,597 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on April 11, 2026.
Source: heyitsnoah/claudesidian on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.