using-git-worktrees skill
Creates and manages isolated Git worktrees for parallel agents, risky experiments, or long-running feature work while preserving the user's current checkout. Use before concurrent branch edits or when isolation makes rollback safer. Not for a trivial one-file change that is already isolated.
- GitHub stars
- 100
- Files
- 1
- Last commit
- Aug 26, 2026
- License
- MIT
- Allowed tools
- —
What does the using-git-worktrees skill do?
using-git-worktrees creates and manages isolated Git worktrees for parallel agents, risky experiments, or long-running feature work while preserving the user's current checkout. Use before concurrent branch edits or when isolation makes rollback safer. Not for a trivial one-file change that is already isolated.
How to install the using-git-worktrees skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the using-git-worktrees skill in Plugin
/plugin marketplace add thiientv/godmode /plugin install godmode@godmode
Install the using-git-worktrees skill in Claude Code
~/.claude/skills/using-git-worktrees/SKILL.md
$ npx degit thiientv/godmode/skills/using-git-worktrees ~/.claude/skills/using-git-worktreesInstall the using-git-worktrees skill in Claude Code (project)
.claude/skills/using-git-worktrees/SKILL.md
$ npx degit thiientv/godmode/skills/using-git-worktrees .claude/skills/using-git-worktreesInstall the using-git-worktrees skill in Codex
~/.agents/skills/using-git-worktrees/SKILL.md
$ npx degit thiientv/godmode/skills/using-git-worktrees ~/.agents/skills/using-git-worktreesInstall the using-git-worktrees skill in Gemini CLI
~/.gemini/skills/using-git-worktrees/SKILL.md
$ npx degit thiientv/godmode/skills/using-git-worktrees ~/.gemini/skills/using-git-worktreesInstall the using-git-worktrees skill in Claude.ai
npx degit thiientv/godmode/skills/using-git-worktrees using-git-worktrees && zip -r using-git-worktrees.zip using-git-worktrees # claude.ai → Customize → Skills → + → Create skill → Upload a skill → using-git-worktrees.zip
SKILL.md
View on GitHubUsing Git Worktrees
Isolation is a safety boundary, not a way to hide unreviewed changes.
Before creating one
- Inspect
git status, current branch, repository root, and existing worktrees. - Preserve uncommitted user work; never reset, checkout, or clean it away.
- Choose an explicit branch name and a worktree path outside the main working tree when practical.
- Confirm the base ref and whether ignored/generated files are needed.
Create safely
git worktree list
git worktree add ../<repo>-<task> -b <task-branch> <base-ref>
Run repository setup in the new worktree, record the exact base commit, and keep secrets and local environment files out of the branch. Do not use the same worktree for two writers.
Finish or discard
- Review and test the branch before integrating it.
- Merge or cherry-pick only the intended commits after checking the diff.
- Remove a disposable worktree only after confirming its commits and needed artifacts are preserved:
git worktree remove ../<repo>-<task>
git worktree prune
Do not force removal when it contains unreviewed work. If a worktree is stale, inspect its branch and status before deciding whether it is recoverable.
Completion condition
The branch's base, ownership, integration path, and cleanup decision are explicit; the main checkout remains intact.
Files in this skill
1using-git-worktrees skill questions
How do I install the using-git-worktrees skill in Claude Code?
Run npx degit thiientv/godmode/skills/using-git-worktrees ~/.claude/skills/using-git-worktrees. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the using-git-worktrees skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.