pr-merge-base

pr-merge-base is a skill for Claude Code, Codex from OutlineDriven/odin-codex-plugin. It costs 46 tokens per session (587 once invoked), scanned A, original, Apache-2.0.

A procedure for combining several Git pull requests into their target branch in a chosen order, with a temporary integration branch for checking conflicts before the target branch is changed.

In plain words
What is it for?
Use it to queue and merge related pull requests, resolve conflicts, check the combined result, and handle dependencies between changes.
Why use it?
It helps manage pull requests that depend on one another or conflict with each other, while preserving a checkpoint for recovery.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/outlinedriven/odin-codex-plugin/pr-merge-base
Any agent
npx skills add OutlineDriven/odin-codex-plugin --skill pr-merge-base
Clone the repo
git clone --depth 1 https://github.com/OutlineDriven/odin-codex-plugin

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pr-merge-base

README.md
[![agentmods](https://agentmods.dev/badge/skills/outlinedriven/odin-codex-plugin/pr-merge-base.svg)](https://agentmods.dev/skills/outlinedriven/odin-codex-plugin/pr-merge-base)
Your own site
<a href="https://agentmods.dev/skills/outlinedriven/odin-codex-plugin/pr-merge-base"><img src="https://agentmods.dev/badge/skills/outlinedriven/odin-codex-plugin/pr-merge-base.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 587 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00587
Opus 5 $0.00023 $0.00293
Sonnet 5 $0.00009 $0.00117
Haiku 4.5 $0.00005 $0.00059

Measured 6d ago against content hash 1680d8c99c7e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pr-merge-base scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/pr-merge-base/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

  2. Enumerate PRs: List all PRs to merge. For each, fetch the latest HEAD.

  3. Create checkpoint: Record the current base branch tip as a rollback point.

    CHECKPOINT=$(git rev-parse HEAD)
    
  4. Create integration branch: Work on a temporary branch to validate before touching base.

    git checkout -b merge-queue/<timestamp> <base>
    
  5. Determine merge order:

    • If the user specifies an order, use that.
    • Otherwise, compute dependency/topological order (if PR B depends on PR A, merge A first).
    • If PRs are independent with no clear ordering, present the list and ask the user to confirm or reorder before proceeding.
  6. 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:

    • Analyze each conflict file using difft and codebase context.
    • Apply resolution using structural understanding (prefer base for formatting, PR for logic).
    • If a conflict cannot be resolved with confidence, abort this merge (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).
  7. Validate integration branch: Once all PRs are merged on the integration branch, run full build/test suite if available.

  8. 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.

  9. Abort conditions — stop the queue and report if:

    • A conflict cannot be safely auto-resolved.
    • A post-merge build/test fails.
    • A PR has been superseded or closed. Roll back: git checkout <base> && git branch -D merge-queue/<timestamp> — base remains untouched at checkpoint.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 52 lines · 46 tokens per session scan A 1680d8c99c7e

Subscribe to this mod's changes

pr-merge-base is a skill published in the GitHub repository OutlineDriven/odin-codex-plugin (15 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 46 tokens to every session and 587 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

git-guardrails-claude-code

Install a Claude-Code PreToolUse hook that blocks destructive git commands (push variants including force-push, hard reset, force clean, branch -D, checkout/restore overwrites) before Bash runs them. Use when the user wants git safety rails, force-push prevention, or repository-wipe protection.

OutlineDriven/odin-gemini-cli-extension · 71 tokens

git-branchless

Enforce idiomatic git-branchless during planning and executing tasks — detached-HEAD-first work, in-memory rebase via git move, event-log recovery via git undo, deferred branch creation, speculative-merge git sync for base updates. Use when planning or executing multi-commit work, history rewrites, stack edits…

OutlineDriven/odin-gemini-cli-extension · 131 tokens

setup-pre-commit

Install git pre-commit hooks via the project's hook tool — Husky+lint-staged (JS), pre-commit (Python/OCaml), lefthook (Go), cargo-husky (Rust). Use when the user wants commit-time formatting, linting, type-checking, or test gates. Detects ecosystem first.

OutlineDriven/odin-gemini-cli-extension · 73 tokens

tidy

Tidy-operations dispatcher. Invoke on "tidy", "clean up", "tidy this file/memory/workspace/git/docs", or when active context (current file, diff, stack, memory directory) has structural rot to resolve before touching behavior. Detects target domain from context and routes to the sibling skill. Requires explicit target…

OutlineDriven/odin-gemini-cli-extension · 84 tokens

pr-merge-base

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.

OutlineDriven/odin-gemini-cli-extension · 46 tokens

request-refactor-plan

Plan a refactor as a sequence of tiny, working commits via adversarial interview. Default output is a markdown plan at /docs/refactor-plans/ .md; pass --emit-issue to also file a GitHub issue. Trigger on structural refactors (rename, extract, move, split, dedupe) — NOT new features.

OutlineDriven/odin-gemini-cli-extension · 80 tokens