Merge the winning agent's branch, archive losing branches as git tags, and clean up worktrees.
- CCM score
- 76 of 100
- skills.sh installs
- 1.4K
- GitHub stars
- 30.3K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers the full landing flow: identify the winner,
--no-ffmerge into base, archive losers, clean worktrees, and record state - Includes a merge summary written to
.agenthub/board/results/merge-summary.mdwith winner, archived agents, and worktree count - Enforces confirmation with the user and a diff summary before merging, plus no force-push and tag-based archiving
- Designed for AgentHub sessions where a
/agenthub:evalranking has already chosen a winning agent branch
Install
$ npx -y skills add alirezarezvani/claude-skills --skill merge -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
/agenthub:merge — Merge Winner
Merge the best agent's branch into the base branch, archive losing branches via git tags, and clean up worktrees.
Usage
/agenthub:merge # Merge winner of latest session
/agenthub:merge 20260317-143022 # Merge winner of specific session
/agenthub:merge 20260317-143022 --agent agent-2 # Explicitly choose winner
What It Does
1. Identify Winner
If --agent specified, use that. Otherwise, use the #1 ranked agent from the most recent /agenthub:eval.
2. Merge Winner
git checkout {base_branch}
git merge --no-ff hub/{session-id}/{winner}/attempt-1 \
-m "hub: merge {winner} from session {session-id}
Task: {task}
Winner: {winner}
Session: {session-id}"
3. Archive Losers
For each non-winning agent:
# Create archive tag (preserves commits forever)
git tag hub/archive/{session-id}/{agent-id} hub/{session-id}/{agent-id}/attempt-1
# Delete branch ref (commits preserved via tag)
git branch -D hub/{session-id}/{agent-id}/attempt-1
4. Clean Up Worktrees
Details
- Repository
- github.com/alirezarezvani/claude-skills
- Categories
- Git & Releases, Agent Workflow & Planning
- First seen
- Apr 16, 2026
More from alirezarezvani/claude-skills
All 259- Senior Security1.3K
- Social Media Manager1.3K
- Senior Qa1.2K
- Research Summarizer1.2K
- Senior Computer Vision1.2K
- Code Reviewer1.2K
- Grill Me1.2K
- Senior Data Engineer1.2K
- Ceo Advisor1.2K
- Ui Design System1.1K
- Financial Analyst1.1K
- Self Improving Agent1.1K
- Karpathy Coder1.1K
- Product Manager Toolkit1.1K
- Tdd Guide1K
- Gdpr Dsgvo Expert1K
- A11y Audit1K
- Ux Researcher Designer1K
- Senior Prompt Engineer999
- Senior Data Scientist991
- Agile Product Owner957
- Senior Ml Engineer954
- Content Creator944
- Cto Advisor938
Similar to Merge
More Git & Releases
agenthubSkillalirezarezvani/claude-skills606 installsParallel agents compete on one task in git worktrees, and the best branch is merged.
finishing-a-development-branchSkillobra/superpowers234.4K installsGuided branch-completion workflow that verifies tests, then offers merge, PR, or keep options.
evalSkillalirezarezvani/claude-skills1.4K installsRank finished AgentHub agents by metric or LLM judge to pick a session winner.
standupSkillthedotmack/claude-mem3.8K installsFacilitated multi-agent standup that reconciles git worktrees and PRs into one consolidation plan.
pr-draft-summarySkillopenai/openai-agents-python237 installsPrepares a PR-ready branch name, title, and draft description after eligible repository changes complete.
GitwandMCP serverdevlint199 starsAuto-resolves Git merge conflicts and gives agents access to the remaining complex hunks.
