一键导入
pr-merge-base
Use when PRs may conflict with each other or the base, or require ordered application.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when PRs may conflict with each other or the base, or require ordered application.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Demolish bloated code and re-derive it clean, cutting every surface the rebuilt contract does not name. Use for a repo-wide bloat sweep, when patching a subsystem has stopped paying, or when the user says "this whole module is bloated", "rewrite this properly", or "break it and rebuild".
Use when the user says "deslop", "remove debug code", "find placeholders or stub code", or "remove dead code".
Dispatch compress operations. Use when the user says "tidy" or names a file, diff, memory, workspace, git stack, or doc to tidy.
Reduce internal duplication, dead code, and ceremony. Use when you spot dead fields, redundant wrappers, or speculative abstractions in code you are already editing.
Use when modernizing APIs, removing compat shims, killing feature flags, or rewriting a subsystem cleanly.
Use when the user says "simplify this diff", or asks for a compression pass over a change-set.
| name | pr-merge-base |
| description | Use when PRs may conflict with each other or the base, or require ordered application. |
Merge one or more PRs into the base branch (main/master) using queue-like sequencing.
Detect base branch: Identify the default branch (main, master, or repo-specific) via git remote show origin or repo conventions.
Enumerate PRs: List all PRs to merge. For each, fetch the latest HEAD.
Create checkpoint: Record the current base branch tip as a rollback point.
CHECKPOINT=$(git rev-parse HEAD)
Create integration branch: Work on a temporary branch to validate before touching base.
git checkout -b merge-queue/<timestamp> <base>
Determine merge order:
Sequential merge with conflict handling: for each PR in order:
a. Attempt git merge --no-ff <pr-branch> into the integration branch.
b. If merge succeeds cleanly, continue to next PR.
c. If conflicts occur:
difft and codebase context.git merge --abort), stop and report the conflict to the user with both sides and a recommended resolution.
d. After each successful merge, verify the build still passes (if build commands are available).Validate integration branch: Once all PRs are merged on the integration branch, run full build/test suite if available.
Report results: Present the validated integration branch to the user. Only update base if the user explicitly requests it.
Abort conditions: stop the queue and report if:
git checkout <base> && git branch -D merge-queue/<timestamp>. Base remains untouched at checkpoint.Report for each PR: merged successfully, conflicts resolved (with details), or blocked (with reason).