Handles Git merge operations programmatically, which is exactly what you need when you're automating workflows that involve combining branches. You'd reach for this when building CI/CD pipelines, managing release processes, or any scenario where manual git commands aren't practical. The real value is in letting Claude handle merge conflicts and branch management without dropping into a terminal. Works well for straightforward merges, though you'll want to review the output carefully since merge conflicts can get messy. Good fit if you're building automation around version control workflows.

skills.sh installs
1.4K
GitHub stars
29.5K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/alirezarezvani/claude-skills
Categories
Git & Pull Requests, AI & Agent Building
First seen
Apr 16, 2026

More from alirezarezvani/claude-skills

All 267
1dimillian avatarapp-store-changelogdimillian/skillsCreate user-facing App Store release notes by collecting and summarizing all user-impacting changes since the last git tag (or a specified ref). Use when asked 1.4Kskills.sh installs
2jezweb avatargit-workflowjezweb/claude-skillsGuided git workflows: prepare PRs, clean up branches, resolve merge conflicts, handle monorepo tags, squash-and-merge patterns. Use when asked to prepare a PR, 1.2Kskills.sh installs
3neolabhq avatarcreate-prneolabhq/context-engineering-kitCreate pull requests using GitHub CLI with proper templates and formatting1.2Kskills.sh installs
4vkehfdl1 avatarstart-issuevkehfdl1/marshroomStart working on a Marshroom cart issue — creates branch, injects context, updates status to running1.2Kskills.sh installs
5neolabhq avatarattach-review-to-prneolabhq/context-engineering-kitAdd line-specific review comments to pull requests using GitHub CLI API1.2Kskills.sh installs
6tirth8205 avatarreview-deltatirth8205/code-review-graphReview only changes since last commit using impact analysis. Token-efficient delta review with automatic blast-radius detection.1.2Kskills.sh installs