Merge the winning agent's branch into the base branch, archive losing branches via git tags, and clean up worktrees. It produces a merge summary and updates the session state.

✨ What it does

  • Identifies the winning agent from the latest /hub:eval or via --agent flag.
  • Merges the winner's branch into the base branch with --no-ff.
  • Archives losing branches by creating git tags and deleting branch refs.
  • Cleans up worktrees using session_manager.py.
  • Writes a merge summary to .agenthub/board/results/merge-summary.md.
  • Updates session state to 'merged'.

🎯 When to use it

  • After an AgentHub evaluation has selected a winner and you want to land the result.
  • When you need to archive losing agent branches while preserving their commits.
  • When you want to clean up worktrees left from an AgentHub session.

🚀 How to use

Trigger: /hub:merge

Trigger with the slash command /hub:merge or by asking to merge the winning AgentHub result. Optionally specify a session ID and winner agent. Example prompts:

/hub:merge
/hub:merge 20260317-143022 --agent agent-2

📄 Output: A merge summary file and updated session state, with the winner merged and losers archived.

📦 Add this skill to Claude Code

# 1. Get the skills repo
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills

# 2. Copy this skill into your project (or ~/.claude/skills for all projects)
mkdir -p .claude/skills
cp -r /tmp/claude-skills/engineering/agenthub/skills/merge .claude/skills/merge

Skill source: engineering/agenthub/skills/merge/SKILL.md

⚠️ Good to know

Requires an existing AgentHub session with evaluated agents and a base branch; the skill will confirm with the user before merging.

❓ FAQ

How does the skill determine the winner?

It uses the --agent flag if provided; otherwise, it uses the #1 ranked agent from the most recent /hub:eval.

What happens to losing agents' branches?

They are archived by creating git tags (hub/archive/{session-id}/{agent-id}) and then deleting the branch refs, preserving commits via tags.

Does the skill force-push?

No, it never force-pushes; merges are always --no-ff for clear history.

🤖 Overview, features, install steps and FAQ were generated from the project's SKILL.md on Sep 4, 2026. Always check the original source before running commands.