# Gh PR pickup designated branch supersede

> Gh PR pickup designated branch supersede is an open-source agent skill for developer tools. Finish someone else's draft PR on a designated branch without losing its commits. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/wan-huiyan/agent-traffic-control/tree/main/plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede
- **Repository:** https://github.com/wan-huiyan/agent-traffic-control
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** gh-pr-pickup-designated-branch-supersede
- **Collection:** https://github.com/wan-huiyan/agent-traffic-control
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-04

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/wan-huiyan/agent-traffic-control/tree/HEAD/plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede)
- [License: MIT](https://github.com/wan-huiyan/agent-traffic-control/tree/HEAD/plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede)

## Features

- **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

## Install

### Claude Code

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):

```sh
/plugin marketplace add wan-huiyan/agent-traffic-control
/plugin install agent-traffic-control@wan-huiyan-agent-traffic-control
```

Or copy only this skill to `~/.claude/skills/gh-pr-pickup-designated-branch-supersede`:

```sh
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.

### Codex

Copy the skill folder to `~/.agents/skills/gh-pr-pickup-designated-branch-supersede` to use it in every repository:

```sh
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.

### Cursor

Copy the skill folder to `~/.cursor/skills/gh-pr-pickup-designated-branch-supersede` to use it in every project:

```sh
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.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/wan-huiyan/agent-traffic-control.git --path plugins/agent-traffic-control/skills/gh-pr-pickup-designated-branch-supersede
```

Or copy the folder to `~/.gemini/skills/gh-pr-pickup-designated-branch-supersede` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/gh-pr-pickup-designated-branch-supersede`:

```sh
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.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git
```

Then 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.

## 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.

## Alternatives

- [Make PR](https://ai-powered.com/skills/make-pr): Make PR is an open-source agent skill for developer tools.
- [Git PR](https://ai-powered.com/skills/git-pr): Git PR is an open-source agent skill for developer tools.
- [Create PR](https://ai-powered.com/skills/create-pr): Create PR is an open-source agent skill for developer tools.
- [Commit push PR](https://ai-powered.com/skills/commit-push-pr-redpanda-data): Commit push PR is an open-source agent skill for developer tools.
- [Open draft PR](https://ai-powered.com/skills/open-draft-pr): Open draft PR is an open-source agent skill for developer tools.
- [Gh PR merge unstable state needs auto and watch branch deletes](https://ai-powered.com/skills/gh-pr-merge-unstable-state-needs-auto-and-watch-branch-deletes): Gh PR merge unstable state needs auto and watch branch deletes is an open-source agent skill for developer tools.
- [PR writer](https://ai-powered.com/skills/pr-writer): PR writer is an open-source agent skill for developer tools.
- [Make PR easy to review](https://ai-powered.com/skills/make-pr-easy-to-review): Make PR easy to review is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/gh-pr-pickup-designated-branch-supersede
