with one click
merge
Commit, rebase, and merge the current branch.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Commit, rebase, and merge the current branch.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Universal commenting and documentation conventions across all languages. Load when writing or reviewing substantial comments, docstrings, file headers, or migration documentation. Project-specific commenting standards in `docs/commenting-standard.md` (when present) extend or override this baseline.
Exhaustive post-work audit for any codebase. Run after finishing a feature, sprint, bug fix, or refactoring pass to find overlooked edge cases, discarded response data, missing cross-field validations, misleading success signals, untested failure paths, and implicit assumptions. Invoke with /deep-audit or /deep-audit followed by context. Use this skill whenever the user says audit, review my changes, check my work, what did I miss, post-mortem, sanity check, edge cases, or asks to verify completeness of recent code changes.
Use when modifying the agentic coding environment, including dotfiles, skills/rules wiring, AGENTS.md/CLAUDE.md loading, Stow symlinks, Claude/Codex/OpenCode/Pi config, plugins, MCP, hooks, or harness compatibility. Loads the runbook to avoid breaking cross-harness setup. Defer to skill-creator-global for skill authoring craft, description quality, and progressive disclosure.
Retrieves up-to-date documentation, API references, and code examples for any developer technology via the ctx7 (Context7) CLI. Use this skill whenever the user mentions "ctx7" or "context7", or asks about a specific library, framework, SDK, CLI tool, or cloud service -- even for well-known ones like React, Next.js, Prisma, Express, Tailwind, Django, or Spring Boot. Your training data may not reflect recent API changes or version updates. Always use for: API syntax questions, configuration options, version migration issues, "how do I" questions mentioning a library name, debugging that involves library-specific behavior, setup instructions, and CLI tool usage. Use even when you think you know the answer -- do not rely on training data for API details, signatures, or configuration options as they are frequently outdated. Always verify against current docs. Prefer this over web search for library documentation and API details.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
Create, revise, or review Agent Skills for authoring quality. Use when writing SKILL.md content, improving skill descriptions and trigger words, deciding what belongs in SKILL.md versus references/scripts, or diagnosing why a skill over-triggers or under-triggers. Defer to agentic-coding-harnesses for dotfiles, Stow, symlinks, harness visibility, AGENTS.md, plugins, MCP, or environment wiring.
| 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.