supersede-pr

Close an old GitHub pull request and validate the replacement PR state.

33.3k|2.8k|Updated Oct 26, 2020
One-click install
npx skills add https://github.com/remix-run/remix --skill supersede-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supersede-pr
Source: https://github.com/remix-run/remix/tree/main/.agents/skills/supersede-pr
Command: npx skills add https://github.com/remix-run/remix --skill supersede-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Safely replace one GitHub pull request with another by closing the superseded PR explicitly and validating final PR states, avoiding reliance on closing keywords.

Core Features & Use Cases

  • Explicitly close superseded PRs with a traceable link to the replacement PR.
  • Validate replacement PR state (OPEN or MERGED) and confirm the old PR is CLOSED.
  • Useful when a user requests supersedence or guaranteed closure after a merge across PR-to-PR workflows.

Quick Start

Provide the old_pr and new_pr numbers to supersede and run the tool to close the old PR.

Frequently Asked Questions about supersede-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I replace a GitHub pull request with a new one and guarantee the old PR is closed?

To supersede a PR safely, you can use a tool that explicitly closes the old PR via the gh CLI and adds a 'Superseded by' comment linking to the replacement PR, avoiding reliance on closing keywords.

What is the safest way to close an old pull request when handing off to a replacement PR?

The safest way to close an old pull request during a PR-to-PR handoff is to explicitly close it using the gh CLI and validate that the replacement PR is in an OPEN or MERGED state before confirming the old PR is CLOSED.

How do I add a traceable link between a superseded pull request and its replacement on GitHub?

You can add a traceable link by using the gh CLI to append a 'Superseded by' comment to the old pull request, which explicitly references the new replacement PR number.

Do I need the gh CLI to automate closing superseded pull requests?

Yes, you need the gh CLI installed and authenticated, because the tool uses it to open, close, and validate the state of GitHub pull requests during the supersedence workflow.

Why should I explicitly close a superseded PR instead of using closing keywords in the replacement PR?

Explicitly closing a superseded PR ensures guaranteed closure and state verification, whereas relying on closing keywords in commit messages or descriptions can fail to close the old PR reliably.

What are the limitations of automating PR supersedence with the gh CLI?

This approach requires the replacement PR to be validated as either OPEN or MERGED, and it only handles PR-to-PR handoffs, meaning it cannot supersede issues or validate PRs outside of the GitHub workflow.