Agent skill
git-worktrees
Manage git worktrees for parallel development. Use when user mentions worktrees, parallel branches, or working on multiple branches simultaneously.
Install this agent skill to your Project
npx add-skill https://github.com/yurifrl/cly/tree/main/.claude/skills/git-worktrees
SKILL.md
Git Worktrees
Work on multiple branches simultaneously without stashing or switching.
Worktree Location
All worktrees live in .worktrees/ at repo root.
project/
├── .worktrees/
│ ├── feat-auth/
│ └── fix-login/
└── (main working tree)
Naming Convention
Worktree folder matches branch name pattern:
| Branch | Worktree Folder |
|---|---|
yurifrl/feat/auth |
.worktrees/feat-auth |
yurifrl/fix/login-bug |
.worktrees/fix-login-bug |
hotfix/urgent |
.worktrees/hotfix-urgent |
Pattern: Take the last two segments, join with hyphen.
Commands
Create Worktree
# New branch
git worktree add .worktrees/<folder> -b <branch-name>
# Existing branch
git worktree add .worktrees/<folder> <existing-branch>
List Worktrees
git worktree list
Remove Worktree
git worktree remove .worktrees/<name>
Prune Stale
git worktree prune
Workflow
- Create worktree for feature/fix work
- Each worktree is independent (own node_modules, build cache, etc.)
- Remove worktree when branch is merged
- Run
git worktree pruneto clean up stale references
Tips
- Worktrees share the same
.git- commits are visible everywhere - Don't forget to install dependencies in new worktree
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ag:changelog
Generates and updates project CHANGELOG.md from git commits, conversation decisions, and architectural changes. Auto-invoke this skill when new features are added, features are removed, or architecture changes occur.
prompt-engineering
Prompt engineering reference and workflow for creating, refining, and reviewing high-quality prompts for AI tools, agents, and skills.
ag:claudemd-update
Updates CLAUDE.md based on recent conversation history. This skill should be used when the user asks to update their CLAUDE.md, sync learnings from conversations, or review what was discussed recently.
write-skill
Create Claude Code skills with proper structure and documentation. Use when building custom skills, writing SKILL.md files, or when user asks "write a skill" or "create Claude skill".
add-module
Create new demo or utility modules following CLY project patterns. Use when adding TUI demonstration modules to modules/demo/ or utility modules to modules/, following Bubbletea/Bubbles conventions with proper Cobra CLI integration.
git-worktrees
Manage git worktrees for parallel development. Use when user mentions worktrees, parallel branches, or working on multiple branches simultaneously.
Didn't find tool you were looking for?