
Gh PR pickup designated branch supersede
Finish someone else's draft PR on a designated branch without losing its commits
Gh PR pickup designated branch supersede is an open-source agent skill for developer tools. It is available on Claude Code.
- Scripts
- None
- Platforms
- Claude Code
- GitHub stars
- 5
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Gh PR pickup designated branch supersede
This skill covers a narrow git and GitHub situation: a session is asked to finish an open draft pull request, but the execution environment dictates a different branch name for all pushes. Instead of pushing to the PR's own head branch or rebuilding its work from main, the workflow bases the designated branch on the PR head so the existing commits and handoff documents carry over, optionally merges the latest main early to surface conflicts, and then opens a superseding pull request.
The guide walks the agent through the sequence: branch creation, an explicit-refspec push so the upstream points at the designated branch, opening the new PR with a supersede note, and then commenting on and closing the original draft. It also warns about two pitfalls: a bare git push can target the old PR branch once the upstream is set to a remote ref, and rewriting inherited commits to satisfy signature linters breaks shared history. Verification commands check the upstream, commit ordering, and PR states.
The skill expects a git repository with a GitHub remote and the gh command-line tool available. It is documentation only, with no scripts, and it does not apply when the target PR has already been merged.
When your agent uses it
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.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (5 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
This skill ships in the agent-traffic-control plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):
/plugin marketplace add wan-huiyan/agent-traffic-control
/plugin install agent-traffic-control@wan-huiyan-agent-traffic-controlOr copy only this skill to ~/.claude/skills/gh-pr-pickup-designated-branch-supersede:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/gh-pr-pickup-designated-branch-supersede &&
cp -R "$tmp/plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede" ~/.claude/skills/gh-pr-pickup-designated-branch-supersede &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/gh-pr-pickup-designated-branch-supersede inside it instead.
Copy the skill folder to ~/.agents/skills/gh-pr-pickup-designated-branch-supersede to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/gh-pr-pickup-designated-branch-supersede &&
cp -R "$tmp/plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede" ~/.agents/skills/gh-pr-pickup-designated-branch-supersede &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/gh-pr-pickup-designated-branch-supersede inside it instead.
Copy the skill folder to ~/.cursor/skills/gh-pr-pickup-designated-branch-supersede to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/gh-pr-pickup-designated-branch-supersede &&
cp -R "$tmp/plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede" ~/.cursor/skills/gh-pr-pickup-designated-branch-supersede &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/gh-pr-pickup-designated-branch-supersede inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/wan-huiyan/agent-traffic-control.git --path plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersedeOr copy the folder to ~/.gemini/skills/gh-pr-pickup-designated-branch-supersede yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/gh-pr-pickup-designated-branch-supersede:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/gh-pr-pickup-designated-branch-supersede &&
cp -R "$tmp/plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede" ~/.copilot/skills/gh-pr-pickup-designated-branch-supersede &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/gh-pr-pickup-designated-branch-supersede inside it instead.
Get the folder:
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.gitThen copy agent-traffic-control/plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede into your agent's skills folder as gh-pr-pickup-designated-branch-supersede. Agents that support SKILL.md read one folder per skill.
What it does
- Designated branch setup
- Shows how to create the required branch from the open PR head so its commits are preserved.
- Explicit push refspec
- Explains pushing with an explicit remote and branch to keep the upstream pointed at the right branch.
- Superseding pull request
- Describes opening a new PR that references the original and summarizes the added work.
- Closing the original draft
- Outlines commenting on and closing the superseded draft to avoid parallel open PRs.
- Signature linter guidance
- Advises checking author and committer identity before deciding whether to rewrite inherited commits.
- Verification commands
- Lists git and gh checks to confirm upstream, commit placement and PR states.
Good for
- Finish a teammate's draft pull request on a branch name the environment requires
- Create a superseding PR that keeps the original commits and handoff docs
- Check that a branch's upstream points to the designated remote branch before pushing
- Close an old draft PR after pointing it to its replacement
Gh PR pickup designated branch supersede FAQ
When does Gh PR pickup designated branch supersede not apply?
It does not apply if the picked-up PR is already merged. The guide then says to restart the designated branch from the latest default branch and treat the follow-up as fresh work.
Why push with an explicit refspec?
After checking out the designated branch from a remote ref, a bare git push can target the original PR branch, so the guide recommends git push -u origin with the designated branch name.
Should inherited commits be rewritten to fix signature warnings?
The guide advises against it. Inherited commits are already pushed unsigned on the open PR, so rewriting them breaks shared history; only the session's own tip commit should be amended if asked.
How do I install Gh PR pickup designated branch supersede in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/gh-pr-pickup-designated-branch-supersede to use it in all your projects, or to .claude/skills/gh-pr-pickup-designated-branch-supersede in one project. Or install the agent-traffic-control plugin, which includes it: /plugin marketplace add wan-huiyan/agent-traffic-control, then /plugin install agent-traffic-control@wan-huiyan-agent-traffic-control.
Does Gh PR pickup designated branch supersede run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Gh PR pickup designated branch supersede?
Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.
What are the best alternatives to Gh PR pickup designated branch supersede?
The closest alternatives to Gh PR pickup designated branch supersede are Make PR, Git PR, Create PR, Commit push PR and Open draft PR.
Where this comes from
- Description: from the skill's own SKILL.md.
More from wan-huiyan/agent-traffic-control

Teaches agents to refuse a flawed instruction only with measured evidence attached
- Open source
- 5 GitHub stars
- Developer tools

Catches silent deletions when a subagent edits large files with repeated blocks
- Open source
- 5 GitHub stars
- Developer tools

Holds a pull request from merging by stopping its agent, disarming auto-merge, then
- Open source
- 5 GitHub stars
- Developer tools

Checks that a batch of pull requests does not cite file paths that will never exist
- Open source
- 5 GitHub stars
- Developer tools

Checks whether a pull request truly landed by comparing file content, not commit subjects
- Open source
- 5 GitHub stars
- Developer tools

Checks a branch for stale-base changes that would silently undo newer main work
- Open source
- 5 GitHub stars
- Developer tools





