merge-worktree
Skill1 starsChanged 8 months agoMITView on GitHub
워크트리 브랜치를 main으로 squash-merge + conventional commit 자동 생성. codex-swarm 워크트리 자동 인식. '머지해', 'merge worktree', '워크트리 머지', '결과 수집', 'squash merge' 요청에 사용.
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- wonhp1/claude-skillstheir own version, first seen Oct 20, 2026
- techmefr/mentistheir own version, first seen Sep 11, 2026
- HyperAITeam/CLITriggertheir own version, first seen Apr 9, 2026
- codefactory-co/kimoring-ai-skillstheir own version, first seen Mar 17, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- codefactory-co/kimoring-ai-skills★ 245same name
- HyperAITeam/CLITrigger★ 14same name
- techmefr/mentis★ 0same name
- wonhp1/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- star-promptSkill
- tfx-analysisSkill
- tfx-auto-codexSkill
- tfx-autopilotSkill
- tfx-autoresearchSkill
- tfx-autorouteSkill
- tfx-autoSkill
- tfx-codexSkill
- tfx-codex-swarmSkill
- tfx-consensusSkill
- tfx-debateSkill
- tfx-deep-analysisSkill
- tfx-deep-interviewSkill
- tfx-deep-planSkill
- tfx-deep-qaSkill
- tfx-deep-researchSkill
- tfx-deep-reviewSkill
- tfx-doctorSkill
- tfx-findSkill
- tfx-forgeSkill
- tfx-fullcycleSkill
- tfx-geminiSkill
- tfx-hooksSkill
- tfx-hubSkill
- tfx-indexSkill
- tfx-interviewSkill
- tfx-multiSkill
- tfx-panelSkill
- tfx-persistSkill
- tfx-planSkill
- tfx-profileSkill
- tfx-pruneSkill
- tfx-psmux-rulesSkill
- tfx-qaSkill
- tfx-ralphSkill
- tfx-remote-setupSkill
- tfx-remote-spawnSkill
- tfx-researchSkill
- tfx-reviewSkill
- tfx-setupSkill
The file
Files
Merge Worktree
워크트리 브랜치를 대상 브랜치로 squash-merge하고 conventional commit 메시지를 자동 작성한다.
Current context
- Git dir:
!git rev-parse --git-dir - Current branch:
!git branch --show-current - Recent commits:
!git log --oneline -20 - Working tree status:
!git status --short
Instructions
Phase 1: Validation
- Worktree 확인:
git rev-parse --git-dir출력에/worktrees/가 포함되어야 한다. 아니면 중지. - 현재 브랜치 확인:
git branch --show-current - 대상 브랜치 결정:
$ARGUMENTS가 있으면 해당 브랜치 사용- 없으면
main존재 확인, 없으면master
- 원본 레포 경로 확인:
git rev-parse --git-common-dir의 부모 디렉토리 - 클린 상태 확인:
git status --porcelain이 비어있어야 한다. 미커밋 변경이 있으면 먼저 커밋/스태시 안내.
Phase 2: Research
- 커밋 이력:
git log --oneline <target>..HEAD - 변경 파일 요약:
git diff <target>...HEAD --stat - 전체 diff:
git diff <target>...HEAD— 꼼꼼히 읽는다. - 핵심 파일 읽기: 가장 큰 변경, 신규 파일, 삭제 파일을 Read로 확인.
- 변경 분류:
- Features (신규 기능)
- Fixes (버그 수정)
- Refactors (구조 변경)
- Tests (테스트)
- Docs (문서)
- Config/Chore (빌드, CI, 의존성)
- dominant type 결정:
feat,fix,refactor,docs,chore,test중 하나
Phase 3: 대상 브랜치 준비
- 대상 브랜치 최근 커밋 확인:
git -C <원본레포> log --oneline -10 <target> - WIP 커밋 감지:
wip:,auto-commit,WIP시작 커밋이 있으면 사용자에게 경고. - 최신 fetch:
git -C <원본레포> fetch origin <target> 2>/dev/null
Phase 4: Squash Merge
- 대상 브랜치 checkout:
git -C <원본레포> checkout <target> - squash merge 실행:
git -C <원본레포> merge --squash <워크트리브랜치> - 충돌 처리: 충돌 발생 시 충돌 파일 목록 + 마커를 보여주고 중지. 자동 해결 시도 금지.
Phase 5: 커밋 메시지 작성 + 커밋
Phase 2 분석 기반으로 아래 구조의 커밋 메시지를 작성한다:
<type>: <명령형 요약, 72자 이내, 마침표 없음>
<무엇을 왜 했는지 2-4문장. 동기와 접근 방식 중심.>
Changes:
* <그룹별 변경 사항>
* <하위 항목은 서브 불릿>규칙:
<type>은feat,fix,refactor,docs,chore,test중 하나- 여러 유형이 섞이면 dominant 사용
- 요약: 명령형 ("add", "fix", "refactor"), 마침표 없음, 72자 제한
- 본문: 왜와 맥락, 무엇만이 아님
- Changes: 관련 항목 그룹핑, 중요한 것 먼저
- Co-Authored-By 푸터 절대 추가 금지 (글로벌 설정
includeCoAuthoredBy: false)
커밋 실행:
git -C <원본레포> commit -m "$(cat <<'EOF'
<커밋 메시지>
EOF
)"Phase 6: 정리 + 검증
- 커밋 확인:
git -C <원본레포> log --oneline -3 - 워크트리 자동 정리:
git -C <원본레포> worktree remove <워크트리경로> git -C <원본레포> branch -d <워크트리브랜치> - codex-swarm 정리 감지: 워크트리 경로가
.codex-swarm/wt-*패턴이면:- 같은
.codex-swarm/디렉토리에 다른 워크트리가 남아있는지 확인 - 모든 워크트리가 머지 완료되었으면
.codex-swarm/전체 정리 제안 git worktree prune실행
- 같은
- 결과 보고:
- 커밋 해시 + 요약
- 머지 대상 브랜치
- 워크트리 정리 완료 여부
- push 안내 (
git push)
codex-swarm 연동
이 스킬은 tfx-codex-swarm의 Step 10 "결과 수집"에서 자동으로 호출된다.
codex-swarm이 완료한 각 워크트리에 대해 순차적으로 실행:
각 워크트리에 대해:
1. 워크트리로 cd
2. /merge-worktree main
3. 다음 워크트리로 이동주의사항
- force-push, destructive 연산은 사용자 확인 없이 절대 실행 금지
- pre-commit hook 건너뛰기(
--no-verify) 금지 - 예상치 못한 상황이면 추측하지 말고 중지 후 설명
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

