merge-queue-thrash-stop-inflow-and-open-prs-as-drafts

merge-queue-thrash-stop-inflow-and-open-prs-as-drafts is a skill for Claude Code from wan-huiyan/agent-traffic-control. It costs 285 tokens per session (2,709 once invoked), scanned A, original, MIT.

A procedure for stopping a pull-request merge queue from repeatedly becoming stale when the main branch changes faster than required checks finish.

In plain words
What is it for?
Use it when several pull requests are marked behind, have automatic merging enabled, and remain unable to land despite passing checks. A pull request is a proposed code change, and CI is automated checking of code changes.
Why use it?
It addresses a cycle where branches become behind, trigger checks again, and become behind once more before they can merge.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: mentions Claude Code.

Part of the agent-traffic-control plugin — 105 skills shipped together

Good fit Use it when several pull requests are marked behind, have automatic merging enabled, and remain unable to land despite passing checks. A pull request is a proposed code change, and CI is automated checking of code changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/wan-huiyan/agent-traffic-control/merge-queue-thrash-stop-inflow-and-open-prs-as-drafts
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.

Any agent
npx skills add wan-huiyan/agent-traffic-control --skill merge-queue-thrash-stop-inflow-and-open-prs-as-drafts
Clone the repo
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control

Made for: Claude Code.

Or install agent-traffic-control, the plugin that ships this one along with the rest of its 105 skills.

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-thrash-stop-inflow-and-open-prs-as-drafts

README.md
[![agentmods](https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/merge-queue-thrash-stop-inflow-and-open-prs-as-drafts/github.svg)](https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/merge-queue-thrash-stop-inflow-and-open-prs-as-drafts)
Your own site
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/merge-queue-thrash-stop-inflow-and-open-prs-as-drafts"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/merge-queue-thrash-stop-inflow-and-open-prs-as-drafts/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-thrash-stop-inflow-and-open-prs-as-drafts

Your own site · 80×15
<a href="https://agentmods.dev/skills/wan-huiyan/agent-traffic-control/merge-queue-thrash-stop-inflow-and-open-prs-as-drafts"><img src="https://agentmods.dev/badge/skills/wan-huiyan/agent-traffic-control/merge-queue-thrash-stop-inflow-and-open-prs-as-drafts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 285 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,709 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.00285 $0.02709
Opus 5 $0.00143 $0.01354
Sonnet 5 $0.00057 $0.00542
Haiku 4.5 $0.00028 $0.00271

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

Security

Grade A, and why

merge-queue-thrash-stop-inflow-and-open-prs-as-drafts 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.

plugins/agent-traffic-control/skills/merge-queue-thrash-stop-inflow-and-open-prs-as-drafts/SKILL.md · 216 lines

How it starts

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

Queue thrash: main moves faster than CI, so nothing can land

Problem

Six pull requests, all green when they were pushed, all with auto-merge armed. None of them merges.

Nothing is wrong with any of them. mergeStateStatus reads BEHIND on every one — not DIRTY, so there are no conflicts and nothing needs resolving. Each is simply behind a main that moved after its last run finished.

The loop:

branch is BEHIND  →  update it from main  →  CI re-runs (16 min)
                          ↑                        ↓
                  someone lands on main  ←  branch is BEHIND again

If the interval between merges into main is shorter than the slowest required CI leg, the queue cannot drain. Every branch is stale before its own run finishes. Auto-merge does not help: it is waiting for a state — up to date and green — that no branch is ever in for long enough.

The cause is almost always you. In the observed run, the inflow was a single session landing work continuously, all night. Each individual merge was correct and wanted. Together they made every other branch unlandable. This is worth stating plainly because the instinct when nothing merges is to go looking for a broken check, and there isn't one.

Context / Trigger Conditions

  • Two or more PRs at mergeStateStatus: BEHIND with auto-merge armed, and no merges landing.
  • A branch that just finished a green run is BEHIND again before you can act on it.
  • CI minutes are climbing and the runs are mostly Merge branch 'main' into … commits that changed nothing in the branch's own code.
  • You are designing how a fleet of agents opens PRs — this is much cheaper to fix here than later.
# The one-line diagnosis: how many are BEHIND, and is anything DIRTY?
gh pr list --json number,title,mergeStateStatus \
  --jq 'group_by(.mergeStateStatus)[] | {state: .[0].mergeStateStatus, n: length}'

BEHIND in bulk is this skill. DIRTY is pr-conflict-from-mid-flight-merges — a real conflict, a different job, and nothing here will resolve it.

Read the full file on GitHub · 216 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 · 216 lines · 285 tokens per session scan A 110c3489e212

Subscribe to this mod's changes

merge-queue-thrash-stop-inflow-and-open-prs-as-drafts is a skill published in the GitHub repository wan-huiyan/agent-traffic-control (3 stars, last pushed 6d ago), licensed MIT. It adds 285 tokens to every session and 2,709 once invoked, about $0.0014 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-05.

Related

Other skills, from other repositories

claude-plugin-repo-ci-release

Wire up CI validation and automatic release-cutting for a Claude Code plugin or marketplace repo (a repo with a .claude-plugin/marketplace.json and plugins/). Adds two GitHub Actions — a structure validator that runs on every PR/push, and a release-on-version-bump job that cuts a GitHub Release whenever a VERSION file…

wan-huiyan/claude-ecosystem-hygiene · 308 tokens

abd-devops

ABD DevOps agent: scaffolds CI/CD, validates .env.example coverage, checks Dockerfile hygiene, and handles release tasks.

RealDougEubanks/ClaudeMarketplace · 30 tokens

swarm-migrate

Cross-repo migration swarm — one coordinator + N parallel subagents (one per target repo) that apply the same transformation, open PRs, wait for CI, and report back to a shared JSON ledger. Coordinator handles topology, conflict auto-rebase, and stop-on-novel-failure. Use when bumping a shared dependency, rolling out…

yonatangross/orchestkit · 103 tokens

push-ci

Push to remote and monitor CI. Validates branch safety, executes git push WITH explicit user approval, then monitors CI run status via gh CLI. Use when: user says 'push', 'push and watch CI', 'ship it', 'push-ci'. Not for: committing (use /smart-commit), creating PRs (use /create-pr), merging (use /merge-prep).

sd0xdev/sd0x-harness · 82 tokens

cloudflare-workers-ci-cd

Complete CI/CD guide for Cloudflare Workers using GitHub Actions and GitLab CI. Use for automated testing, deployment pipelines, preview environments, secrets management, or encountering deployment failures, workflow errors, environment configuration issues.

secondsky/claude-skills · 50 tokens

ops-ship

OPS on-demand: This skill should be used when the user asks to "ship ops plugin", "merge all PRs and…

Lifecycle-Innovations-Limited/claude-ops · 30 tokens