mach12:pr-merge

mach12:pr-merge is a command for Claude Code from LeanAndMean/scramjet. It costs 14 tokens per session (1,578 once invoked), scanned A, original, Apache-2.0.

A command that verifies a GitHub pull request is ready, merges it, deletes its feature branch, and can optionally create a release. A feature branch is a separate line of development for a change.

In plain words
What is it for?
Use it after review to check required approvals and automated checks, merge the pull request, remove its branch, and optionally tag a release.
Why use it?
It puts the final checks and cleanup for a completed code change into one workflow, reducing the chance of merging an unfinished or conflicting pull request.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it after review to check required approvals and automated checks, merge the pull request, remove its branch, and optionally tag a release.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/leanandmean/scramjet/mach12-pr-merge
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.

Clone the repo
git clone --depth 1 https://github.com/LeanAndMean/scramjet

Made for: Claude Code.

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 mach12:pr-merge

README.md
[![agentmods](https://agentmods.dev/badge/commands/leanandmean/scramjet/mach12-pr-merge/github.svg)](https://agentmods.dev/commands/leanandmean/scramjet/mach12-pr-merge)
Your own site
<a href="https://agentmods.dev/commands/leanandmean/scramjet/mach12-pr-merge"><img src="https://agentmods.dev/badge/commands/leanandmean/scramjet/mach12-pr-merge/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mach12:pr-merge

Your own site · 80×15
<a href="https://agentmods.dev/commands/leanandmean/scramjet/mach12-pr-merge"><img src="https://agentmods.dev/badge/commands/leanandmean/scramjet/mach12-pr-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,578 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00014 $0.01578
Opus 5 $0.00007 $0.00789
Sonnet 5 $0.00003 $0.00316
Haiku 4.5 $0.00001 $0.00158

Measured 4d ago against content hash 3ac2dae00dcc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

mach12:pr-merge 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 4d 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.

packages/scramjet/mach12/commands/mach12:pr-merge.md · 124 lines

How it starts

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

Merge and Release

Goals

  • Merge only a pull request that authoritative readiness evidence shows is safe to merge, without bypassing required checks or review.
  • Bring the local default branch and feature-branch cleanup to a truthful final state after the merge.
  • Create only an exactly approved release targeted at the confirmed merge commit, under current repository authority, and report every applicable outcome independently.

This command intentionally declares no next-step policy. Merge is the natural terminus of a feature lifecycle, so Scramjet pauses after a successful merge. If a process has a post-merge follow-up, add an explicit next-step policy in the local command set.

Step 1: Parse input

Extract the required PR number and any additional context or constraints. If the input is ambiguous, ask the user to clarify. Classify only unambiguous release intent: the user may explicitly decline a release, explicitly request one, or leave release creation undecided. Treat tag, title, notes, or emphasis details as draft guidance.

Step 2: Verify readiness

Read ordinary GitHub readiness immediately before merging:

gh pr view <pr-number> --json state,isDraft,mergeable,mergeStateStatus,reviewDecision

Require the PR to be open, non-draft, free of requested changes or required review, current with the default branch, conflict-free, and passing its required checks. Use gh pr checks <pr-number> --required to distinguish required checks; repositories without required checks may continue. If GitHub still reports mergeability as unknown after one brief reread, report incomplete rather than guessing.

No creator, provenance marker, issue linkage, or custom metadata participates in readiness. Do not offer a force merge, force push, or readiness bypass.

Step 3: Merge

Record the feature branch name, then merge without a force or readiness bypass:

gh pr view <pr-number> --json headRefName --jq .headRefName
gh pr merge <pr-number> --delete-branch

Read the full file on GitHub · 124 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. 4d ago Changed · -25 lines 3ac2dae00dcc
  2. 9d ago First seen · 149 lines · 14 tokens per session scan A 181f8689cc53

Subscribe to this mod's changes

mach12:pr-merge is a command published in the GitHub repository LeanAndMean/scramjet (6 stars, last pushed today), licensed Apache-2.0. It adds 14 tokens to every session and 1,578 once invoked, about $0.0001 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-31.