Agent Skill
2/7/2026gitworktree-skill
Manage Git worktrees with ga/gd helpers to create, switch, and clean isolated branches quickly.
L
lixvyang
0GitHub Stars
1Views
npx skills add LixvYang/gitworktree-skill
SKILL.md
| Name | gitworktree-skill |
| Description | Manage Git worktrees with ga/gd helpers to create, switch, and clean isolated branches quickly. |
name: gitworktree-skill description: Manage Git worktrees with ga/gd helpers to create, switch, and clean isolated branches quickly. metadata: short-description: Fast git worktree workflow
Git Worktree Quick Workflow
When to Use
Use this skill when you need isolated development for a feature, fix, or experiment and want to avoid frequent branch switching.
Commands
If ga/gd are not available, install the helper functions from
scripts/worktree_helpers.sh and then use the commands below.
# Create worktree + branch and cd into it
ga <branch-name>
# Delete current worktree (requires gum for confirmation)
gd
# List all worktrees
git worktree list
Recommended Flow
- Pick a branch name:
feature/<short-desc>fix/<short-desc>experiment/<short-desc>
- Create the worktree:
ga feature/<short-desc>
- Do the work in the new directory.
- Clean up after merge or abandon:
gd
Guardrails
- Only run
gdinside a worktree directory to avoid deleting the main repo. - If
gdfails, install gum:brew install gum. - If a branch already exists, choose a new name or delete the old branch first.
Install helpers (if needed)
# From this repo root
source scripts/worktree_helpers.sh
Add the source line to your shell profile (e.g. ~/.zshrc) to make ga/gd available.
Example:
echo 'source /path/to/gitworktree-skill/scripts/worktree_helpers.sh' >> ~/.zshrc
Dependencies
gumis required forgdconfirmation prompts.miseis optional and auto-trusts new worktree directories.
Skills Info
Original Name:gitworktree-skillAuthor:lixvyang
Download