pr-merge.template

pr-merge.template is a command for Claude Code from evan043/claude-cli-advanced-starter-pack. It costs 0 tokens per session (7,164 once invoked), scanned A, original, MIT.

A command template for merging GitHub pull requests (PRs), which are proposed code changes awaiting review. It adapts a Claude-style workflow to Codex tools.

In plain words
What is it for?
Use it to list or merge open PRs, test a PR in an isolated worktree, preview a merge without changing anything, and resolve blockers interactively.
Why use it?
It provides a consistent way to handle different merge situations, check changes safely, and keep contributors informed.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: reads .claude/ paths; names the AskUserQuestion tool; mentions Claude Code.

Good fit Use it to list or merge open PRs, test a PR in an isolated worktree, preview a merge without changing anything, and resolve blockers interactively.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/evan043/claude-cli-advanced-starter-pack/pr-merge.template
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/evan043/claude-cli-advanced-starter-pack

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 pr-merge.template

README.md
[![agentmods](https://agentmods.dev/badge/commands/evan043/claude-cli-advanced-starter-pack/pr-merge.template.svg)](https://agentmods.dev/commands/evan043/claude-cli-advanced-starter-pack/pr-merge.template)
Your own site
<a href="https://agentmods.dev/commands/evan043/claude-cli-advanced-starter-pack/pr-merge.template"><img src="https://agentmods.dev/badge/commands/evan043/claude-cli-advanced-starter-pack/pr-merge.template.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,164 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.00000 $0.07164
Opus 5 $0.00000 $0.03582
Sonnet 5 $0.00000 $0.01433
Haiku 4.5 $0.00000 $0.00716

Measured 8d ago against content hash 27918d5c645f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

pr-merge.template 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 8d 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.

templates/commands/pr-merge.template.md · 995 lines

How it starts

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

Codex Runtime Compatibility

This prompt was authored for Claude-style slash workflows. In Codex runtime, adapt tool calls as follows:

  • AskUserQuestion => ask the user directly in chat.
  • WebSearch/WebFetch => use available web tools (search_query, open, find) and cite links.
  • Read/Write => use shell/filesystem tools in this workspace.
  • Claude-only MCP calls (for example Playwright MCP names) => use available equivalents or clearly state fallback.
  • Keep intent and output format identical; only adapt execution mechanics.

description: Merge PR with interactive blocker resolution, safety checkpoints, and contributor messaging allowed-tools:

  • Bash
  • Read
  • AskUserQuestion

/pr-merge - Interactive PR Merge

An intelligent merge assistant that handles all PR scenarios safely, with clear communication to contributors.

{{#if versionControl.owner}}

Usage

/pr-merge                    # Show menu of all open PRs
/pr-merge 42                 # Merge PR #42 directly
/pr-merge 42 --worktree      # Test PR #42 in isolated worktree first
/pr-merge --dry-run          # Preview only, no changes

Worktree Test Mode

Use --worktree or select [W] during merge to:

  • Run security scan on PR changes
  • Create isolated worktree for testing
  • Resolve conflicts safely before merging
  • Test features without affecting your main repo

PHASE 0: OPEN PR MENU (Default when no args)

When /pr-merge is called without arguments or a PR number, show an interactive menu of all open PRs.

Step 0.1: Fetch all open PRs with details

gh pr list --repo {{versionControl.owner}}/{{versionControl.repo}} --state open --json number,title,body,createdAt,author,isDraft,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,additions,deletions,changedFiles --limit 20

Step 0.2: Display the PR selection menu

Format each PR as a stacked card (mobile-friendly, no word wrapping):

Read the full file on GitHub · 995 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. 8d ago First seen · 995 lines · 0 tokens per session scan A 27918d5c645f

Subscribe to this mod's changes

pr-merge.template is a command published in the GitHub repository evan043/claude-cli-advanced-starter-pack (61 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 7,164 tokens. 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.