supersede-pr
SKILL.md
Supersede PR
Overview
Use this skill to handle PR supersession end-to-end.
Do not rely on Closes #<number> to close another PR. GitHub closing keywords close issues, not pull requests.
Workflow
- Identify PR numbers and target repo.
- Capture
old_pr(the superseded PR) andnew_pr(the replacement PR). - Resolve the repo with
gh repo view --json nameWithOwner -q .nameWithOwnerwhen not provided.
- Create or update the replacement PR first.
- Open/push the replacement branch.
- Open the new PR.
- Include a traceable link in the PR body such as
Supersedes #<old_pr>.
- Close the superseded PR explicitly.
- Run:
./skills/supersede-pr/scripts/close_superseded_pr.ts <old_pr> <new_pr>
- This adds a comment (
Superseded by #<new_pr>.) and closes the old PR.
- Verify states.
- Confirm the superseded PR is closed:
gh pr view <old_pr> --json state,url
- Confirm the replacement PR status/checks:
gh pr checks <new_pr>
Rules
- Do not use
Closes #<old_pr>when<old_pr>is a pull request.
- Use
Closes/Fixesonly for issues. - Use
Supersedes #<old_pr>orRefs #<old_pr>for PR-to-PR linkage.
- Prefer explicit closure over implied automation.
- Always run the close command when the user asks to supersede a PR.
- Treat closure as incomplete until
gh pr view <old_pr>returnsCLOSED.
Script
Use the bundled script for deterministic closure:
scripts/close_superseded_pr.ts
Weekly Installs
1
Repository
remix-run/remixGitHub Stars
32.5K
First Seen
1 day ago
Security Audits
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1