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
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full landing flow: identify the winner, --no-ff merge into base, archive losers, clean worktrees, and record state
  • Includes a merge summary written to .agenthub/board/results/merge-summary.md with 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:eval ranking has already chosen a winning agent branch

Install

$ npx -y skills add alirezarezvani/claude-skills --skill merge -y

Installs 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

Similar to Merge

More Git & Releases