merge-queue

merge-queue is a command for Claude Code from pleaseai/claude-code-plugins. It costs 15 tokens per session (1,195 once invoked), scanned A, original, MIT.

A command that adds or removes a configured label on a pull request to place it in, or remove it from, Graphite's merge queue. A merge queue is an ordered system that waits to merge changes safely.

In plain words
What is it for?
Use it to enqueue the selected pull request for merging or take it out of the queue. The exact label and queue mode come from the repository configuration.
Why use it?
It provides a single action for queueing or unqueueing a pull request, including dependent pull requests in a stack.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the graphite plugin — 3 skills, 16 commands shipped together

Good fit Use it to enqueue the selected pull request for merging or take it out of the queue. The exact label and queue mode come from the repository configuration.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add pleaseai/claude-code-plugins
Claude Code
/plugin install graphite

Made for: Claude Code.

Or install graphite, the plugin that ships this one along with the rest of its 3 skills, 16 commands.

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 merge-queue

README.md
[![agentmods](https://agentmods.dev/badge/commands/pleaseai/claude-code-plugins/merge-queue/github.svg)](https://agentmods.dev/commands/pleaseai/claude-code-plugins/merge-queue)
Your own site
<a href="https://agentmods.dev/commands/pleaseai/claude-code-plugins/merge-queue"><img src="https://agentmods.dev/badge/commands/pleaseai/claude-code-plugins/merge-queue/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 merge-queue

Your own site · 80×15
<a href="https://agentmods.dev/commands/pleaseai/claude-code-plugins/merge-queue"><img src="https://agentmods.dev/badge/commands/pleaseai/claude-code-plugins/merge-queue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 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,195 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.00015 $0.01195
Opus 5 $0.00008 $0.00598
Sonnet 5 $0.00003 $0.00239
Haiku 4.5 $0.00002 $0.00120

Measured yesterday against content hash be789849d535, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

merge-queue 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 yesterday.

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.

plugins/graphite/commands/merge-queue.md · 82 lines

How it starts

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

Add or remove the configured Graphite merge-queue label on a pull request. User input: $ARGUMENTS.

Graphite's merge queue is driven entirely by a label — applying it enqueues; removing it dequeues. For stacked PRs, the label cascades to dependent PRs automatically (label the topmost PR you want merged; do not iterate).

Resolve config (enabled gate, mode, label)

All parsing is centralized in ${CLAUDE_PLUGIN_ROOT}/scripts/read-merge-queue-config.sh, which emits three KEY=VALUE lines. eval the output, then apply env-var overrides:

eval "$("${CLAUDE_PLUGIN_ROOT}/scripts/read-merge-queue-config.sh")"

# Env-var overrides (caller can force a value without editing .please/config.yml)
MERGE_MODE="${GRAPHITE_MERGE_QUEUE_MODE:-$MERGE_MODE}"
MERGE_LABEL="${MERGE_QUEUE_LABEL:-${MERGE_LABEL:-merge-queue}}"

# 1. Bail if graphite is disabled.
if [ "$GRAPHITE_DISABLED" = "1" ]; then
  echo "graphite.enabled: false in .please/config.yml — repo opted out of Graphite. Skipping."
  exit 0
fi

# 2. Dispatch on mode. Only `graphite` continues with the label flow.
case "$MERGE_MODE" in
  graphite) ;;  # continue below
  "")       echo "merge-queue.mode not configured in .please/config.yml. Ask the user which mode the repo uses, then persist it."; exit 0 ;;
  *)        echo "Repo uses '$MERGE_MODE' merge queue, not Graphite's. Skipping label flow."; exit 0 ;;
esac

Modes that this command does NOT handle

Mode What to do instead
github-native gh pr merge --auto --squash (or chosen strategy) — GitHub queues automatically
external Defer to the external tool (Mergify/Kodiak/etc.) — apply its enqueue label, not Graphite's
none gt submit --merge for stacks, or gh pr merge for a single PR
unset Ask the user which mode the repo uses, then offer to persist it to .please/config.yml

Resolution precedence

  • Mode: GRAPHITE_MERGE_QUEUE_MODE env var → graphite.merge-queue.mode in .please/config.yml → empty (caller asks).
  • Label: MERGE_QUEUE_LABEL env var → graphite.merge-queue.label in .please/config.ymlmerge-queue (default).
  • Disabled gate: only graphite.enabled: false at the immediate child of graphite: triggers bail-out; the script's depth-tracking ignores nested enabled keys.

Read the full file on GitHub · 82 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. yesterday First seen · 82 lines · 15 tokens per session scan A be789849d535

Subscribe to this mod's changes

merge-queue is a command published in the GitHub repository pleaseai/claude-code-plugins (13 stars, last pushed 2d ago), licensed MIT. It adds 15 tokens to every session and 1,195 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-09-07.