Pr merge base

From OutlineDriven/odin-codex-plugin · View interactive version

Pr merge base is an AI agent skill from the GitHub repository OutlineDriven/odin-codex-plugin. Merge one or more PRs into the base branch with queue-like sequencing and conflict resolution. Use when merging PRs that may conflict with each other or the base, requiring ordered application and intelligent conflict handling.

How to use this skill

Skill file

Smart Merge to Base Branch

Merge one or more PRs into the base branch (main/master) using queue-like sequencing.

Process

  1. Detect base branch: Identify the default branch (main, master, or repo-specific) via git remote show origin or repo conventions.
  1. Enumerate PRs: List all PRs to merge. For each, fetch the latest HEAD.
  1. Create checkpoint: Record the current base branch tip as a rollback point.

```

CHECKPOINT=$(git rev-parse HEAD)

```

  1. Create integration branch: Work on a temporary branch to validate before touching base.

```

git checkout -b merge-queue/<timestamp> <base>

```

  1. Determine merge order:
  1. 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:

d. After each successful merge, verify the build still passes (if build commands are available).

  1. Validate integration branch: Once all PRs are merged on the integration branch, run full build/test suite if available.
  1. Report results: Present the validated integration branch to the user. Do NOT advance the base branch automatically — only update base if the user explicitly requests it.
  1. Abort conditions — stop the queue and report if:

Roll back: git checkout <base> && git branch -D merge-queue/<timestamp> — base remains untouched at checkpoint.

Output

Report for each PR: merged successfully, conflicts resolved (with details), or blocked (with reason).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.