Merge skill for Claude

Use to land the winning AgentHub branch, archive the others and clean up worktrees.

Merge SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

/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

python {skill_path}/scripts/session_manager.py --cleanup {session-id}

5. Post Merge Summary

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}

6. Update State

python {skill_path}/scripts/session_manager.py --update {session-id} --state merged

Safety

  • Confirm with user before merging — show the diff summary first
  • Never force-push — merge is always --no-ff for clear history
  • Archive, don't delete — losing agents' commits are preserved via tags
  • Clean worktrees — don't leave orphan directories on disk

After Merge

Tell the user:

  • Winner merged into {base_branch}
  • Losers archived with tags hub/archive/{session-id}/agent-{N}
  • Worktrees cleaned up
  • Session state: merged

How to install Merge

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/engineering/agenthub/skills/merge#main ~/.claude/skills/merge

Codex

npx degit alirezarezvani/claude-skills/engineering/agenthub/skills/merge#main ~/.codex/skills/merge

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Merge skill do?

Use to land the winning AgentHub branch, archive the others and clean up worktrees.

+How do I install Merge in Claude Code?

Copy the skill folder into ~/.claude/skills/merge, for example with "npx degit alirezarezvani/claude-skills/engineering/agenthub/skills/merge#main ~/.claude/skills/merge". Claude Code loads it automatically and uses it when a task matches.

+Does Merge work with ChatGPT or Codex?

Yes. Merge uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/merge. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Merge free?

Merge is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related software development skills

  1. Code Review

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's…

    mattpocock/skills★ 327k
  2. Using Agent Skills

    Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of…

    addyosmani/agent-skills★ 119k
  3. Build

    Fully automate a coding task with make-plan, do, and babysit.

    thedotmack/claude-mem★ 118k
  4. Mobile Release

    Use when shipping an iOS or Android app update to the App Store or Google Play - Apple or Google rejected or warned about a build…

    alirezarezvani/claude-skills★ 30k
  5. Monorepo Navigator

    Use for Turborepo, Nx, pnpm-workspace or Lerna setup, affected-only builds, remote caching or a multi-repo to monorepo move.

    alirezarezvani/claude-skills★ 30k
  6. Ms365 Tenant Manager

    Use for Microsoft 365 tenant administration (Entra ID users, Exchange Online, Teams, licenses, Conditional Access, compliance reports).

    alirezarezvani/claude-skills★ 30k
  7. Partnerships Architect

    Use when deciding whether to sign a partner, at which tier (referral, reseller, OEM, SI, alliance), with what joint GTM and revshare.

    alirezarezvani/claude-skills★ 30k
  8. Performance Profiler

    Use for a slow endpoint, memory leak, CPU spike, large bundle or performance budget in Node.js, Python or Go, before optimizing.

    alirezarezvani/claude-skills★ 30k
  9. Quality Documentation Manager

    Use for QMS document control: numbering, versioning, change control or 21 CFR Part 11 e-signatures.

    alirezarezvani/claude-skills★ 30k

See all software development skills →

More skills from alirezarezvani

  1. Meta Research

    Use when a wrong answer is expensive: strategy research, comparing several products or markets, validating a hypothesis with outside data.

    alirezarezvani/claude-skills★ 30k
  2. Migrate

    Use when moving tests from Cypress or Selenium to Playwright ('migrate tests', 'convert tests', 'replace selenium').

    alirezarezvani/claude-skills★ 30k
  3. Migration Architect

    Plan a migration with zero or minimal downtime: phased plan, compatibility check, rollback scripts, for schemas, databases and services.

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.