From triflux
Squash-merges Git worktree branches into main/master, generates conventional commit messages from change analysis, and cleans up branches/worktrees. Handles codex-swarm automatically.
npx claudepluginhub tellang/triflux[target-branch]This skill uses the workspace's default tool permissions.
워크트리 브랜치를 대상 브랜치로 squash-merge하고 conventional commit 메시지를 자동 작성한다.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Processes PDFs: extracts text/tables/images, merges/splits/rotates pages, adds watermarks, creates/fills forms, encrypts/decrypts, OCRs scans. Activates on PDF mentions or output requests.
Share bugs, ideas, or general feedback.
워크트리 브랜치를 대상 브랜치로 squash-merge하고 conventional commit 메시지를 자동 작성한다.
!git rev-parse --git-dir!git branch --show-current!git log --oneline -20!git status --shortWorktree 확인: git rev-parse --git-dir 출력에 /worktrees/가 포함되어야 한다. 아니면 중지.
현재 브랜치 확인: git branch --show-current
대상 브랜치 결정:
$ARGUMENTS가 있으면 해당 브랜치 사용main 존재 확인, 없으면 master원본 레포 경로 확인: git rev-parse --git-common-dir의 부모 디렉토리
클린 상태 확인: git status --porcelain이 비어있어야 한다. 미커밋 변경이 있으면 먼저 커밋/스태시 안내.
커밋 이력: git log --oneline <target>..HEAD
변경 파일 요약: git diff <target>...HEAD --stat
전체 diff: git diff <target>...HEAD — 꼼꼼히 읽는다.
핵심 파일 읽기: 가장 큰 변경, 신규 파일, 삭제 파일을 Read로 확인.
변경 분류:
dominant type 결정: feat, fix, refactor, docs, chore, test 중 하나
대상 브랜치 최근 커밋 확인: git -C <원본레포> log --oneline -10 <target>
WIP 커밋 감지: wip:, auto-commit, WIP 시작 커밋이 있으면 사용자에게 경고.
최신 fetch: git -C <원본레포> fetch origin <target> 2>/dev/null
대상 브랜치 checkout:
git -C <원본레포> checkout <target>
squash merge 실행:
git -C <원본레포> merge --squash <워크트리브랜치>
충돌 처리: 충돌 발생 시 충돌 파일 목록 + 마커를 보여주고 중지. 자동 해결 시도 금지.
Phase 2 분석 기반으로 아래 구조의 커밋 메시지를 작성한다:
<type>: <명령형 요약, 72자 이내, 마침표 없음>
<무엇을 왜 했는지 2-4문장. 동기와 접근 방식 중심.>
Changes:
* <그룹별 변경 사항>
* <하위 항목은 서브 불릿>
규칙:
<type>은 feat, fix, refactor, docs, chore, test 중 하나includeCoAuthoredBy: false)커밋 실행:
git -C <원본레포> commit -m "$(cat <<'EOF'
<커밋 메시지>
EOF
)"
커밋 확인: 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 실행결과 보고:
git push)이 스킬은 tfx-codex-swarm의 Step 10 "결과 수집"에서 자동으로 호출된다.
codex-swarm이 완료한 각 워크트리에 대해 순차적으로 실행:
각 워크트리에 대해:
1. 워크트리로 cd
2. /merge-worktree main
3. 다음 워크트리로 이동
--no-verify) 금지