merge
БесплатноБез исполняемых скриптовНе проверенFinish a Herdr worktree by committing, rebasing, merging, and cleaning it up. Use only when the user explicitly invokes /merge or asks to merge the current…
от dkarter★ 130 звёзд на GitHubОб этом скилле
Arguments: $ARGUMENTS
This skill performs the complete merge workflow. A request to commit, stage, or save changes without rebasing and merging is outside this skill; handle it as a normal Git operation in the current checkout.
Check the arguments for flags:
--keep,-kkeeps the environment after merging. This is skill behavior; do not pass it tohwt remove.
Strip all flags from arguments.
Before committing or rebasing, require HERDR_ENV=1, load /hwt, and capture
hwt list --cwd "$PWD" --json. Require it to identify the current workspace as
a linked worktree whose path differs from source_checkout_path. Stop without
changing the repository if either requirement is not met.
Commit, rebase, and merge the current branch.
This command finishes work on the current branch by:
- Committing any staged changes
- Rebasing onto the base branch
- Merging and cleaning up with the backend that owns the worktree
Step 1: Commit
If there are staged changes, inspect the repository instructions and recent history to determine its commit convention. Repository-specific requirements take precedence. Use Conventional Commits when the repository requires them; otherwise use lowercase imperative mood without a prefix. Skip if nothing is staged.
Step 2: Rebase
Read the Herdr base-branch config:
git config --local --get "branch.$(git branch --show-current).herdr-base"
For a Herdr-owned worktree, require herdr-base. If it is missing, confirm the
intended base before merging rather than guessing.
Rebase onto the local base branch (do NOT fetch from origin first):
git rebase <base-branch>
IMPORTANT: Do NOT run git fetch. Do NOT rebase onto origin/<branch>. Only rebase onto the local branch name (e.g., git rebase main, not git rebase origin/main).
If conflicts occur:
- BEFORE resolving any conflict, understand what changes were made to each conflicting file in the base branch
- For each conflicting file, run
git log -p -n 3 <base-branch> -- <file>to see recent changes to that file in the base branch - The goal is to preserve BOTH the changes from the base branch AND our branch's changes
- After resolving each conflict, stage the file and continue with
git rebase --continue - If a conflict is too complex or unclear, ask for guidance before proceeding
Step 3: Merge
Reuse the ownership response captured before Step 1.
Reuse the captured response to read the source checkout path, source workspace ID, current workspace ID, worktree path, and branch. Before merging, verify that the source checkout is clean and currently on the base branch. Then fast-forward it to the rebased branch:
git -C <source-checkout> merge --ff-only <branch>
With --keep, stop here. Otherwise create a short-lived, unfocused helper pane
in the source workspace and have it remove the Herdr worktree, delete the merged
branch, and exit:
herdr pane split <source-pane-id> --direction down --cwd <source-checkout> --no-focus
herdr pane run <helper-pane-id> \
"hwt remove --workspace <worktree-workspace-id> --json && git branch -d <branch>; exit"
Parse both pane IDs from Herdr JSON responses. Do not target the focused pane or construct IDs. Run removal from the helper so cleanup can finish after the current workspace closes.
Установить merge в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadBashGlobGrepВложенные файлы
FAQ
Что делает скилл merge?
Finish a Herdr worktree by committing, rebasing, merging, and cleaning it up. Use only when the user explicitly invokes /merge or asks to merge the current branch. Never use for a commit-only request.
Как установить скилл merge?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл merge запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic