Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/av1155/.dotfiles --skill merge명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | merge |
| description | Commit, rebase, and merge the current branch. |
| disable-model-invocation | true |
| allowed-tools | Read, Bash, Glob, Grep |
Arguments: $ARGUMENTS
Check the arguments for flags:
--keep, -k → pass --keep to workmux merge (keeps the worktree and tmux window after merging)--no-verify, -n → pass --no-verify to workmux mergeStrip all flags from arguments.
Commit, rebase, merge the current branch, and notify other active worktrees that main has advanced.
This command finishes work on the current branch by:
workmux merge to merge and clean upIf there are staged changes, commit them. Use lowercase, imperative mood, no conventional commit prefixes. Skip if nothing is staged.
Get the base branch from git config:
git config --local --get "branch.$(git branch --show-current).workmux-base"
If no base branch is configured, default to "main".
Rebase onto the local base branch (do NOT fetch from origin first):
git rebase <base-branch>
IMPORTANT: Do NOT run git fetch. Do NOT rebase onto origin/<branch>.
Only rebase onto the local branch name (e.g., git rebase main, not
git rebase origin/main).
If conflicts occur:
git log -p -n 3 <base-branch> -- <file>
to see recent changes to that file in the base branchgit rebase --continueIf the rebase touched any dependency manifest or lock file, the worktree's installed dependencies may be stale and the merge's pre-verify hook will fail. Detect and refresh.
git diff HEAD@{1} HEAD --name-only
If the output includes a manifest or lock file for this project's language/ecosystem, run the appropriate install command for this project before proceeding. If nothing relevant changed, skip.
workmux merge closes the current tmux window and kills this skill's
shell process mid-execution. Sibling worktrees must be identified NOW,
before the merge runs, so the pre-merge advisory in Step 4 can be sent
before the merger window dies.
MERGED=$(git rev-parse --show-toplevel | xargs basename)
SIBLINGS=$(workmux status --json | jq -r --arg self "$MERGED" '
[.[] | select(.worktree != $self)] | unique_by(.worktree) | .[].worktree
')
$SIBLINGS may be empty (no other worktrees active) — that's fine,
Step 5 handles both cases.
If --keep is NOT in the arguments AND $SIBLINGS is non-empty,
send each sibling a self-describing advisory now, before workmux merge runs. This must happen BEFORE Step 5 because the current
tmux window dies during merge.
The advisory identifies the merger by handle and asks the receiver
to verify whether the merge actually completed (by checking wm list) before rebasing. This avoids hardcoding any wait time:
wm list, the merge has not
finished yet and the receiver should defer the rebaseif [ -n "$SIBLINGS" ]; then
MSG="📌 Heads up from workmux worktree '$MERGED'. I'm about to merge my branch into main and don't know exactly when it will complete (pre-merge hooks, tests, etc may run first). Before you rebase: run \`wm list\` and check whether '$MERGED' is listed. If yes, the merge has not happened yet, so don't rebase, finish your current step and recheck later. If gone, the merge succeeded; run \`git fetch\` if you have an origin remote, then rebase onto whichever of local main or origin/main is ahead so you don't build on a stale base."
echo "$SIBLINGS" | while IFS= read -r sibling; do
[ -z "$sibling" ] && continue
workmux send "$sibling" "$MSG"
done
fi
AI: if ANY earlier step failed (commit, rebase, dependency refresh, sibling capture), abort the flow BEFORE reaching this step. Do not send the advisory at all. The advisory should only go out after Steps 1 to 3 have succeeded and you are about to run the merge.
If --keep IS in the arguments, skip this step. Step 6 sends an
inline notification after the merge instead.
Run: workmux merge --rebase --notification [--keep] [--no-verify]
Include --keep only if the --keep flag was passed in arguments.
Include --no-verify only if the --no-verify flag was passed in
arguments.
This merges the branch into the base branch and cleans up the worktree
and tmux window (unless --keep is used).
If --keep was in the arguments, the current window survives the
merge. The merger does not disappear from wm list, so siblings
cannot use the existence check from Step 4. Send a simpler
post-merge confirmation inline:
if [ -n "$SIBLINGS" ]; then
MSG="📌 From workmux worktree '$MERGED'. I just merged my branch into main and kept this worktree open with --keep. Main has advanced. Finish your current step, then run \`git fetch\` if you have an origin remote and rebase onto whichever of local main or origin/main is ahead so you stay current."
echo "$SIBLINGS" | while IFS= read -r sibling; do
[ -z "$sibling" ] && continue
workmux send "$sibling" "$MSG"
done
fi
AI: if workmux merge in Step 5 failed (non-zero exit, or main did
not actually advance), do NOT run this block. Siblings should only be
notified when the merge truly succeeded.
If --keep was NOT set, skip this step. Step 4 already sent the
advisory.