/agenthub:mergefrom agenthub
Merges the winning AgentHub branch into the base branch, archives losing branches as git tags, and cleans up worktrees.
Ships in agenthub. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Merge the best agent's branch into the base branch, archive losing branches via git tags, and clean up worktrees.
/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
If --agent specified, use that. Otherwise, use the #1 ranked agent from the most recent /agenthub:eval.
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}"
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
python {skill_path}/scripts/session_manager.py --cleanup {session-id}
Write .agenthub/board/results/merge-summary.md:
---
author: coordinator
timestamp: {now}
channel: results
---
## Merge Summary
- **Session**: {session-id}
- **Winner**: {winner}
- **Merged into**: {base_branch}
- **Archived**: {loser-1}, {loser-2}, ...
- **Worktrees cleaned**: {count}
python {skill_path}/scripts/session_manager.py --update {session-id} --state merged
--no-ff for clear historyTell the user:
{base_branch}hub/archive/{session-id}/agent-{N}mergedWhat SKILL.md sets; muted values are Claude Code's defaults
8 skills in this plugin
/agenthubRun several agents on one task in parallel and keep the best result: faster code, copy variants, research angles. Use whenever the user wants multiple attempts compared or best of N; spawns agents in git worktrees, ranks and merges the winner./boardUse to post or read messages on the AgentHub coordination board between competing agents./evalRank finished AgentHub agents by metric or judge. Use when asked which agent won./hub-initUse for /hub-init, or to start an AgentHub competition: task, agent count and evaluation criteria./hub-runUse for /hub-run, or to run a whole AgentHub competition end to end: init, baseline, spawn, eval and merge./hub-statusUse for /hub-status, or to check AgentHub agent progress, branches and DAG state.npx claudepluginhub alirezarezvani/claude-skills --plugin agenthubOther plugins' skills for the same job