/agent-traffic-control:gh-pr-pickup-designated-branch-supersedefrom agent-traffic-control
Finish somebody else's open draft pull request when your session must push to a different, designated branch name — base it on the PR head and supersede.
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: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A session is asked to "pick up PR #N and finish the tasks", but the execution harness (Claude Code on the web, GitHub-Action-spawned sessions, etc.) pre-designates a branch name for all pushes — different from PR #N's head branch — and forbids pushing anywhere else. Three tempting wrong moves:
# 1. Base the designated branch ON the PR head (keeps its commits + docs)
git fetch origin <pr-head-branch> main
git checkout -B <designated-branch> origin/<pr-head-branch>
# 2. If main moved since the PR forked, merge it now (one conflict pass early)
git merge origin/main -m "Merge main into <topic> continuation"
# 3. ...finish the work, commit...
# 4. PUSH WITH AN EXPLICIT REFSPEC — see trap below
git push -u origin <designated-branch>
# 5. Open the superseding PR; body says "Supersedes #N" + what was added
# 6. Comment on #N pointing to the new PR, then close #N (draft, unmerged)
checkout -B onto a remote ref hijacks your upstreamgit checkout -B <designated> origin/<pr-head-branch> sets the new branch's
upstream to origin/<pr-head-branch>. From then on a bare git push
(or pull) targets the ORIGINAL PR's branch — exactly what the harness
forbids — and git status -sb quietly shows
<designated>...origin/<pr-head-branch> [ahead N]. Always push with the
explicit form git push -u origin <designated-branch>; the -u repoints
the upstream at your own remote branch on first push.
Commit-identity/signature hooks ("commits will show as Unverified") list the
inherited PR commits too. Verify with
git log --format='%h %an %ae | %cn %ce' first: if author+committer already
match the required identity, the residual complaint is a missing
cryptographic signature you likely cannot produce in the container — and the
inherited commits are already pushed unsigned on the open PR, so rewriting
them buys nothing and breaks the shared history. Amend only YOUR tip commit
if asked; note that an API squash-merge at the end produces a
platform-signed commit on main regardless.
A merged PR is finished history; but an open superseded DRAFT should be
closed, not left dangling — two open PRs for one change is how parallel
sessions double-merge. Sequence: create the new PR first, comment on the old
one ("Superseded by #M, which contains both commits from this branch plus
"), then close it. Keep Refs #issue (not Closes) in the
new PR if the underlying issue is multi-part and stays open.
git status -sb # upstream must be origin/<designated-branch>
git log --oneline <pr-head-sha>..HEAD # your additions sit ON TOP of the PR
gh pr view <M> --json headRefName # new PR's head = designated branch
gh pr view <N> --json state # old PR = CLOSED, with pointer comment
2026-07-06, the-causal-impact-repo: PR #481 (branch
claude/execute-next-session-prompt-xmp68q, WIP draft "tests pending") was
picked up by a session whose designated branch was
claude/pr-481-the-causal-xvuiyv. The designated branch was reset onto the
PR head, main (one docs commit ahead) merged in, the missing tests + review
fixes committed on top, pushed with an explicit -u origin refspec, and
PR #482 opened with "Supersedes #481" in the body; #481 got a pointer comment
and was closed. The stop-hook's "unverified commits" warning listed the two
inherited #481 commits — left untouched (already pushed on #481); only the
session's own tip was amended.
gh-pr-create-orchestration-cwd-wrong-head (explicit
head selection), check-a-stale-branch-is-not-undoing-newer-main-work (why
the early main merge matters), gh-squash-merge-closes-only-one-issue
(issue-keyword hygiene in the superseding PR body).What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wan-huiyan/agent-traffic-control --plugin agent-traffic-controlOther plugins' skills for the same job
118 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-verify