/agent-traffic-control:gh-squash-merge-closes-only-one-issuefrom agent-traffic-control
GitHub auto-close on squash-merge only catches ONE issue per PR even when the PR title/body says "Closes #447, #448, #449, #450". The first issue closes; the rest stay OPEN. Use when: (1) you opened a PR with a title or body listing multiple "Closes #X, #Y, #Z" references, (2) the PR squash-merged successfully (`gh pr view N --json state` = MERGED), (3) `gh issue list --state open` shows some of the referenced issues are still OPEN. Root cause: GitHub's auto-close keyword parser binds one keyword to one issue; "Closes #447, #448" is interpreted as "Closes #447" plus an inline reference to #448. Fix: either (a) write one keyword per issue ("Closes #447. Closes #448. Closes #449.") in the PR body BEFORE merging, or (b) post-merge, run `gh issue close $N --comment "Closed by PR #M (squash-merge auto-close caught only one)"` for each leftover. Different from `reland-work-that-missed-a-squash-merge` (which covers stranded COMMITS, not stranded ISSUES). Saves a "why are my issues still open after merging the fix?" detour.
Trending skills
7-day visitors to each skill page
Ships in agent-traffic-control. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You shipped a fix PR that addresses 4 filed issues. PR title:
fix(dashboard): wire /actions segment tiles + plug 4 audit P0s (closes #447, #448, #449, #450)
PR body opens with:
Closes #447, #448, #449, #450 — the four template/route P0s from the audit.
PR squash-merges cleanly. CI green, branch deleted. You move on.
Later: gh issue list --state open shows #448, #449, #450 still OPEN. Only #447 got auto-closed. You spend a confused minute checking whether the fix actually shipped (it did) before realising the issues never closed.
All of:
Closes #X, #Y, #Z (or Fixes, Resolves) reference.gh pr view N --json state returns MERGED, but gh issue view #Y returns OPEN for the second-and-later issues.This is not about the issues' content / labels / state. The fix did ship. The auto-close parser just bound the keyword to one issue.
Write one keyword per issue in the PR body. GitHub closes each:
## Summary
Bundles four P0 fixes from the 2026-05-07 audit.
Closes #447.
Closes #448.
Closes #449.
Closes #450.
Or comma-list with a keyword per item:
Closes #447, closes #448, closes #449, closes #450.
GitHub recognises close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved (any case). One keyword binds to the immediately-following issue ref; a bare comma + #N after it is a reference, not a close trigger.
If the PR is already merged with the broken comma-list pattern:
# Close each leftover issue with a reference comment
for issue in 448 449 450; do
gh issue close $issue \
--comment "Closed by PR #457 (squash-merge auto-close caught only one issue per PR)."
done
The comment makes the closure traceable — future readers won't wonder why the issue closed without a linked PR. The issue's GitHub timeline will still show the cross-reference from the merged PR's body.
When you have several PRs each closing several issues, batch the recovery:
# tuple format issue:pr — adjust to your set
for tuple in "448:457" "449:457" "450:457" "452:458" "454:459" "455:459"; do
issue=${tuple%:*}
pr=${tuple#*:}
gh issue close $issue \
--comment "Closed by PR #$pr (squash-merge auto-close caught only one issue per PR)."
done
gh issue list --state open --search "447 448 449 450 in:number"
# Empty output = all four closed.
Or per-issue:
gh issue view 448 --json state --jq '.state'
# CLOSED
Audit shipped 9 issues (#447–#455) in 4 PRs. Each PR's body said "Closes #X, #Y, #Z" comma-style. After all 4 PRs merged:
| PR | "Closes" body | Auto-closed | Stayed open |
|---|---|---|---|
| #457 | #447, #448, #449, #450 | #447 | #448, #449, #450 |
| #458 | #451, #452 | #451 | #452 |
| #459 | #453, #454, #455 | #453 | #454, #455 |
Recovered with the loop above — 6 gh issue close calls total, ~5 seconds. Future PRs in the same session used Path A formatting.
Sibling skill: reland-work-that-missed-a-squash-merge — covers stranded commits (you pushed more after the squash collapsed). Different mechanism, same family of "squash quietly drops things."
Why the parser does this: GitHub's "linked issues" feature was originally one-issue-per-PR. The keyword-to-comma extension came later and didn't fully generalise. Treating "Closes #X, #Y" as "Closes #X" + "reference to #Y" preserves backward compatibility with PR descriptions that mention related issues without intending to close them.
Title vs body: the parser reads BOTH the PR title and the body. If your title contains (closes #447, #448, #449, #450) and the body re-states it: still only #447 closes. Adding "Closes #448. Closes #449. Closes #450." anywhere in the body is enough; the title can stay parenthetical.
Linked issues UI on github.com: in the PR sidebar, "Development" / "Linked issues" should show all the issues the PR will close. If only one is listed there, the parser only matched one — fix the body BEFORE merging. (This UI signal is the cheapest preventive check.)
CLI users won't see the linked-issues UI when they gh pr create from a HEREDOC. Make path A the default formatting in your PR-template scripts.
Other auto-close keywords with the same behavior: Fixes, Resolves. Same fix patterns apply — one keyword per issue.
Opposite-intent sibling — closed correctly but PREMATURELY: a single Fixes #N does fire, but you wanted the issue HELD OPEN because the fix's proof is a deferred unattended run (a cron/scheduled job that hasn't fired yet — merge ≠ proven). Use Refs #N (non-closing) and close manually after the run, or gh issue reopen N if it already auto-closed. See verify-recurring-writer-before-unattended-window § Notes.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wan-huiyan/agent-traffic-control --plugin agent-traffic-control118 skills in this plugin
/agent-refusal-with-evidence-beats-literal-complianceA dispatched agent that does exactly what you asked can ship a defect you would
have stopped yourself, because it can see something at the worksite that you
could not see when you wrote the brief. Use when: (1) you are writing a brief
that prescribes a specific fix, threshold, wording or value rather than the
outcome you want; (2) an agent reports that it did not do what you asked and
you are deciding whether that is insubordination or judgement; (3) an agent
asserts "this is fine" or "not needed" with no measurement behind it; (4) you
are reviewing overnight output and want to know which decisions were checked
and which were assumed. Two halves, and both are needed: give the agent
explicit permission to satisfy the INTENT of an instruction while refusing its
letter, and REQUIRE the evidence with the refusal — what it built or measured,
what that showed, what it did instead. Evidence is the whole difference between
a refusal you can bank and one you have to re-litigate. Four agents correctly
declined an instruction in a single run; one built the suggested fix, measured
that it turned a silent safe refusal into a permanently red pipeline, and
reverted it unpushed.
/auto-merge-rearms-while-agent-live-kill-then-disarm-verifyDisarming auto-merge on a PR whose agent is still running does not hold it —
the agent re-arms within minutes and the PR merges, because arming is a step in
the agent's brief and disarming is not an instruction to the agent at all. Use
when: (1) you want to STOP a pull request from merging that an agent opened and
armed, for review, for a rethink, or because it is landing into a queue you are
trying to drain; (2) a PR you disarmed merged anyway; (3) you are telling agents
which PRs are on hold and want the hold to be enforced rather than announced;
(4) you are about to run `gh pr merge --disable-auto` and have not decided what
to do about the agent. The order is KILL THE AGENT FIRST, THEN DISARM, THEN
VERIFY the disarm by reading `autoMergeRequest` back — a disarm you did not read
back is not a hold. The stronger form needs no ordering at all: convert the PR
to a draft with `gh pr ready --undo`. A draft cannot merge whatever any agent
does to it, so the hold survives an agent you missed, an agent that restarts,
and an agent you did not know about.
/batch-member-cites-a-path-only-a-non-member-addsYou wrote something correct that the default reader cannot reach: a batch member citing a
path only a NON-member adds, or a rule, ruling or ledger sitting on an unlanded branch.
/batch-merge-subject-is-not-evidence-a-member-landedYou are about to close, delete the branch of, or mark as landed a pull
request because a batch, roll-up or merge-train commit on the target branch
names it in the subject line, and because the member's own commits all
predate that merge by wall clock. Neither of those is evidence. A batch
branch is assembled at some moment BEFORE it merges, so anything the member
pushed after assembly is outside it, and the subject records INTENT at
assembly time rather than CONTENT at merge time. Use before closing a
member, when an ancestry check against a squashed batch says no, or when a
member's branch still shows commits ahead of the target. Compare file
content against the target branch instead, expecting exactly one legitimate
difference: the shared aggregate file every member appends to.
/check-a-stale-branch-is-not-undoing-newer-main-workA branch built on an out-of-date main is about to merge, or has merged, and may undo work
that landed since. Use when a green, conflict-free PR deletes files you never touched,
newer values or a whole redesign vanish after a sibling PR merged, rows of a shared ledger
(tracker, registry, CHANGELOG) disappear or revert, or when `git diff main...HEAD` or a
reviewer says your small PR touches dozens of files you did not change.
/ci-leg-skipping-moves-minutes-it-does-not-remove-themYou are about to propose, price or approve a CI cost saving that works by
making a job or matrix leg SKIP on pull requests — a path filter, a safe
list, a changed-files gate, an exemption list. Check first whether the
pipeline runs a complement or backstop on merge, on push, or nightly:
many do, and then the legs a pull request skipped are exactly the legs some
later run executes, so a branch that goes green once and merges bills the
same total either way and the wall clock does not move at all. Use when
pricing a filter change, when a percentage saving is quoted with no basis,
or when choosing between filtering legs and batching pull requests. The
question that separates money from bookkeeping is whether the change
removes RUNS or merely moves LEGS.