본문으로 건너뛰기
Skillpedia
에이전트29k · #9534

merge

하는 일

이 스킬은 여러 에이전트 세션에서 가장 좋은 결과를 반영하고 나머지를 정리합니다. 프로젝트에 우승 코드만 남기고 남은 브랜치를 없애고 싶은 사람에게 맞습니다.

사용하는 경우

  • ✓여러 에이전트 세션이 끝나서 우승한 결과를 남기고 싶을 때.
  • ✓지는 시도는 남기되 브랜치를 어지럽히고 싶지 않을 때.
  • ✓세션에서 만든 임시 워크트리를 정리하고 싶을 때.

스킬 링크

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/merge/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/merge/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“최신 세션에서 우승한 에이전트를 병합하고, 나머지 시도는 보관해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트가 우승자를 고르고, 그 브랜치를 기준 브랜치에 병합하고, 진 브랜치마다 태그로 보관한 뒤 임시 워크트리를 삭제합니다. 결과 채널에 병합 요약도 씁니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

/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
자주 묻는 질문

진 시도는 삭제되나요?

브랜치는 삭제되지만, 커밋은 보관 태그에 남습니다.

우승자를 직접 고를 수 있나요?

네. 순위 1위 대신 특정 에이전트를 지정해 병합할 수 있습니다.

병합 요약은 어디에 저장되나요?

에이전트 메시지 보드의 결과 채널에 기록됩니다.

상세 정보

작성자의 원본 설명

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

repo: alirezarezvani/claude-skills

인기도

GitHub 스타
29k
순위
#9534
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬