postmelee/alhangeul-macos/pr-merge-cleanup
Claude Code and agent skill by postmelee/alhangeul-macos
- community
Checking that the SKILL.md file is still in the repository.
PR merge 확인 후 부산물을 정리하는 절차를 적용한다. 명시 호출 시에만 사용한다. GitHub 이슈 close, publish/task{N} 원격 브랜치 삭제, 로컬 local/task{N} 브랜치와 분리 worktree 정리, 대상 통합 브랜치 복귀를 수행한다. 외부 PR 운영 기록 커밋이 대상 통합 브랜치에 로컬로만 남아 있으면 직접 push 여부를 확인한다. PR이 실제로 merge된 직후에만 호출.
Install
npx vskill@latest install postmelee/alhangeul-macos/pr-merge-cleanupSKILL.md
PR merge 후 부산물 정리
트리거
- 명시 호출만: 작업지시자가 "merge 후 정리", "타스크 정리"를 명시 지시한 경우
- 본 SKILL을 직접 호출한 경우
사전 조건
- 대상 PR이 GitHub에서 실제 merged 상태 (
gh pr view {번호} --json state,mergeCommit) - 작업지시자의 이슈 close 승인 (또는 PR 본문에
closes #N명시되어 자동 close된 상태)
절차
- PR과 이슈 상태 확인
``bash gh pr view {번호} --json state,mergedAt,mergeCommit,headRefName gh issue view {N} --json state ``
- PR
state == MERGED아니면 즉시 중단하고 작업지시자 보고
- 이슈 close (자동 close 안 된 경우만)
``bash gh issue close {N} ``
- 대상 통합 브랜치 최신화
``bash git fetch origin --prune BASE_BRANCH=$(gh pr view {번호} --json baseRefName --jq .baseRefName) git checkout "$BASE_BRANCH" git pull --ff-only ``
git pull --ff-only가 실패하면git status --short --branch와git log --oneline origin/$BASE_BRANCH..$BASE_BRANCH를 확인한다.- local-only 커밋이 외부 PR 운영 기록(
PR #N 검토,PR #N 완료 처리)이고 변경 파일이mydocs/pr/**에만 있으면, 작업지시자 승인 후git rebase origin/$BASE_BRANCH로 최신화하고git push origin "$BASE_BRANCH"로 직접 반영한다. - Skill, 매뉴얼, 코드, 빌드 설정, 앱 동작 변경이 섞여 있으면 직접 push하지 말고 별도 Issue/브랜치/PR 절차로 분리한다.
- local-only 커밋 성격이 불명확하면 reset/rebase/force push를 하지 말고 작업지시자에게 보고한다.
- 원격 publish 브랜치 삭제 (이미 PR merge 시
--delete-branch로 삭제된 경우 skip)
``bash git push origin --delete publish/task{N} 2>&1 || echo "이미 삭제됨" ``
- 분리 worktree 사용했다면 제거
``bash git worktree remove ../{repo}-task{N} git worktree prune ``
- 로컬 작업 브랜치 삭제 (재사용 가능성 없을 때만)
``bash git branch -d local/task{N} # 강제 삭제는 작업지시자 명시 승인 후에만: git branch -D local/task{N} ``
- 오늘할일 최종 정리:
mydocs/orders/{yyyymmdd}.md의 #{N} 행이완료+ 시각 기록되어 있는지 재확인 - 결과 보고: 정리된 항목 목록을 작업지시자에게 짧게 회신
검증
gh pr view {번호}state == MERGED확인git branch -vv | grep local/task{N}출력 없음 (삭제된 경우)git ls-remote origin publish/task{N}빈 출력 (원격 삭제 확인)git worktree list출력에 정리 대상 worktree 미존재git branch --show-current가 대상 PR의baseRefName- 외부 PR 운영 기록을 직접 반영했다면
git status --short --branch에 대상 branch의 local-only ahead가 남지 않음
절대 하지 말 것
- PR이 merged 상태가 아닌데 이슈 close
- 작업지시자 다른 task 브랜치(
local/task{다른번호})나 메인 worktree 삭제 git branch -D강제 삭제 무단 사용 (병합 안 된 커밋이 있을 때 손실 위험)- 외부 PR 운영 기록이 아닌 local-only 커밋을 cleanup 과정에서 직접 push
- non-fast-forward 상태에서 강제 push
- 다른 작업자의 stash 삭제
호출 방법
- Codex:
$pr-merge-cleanup또는/skills메뉴 - Claude Code:
/pr-merge-cleanup
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingmydocs/skills/pr-merge-cleanup/SKILL.md
Popularity
- Repository stars
- 183
- Repository forks
- 15
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/postmelee/alhangeul-macos/pr-merge-cleanup)