merge-queue

A procedure for fixing pull requests stuck in a GitHub merge queue, which is an automated waiting line for approved changes to enter a protected branch.

In plain words
What is it for?
It covers checking the queue, removing the pull request from it, safely force-pushing a fix, and turning automatic merging back on. It also helps diagnose Vercel preview failures caused by commit-email mismatches.
Why use it?
It explains how to update a queued pull request when ordinary pushes or automatic merging are rejected.

Skill for Claude CodeCodex

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/djrhails/dotfiles/merge-queue
Any agent
npx skills add DJRHails/dotfiles --skill merge-queue
Clone the repo
git clone --depth 1 https://github.com/DJRHails/dotfiles

Made for: Claude Code, Codex.

Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,045 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 $0.00077 $0.01045
Opus 5 $0.00039 $0.00522
Sonnet 5 $0.00015 $0.00209
Haiku 4.5 $0.00008 $0.00104

Measured yesterday against content hash a3d14fd1000d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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.

modules/agents/skills/merge-queue/SKILL.md · 113 lines

How it starts

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

merge-queue

Repos with a GitHub merge queue enabled reject normal pushes to queued PR branches, and gh pr merge --auto refuses to touch a PR that's already in the queue. The dance to fix a small issue on a queued PR is:

  1. Dequeue the PR (GraphQL mutation — no gh shortcut exists).
  2. Push your fix (force-with-lease is safe).
  3. Re-enable automerge (gh pr merge --squash --auto).

If you try to git push without dequeueing first, you get:

remote:   ... cannot be updated. To modify this branch, dequeue the
remote:   associated pull request.
remote: error: ... protected branch hook declined

Dequeue + force-push + re-enable (copy-paste)

PR=4197
OWNER=Jack-and-Jill-AI
REPO=ai-recruiter

# 1. Look up the PR node id and confirm it's queued
gh api graphql -f query="query{
  repository(owner:\"$OWNER\",name:\"$REPO\"){
    pullRequest(number:$PR){
      id state isInMergeQueue mergeQueueEntry{id}
    }
  }
}"

# 2. Dequeue (pass the pullRequest node id, not the queue entry id)
PR_NODE_ID=$(gh api graphql -f query="query{
  repository(owner:\"$OWNER\",name:\"$REPO\"){
    pullRequest(number:$PR){id}
  }
}" --jq '.data.repository.pullRequest.id')
gh api graphql \
  -f query='mutation($id:ID!){dequeuePullRequest(input:{id:$id}){mergeQueueEntry{id}}}' \
  -F id="$PR_NODE_ID"

# 3. Push the fix (commit locally first)
git push --force-with-lease

# 4. Re-enable automerge
gh pr merge "$PR" --squash --auto

gh pr merge --disable-auto does NOT work while a PR is queued — the API returns "already queued to merge" and leaves the queue entry in place. You have to use the GraphQL dequeuePullRequest mutation.

Vercel preview failures — the commit-email trap

If CI shows Vercel – <project>: FAILURE on every preview, click through to the error. If it looks like:

"Setting your commit email address" (link to a GitHub docs page)

…it's not a git config issue. Vercel is rejecting the deploy because the HEAD commit's author email isn't on a GitHub account linked to the Vercel team. Usually happens when:

Read the full file on GitHub · 113 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 · 113 lines · 77 tokens per session scan A a3d14fd1000d

Subscribe to this mod's changes

merge-queue is a skill published in the GitHub repository DJRHails/dotfiles (2 stars, last pushed 7d ago), licensed MIT. It adds 77 tokens to every session and 1,045 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

autopilot-batch

Fan out a batch of autopilot-queued issues to parallel background worktree subagents — each runs /autopilot at the build model from its 'model:' label — with a gating review at Opus 5 or above and never below the build (Opus reviews Sonnet and Opus builds, Fable reviews Fable builds).

joshukraine/dotfiles · 75 tokens

todoist-cli

Manage Todoist tasks, projects, labels, filters, sections, comments, reminders, and workspaces via the td CLI. Use when the user wants to view, create, update, complete, or organize Todoist items, or mentions tasks, inbox, today, upcoming, projects, labels, or filters.

joshukraine/dotfiles · 68 tokens

autopilot

Carry a well-scoped GitHub issue through the full dev loop autonomously, stopping at a per-run tier boundary (PR-ready, or merge+deploy for small reversible changes).

joshukraine/dotfiles · 40 tokens

qa-handoff

Generate a hands-on QA testing guide as a self-contained HTML page — for Rails apps or static (Hugo) sites. --publish uploads the HTML to the project's configured QA host.

joshukraine/dotfiles · 41 tokens

walkthrough

Generate a hands-on browser walkthrough of a PR's user-facing changes to exercise before review; --publish posts the final version to the PR for QA.

joshukraine/dotfiles · 33 tokens

dustoff

Assess a project that's been dormant for months and produce a prioritized re-entry plan — lifecycle stage, what's stale or broken, and how far the project's tooling has drifted from current conventions — delegating every fix to the skill that owns it, and optionally capturing the plan as a tracking issue that survives…

joshukraine/dotfiles · 64 tokens