ianchesal/dotfiles/merge
Claude Code and agent skill by ianchesal/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Commit, rebase, and merge the current worktree branch, then remove its worktree and herdr workspace.
Install
npx vskill@latest install ianchesal/dotfiles/mergeSKILL.md
The same SKILL.md was published earlier as raine/workmux/merge.
Arguments: $ARGUMENTS
Check the arguments for flags:
--keep,-k→ merge, but keep the worktree, branch and herdr workspace--no-verify,-n→ pass--no-verifyto the commit and merge (skips git hooks)
Strip all flags from arguments.
This finishes work on the current branch by:
- Committing all uncommitted changes
- Rebasing onto the base branch
- Fast-forwarding the base branch to this branch
- Removing the worktree, the branch and this herdr workspace (unless
--keep)
Step 0: Where you are
If branch is empty (detached HEAD) or path equals root (you are in the main checkout, not a worktree), stop and tell the user: this skill merges a worktree branch into its base.
Step 1: Commit
Check for staged, unstaged, and untracked changes with git status --porcelain. If there are any, stage them all with git add -A, review the staged diff, and commit. Use lowercase, imperative mood, no conventional-commit prefixes. Never commit a STATUS.md. Skip this step if the working tree is clean.
Step 2: Rebase
Find the base branch, first match wins:
Rebase onto the local base branch (do NOT fetch from origin first):
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 base branch's changes AND this 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
Fast-forward the base branch. Where it is checked out decides how:
- Checked out in the main checkout (
root):
git -C "$root" merge --ff-only [--no-verify] "$branch"
- Not checked out anywhere:
git -C "$root" fetch . "$branch:<base-branch>"
(moves the ref, fast-forward only)
- Checked out in another worktree: stop and ask the user. Don't touch
someone else's checkout.
If the fast-forward is refused, the base branch moved since the rebase: go back to Step 2. If the main checkout has uncommitted changes in the way, stop and ask.
Then, if HERDR_ENV is 1, tell the user it landed:
With --keep, stop here and report what was merged.
Step 4: Clean up
Everything below runs from the main checkout, because this worktree is about to be deleted. Closing the herdr workspace ends this session, so it goes last.
Never pass --force to either. If worktree remove refuses (untracked or ignored files left behind), list them and ask the user. branch -d cannot fail after a successful fast-forward. If it does, stop and report.
Before closing the workspace, report what was merged (branch, base, commits) in your reply: once the workspace closes, nothing more can be said. Then close it only if it really is this worktree's workspace:
If the check fails, leave the workspace open and say so.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinghome/dot_claude/skills/merge/SKILL.md
Popularity
- Repository stars
- 56
- Repository forks
- 3
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ianchesal/dotfiles/merge)