Agent skill · posthog

triaging-merge-queue-failures

Decision procedure for a PR that failed or was removed from the Trunk merge queue: classify the kick (superseded by a newer commit, not mergeable, a gate that failed on a cancelled run, real failure, one-off flake, or repo-wide flaky/infra issue) and take the matching action (wait, hold and fix, requeue once, or escalate instead of spam-retrying). Use when a PR is kicked from the queue, Trunk reports a failed queue attempt on a PR, someone asks "why was my PR removed from the queue" or "should I requeue", or when running as the scheduled merge queue triage sweep. Trigger terms: merge queue kicked, removed from queue, queue failure, requeue, trunk merge failed. Operators setting up the automation itself: see references/routine-setup.md.

What it needs

About 13k tokens when loaded.

What this skill does

Triaging merge queue failures One triage is one PR plus its latest Trunk queue attempt: establish the facts, walk the decision chart below, and end with a verdict and its action. Runs are either interactive (a developer asked about a kicked PR) or unattended (a scheduled sweep over recent kicks); the chart is identical, only the actions you may take yourself differ. /merging-prs covers enqueueing and babysitting; this skill starts where it hands off, at a failed or removed queue entry. How Trunk reports queue state here Read this before writing any command. It is the part that goes stale. Trunk publishes no check run in this repository. The trunk-io app posts zero check runs — not on the PR head, not on the queue branch. A predicate like select(.name startswith("Trunk Merge Queue")) matches nothing, and a sweep built on it reports zero verdicts forever while the queue runs normally. /merging-prs, /debugging-ci-failures and AGENTS.md used to assert that check run exists; all three now point at trunk merge status instead. Trunk exposes queue state three ways. Only the first carries Trunk's own reasons; the other two are what the GitHub API can see, and they are what this skill's helpers read: 1. trunk merge status <n> (the CLI) — the full state machine with a reason per transition, in Trunk's words. This is the primary source for why, and the only one that surfaces conflicts, line-skips and cancellations at all. Human text only, no --json. The same timeline is exportable as JSON from the Trunk dashboard. 2. One sticky comment per PR, authored by trunk-io[bot], rewritten in place as state changes. It carries the current state, the failing check's name, and a link to the failing job. Rewritten means no history: earlier reasons are gone. It can also carry a Failed Test Failure Summary Logs table naming the failing test outright — check it before reading any log, and note it is empty for suites that do not upload results to Trunk. 3. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills posthog/triaging-merge-queue-failures

View the source on GitHub

Browse the @skills marketplace