worktree-merge
Merge a worktree branch into main, remove the worktree, and delete the branch. Use when done with a worktree and ready to integrate or discard the work.
от incubateur-ademe★ 45 звёзд на GitHub
Установить worktree-merge в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Worktree Cleanup
Merge a completed worktree branch into main, remove the worktree directory, and delete the branch.
Instructions
Step 1: List active worktrees
Run git worktree list and parse the output to find all worktrees except the main one.
If there are no worktrees to clean up, tell the user and stop.
Step 2: Ask user which worktree to clean up
Use the AskUserQuestion tool to present the list of active worktrees as options. Show the branch name and directory path in each option.
Step 3: Confirm merge strategy
Use AskUserQuestion to ask whether to:
- Merge into main — merge the branch into main before cleanup
- Remove only — just remove the worktree and branch without merging (for abandoned work)
Step 4: Execute cleanup
If merging:
# 1. Ensure we're on main and up to date
git checkout main
# 2. Merge the branch
git merge --ff-only <branch-name>
# 3. Remove worktree and delete branch
scripts/remove-worktree.sh <branch-name> --delete-branch
If removing without merge:
# Remove worktree and delete branch
scripts/remove-worktree.sh <branch-name> --delete-branch
Step 5: Report result
Show what was done: merged (if applicable), worktree removed, branch deleted.
Arguments
$ARGUMENTS
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash
FAQ
Что делает скилл worktree-merge?
Merge a worktree branch into main, remove the worktree, and delete the branch. Use when done with a worktree and ready to integrate or discard the work.
Как установить скилл worktree-merge?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл worktree-merge запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…