ha-merge-queue

A merge-queue checker for Home Assistant GitHub pull requests. A pull request is a proposed code change; the checker finds ones that meet the project’s conditions for merging.

In plain words
What is it for?
Use it to find open pull requests that can be merged immediately and near-ready ones that each need one specific follow-up.
Why use it?
It filters out changes with failed checks, missing approvals, conflicts, requested changes, or unfinished review discussions, reducing manual triage.

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

Made for: Claude Code, Codex.

Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,886 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.00072 $0.01886
Opus 5 $0.00036 $0.00943
Sonnet 5 $0.00014 $0.00377
Haiku 4.5 $0.00007 $0.00189

Measured today against content hash 899d68fb9942, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ha-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 today.

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.

.claude/skills/ha-merge-queue/SKILL.md · 133 lines

How it starts

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

Find Ready-to-Merge Pull Requests

Produce a shortlist of open PRs a maintainer can approve and merge immediately, plus a short list of near-misses that each need one specific nudge. Default to 10 candidates unless the user asks for a different number.

Gather candidates

Search open PRs, excluding those that are structurally not mergeable:

repo:home-assistant/core is:open is:pr draft:false status:success -review:changes_requested
  -label:"awaiting-frontend" -label:"stale" -label:"cla-needed"

Add label:"small-pr" for quick wins, or label:"code-owner-approved" / review:approved for PRs already carrying an approval. Run several searches and pool the results — no single query surfaces everything.

The search index lags reality by hours. Treat status: as a rough filter, never as proof; verify every finalist with the per-PR checks below.

Verify each finalist

Check all six conditions. A PR fails the shortlist if any of checks 1 through 5 fail.

Paginate every list response before deciding. Check runs, reviews and review threads are all paged, typically 30 per page, and a full-suite Home Assistant PR runs to 40-odd check runs — so page one shows a green subset while a failure or a standing review sits on page two. Compare the returned count against the reported total and keep fetching until they match.

  1. Merge-gate statuses — fetch the combined commit status. This is the cheapest and most informative call, and it is what actually blocks the merge button. Five contexts matter: code-owner-approval (required for Platinum integrations), required-labels (red when the author checked no "Type of change" box), docs-missing (red when a user-facing change has no documentation PR), cla-bot, and blocking-label-awaiting-frontend.

  2. Check runs — the commit statuses do not cover GitHub Actions. Fetch the check runs and require every one to have reached an acceptable terminal result: status must be completed, and conclusion must be success, skipped or neutral. Everything else disqualifies — failure, cancelled, timed_out, action_required and stale, and any run still queued or in_progress. A green combined status sitting on top of a red or still-running test job is common, so the status list alone is never enough.

Read the full file on GitHub · 133 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. today First seen · 133 lines · 72 tokens per session scan A 899d68fb9942

Subscribe to this mod's changes

ha-merge-queue is a skill published in the GitHub repository home-assistant/core (90,198 stars, last pushed today), licensed Apache-2.0. It adds 72 tokens to every session and 1,886 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.