worktree-kit
Streamline git worktree management to handle parallel feature development and isolated workspace tasks.
Install
mkdir -p .claude/skills/worktree-kit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1315" && unzip -o skill.zip -d .claude/skills/worktree-kit && rm skill.zipInstalls to .claude/skills/worktree-kit
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Manage git worktrees (create/list/switch/cleanup) and copy .env files. Use for parallel feature work, isolated review, clean workspace, or when user mentions worktrees.Key capabilities
- →Create new git worktrees
- →List existing worktrees
- →Switch between worktree directories
- →Cleanup unused worktrees
- →Synchronize .env files across worktrees
How it works
The script wraps standard git worktree commands to manage directory creation and environment file copying within a hidden .worktrees/ folder.
Inputs & outputs
When to use worktree-kit
- →Working on multiple features in parallel
- →Isolating review environments
- →Cleaning up old git worktrees
- →Syncing environment variables across worktrees
About this skill
Worktree kit
Use the manager script for all worktree actions.
bash "${CODEX_HOME:-$HOME/.codex}/scripts/worktree.sh" <command> [args]
Commands:
create <name> [base]listswitch <name>(prints the worktree path; it cannot change your shell's directory - usecd "$(... switch <name>)")cleanup [<name>...] [--yes](no args = interactive; names skip the prompt;--yesskips the confirmation, required off a terminal)copy-env <name>
Safety notes:
createdoes not change the current branchcreatesets no upstream on the new branch (--no-track) - under the upstream-based push modes (simple,upstream,current) a baregit pushcannot aim at the base branch; under the defaultpush.default=simple(withoutpush.autoSetupRemote) the first push needsgit push -u origin <name>(legacypush.default=matchingpushes all name-matched branches regardless of upstream)cleanupdoes not force-remove worktrees and does not delete branchescleanupdeletes the worktree directory (including ignored files); removal fails if the worktree is not clean.env*is copied with no overwrite (symlinks skipped)- refuses to operate if
.worktrees/or any worktree path component is a symlink copy-envonly targets registered worktreesoriginfetch is optional; local base refs are allowed- fetch from
originonly when base looks like a branch - Worktrees live under
.worktrees/ createinitializes.worktrees/.gitignore(*plus!.gitignore) when absent, sogit add -Acannot stage nested worktrees as gitlinks; existing custom ignore files are preserved
When not to use it
- →When the worktree directory is not clean
- →When using symlinks for worktree paths
Prerequisites
Limitations
- →Cleanup fails if the worktree is not clean
- →Refuses to operate if paths contain symlinks
- →Only targets registered worktrees for environment sync
How it compares
It automates the boilerplate of managing parallel branches and environment synchronization, which is typically done manually with git commands.
Compared to similar skills
worktree-kit side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| worktree-kit (this skill) | 3 | 4mo | Review | Beginner |
| tmux | 20 | 2mo | Review | Intermediate |
| jira | 11 | 6mo | No flags | Beginner |
| triaging-issues | 5 | 2mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by gmickel
View all by gmickel →You might also like
tmux
openclaw
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
jira
davila7
Use when the user mentions Jira issues (e.g., "PROJ-123"), asks about tickets, wants to create/view/update issues, check sprint status, or manage their Jira workflow. Triggers on keywords like "jira", "issue", "ticket", "sprint", "backlog", or issue key patterns.
triaging-issues
pytorch
Triages GitHub issues by routing to oncall teams, applying labels, and closing questions. Use when processing new PyTorch issues or when asked to triage an issue.
file-manager
Xxiii8322766509
文件管理技能。用于创建、移动、复制、删除文件和文件夹,整理目录结构。当用户需要管理文件、整理文件夹或批量处理文件时使用。
openspec-archive-change
studyzy
归档实验性工作流中已完成的变更。当用户想要在实现完成后最终确定并归档变更时使用。
slash-commands
parcadei
Create and use Claude Code slash commands - quick prompts, bash execution, file references