lucaswilliameufrasio/agent-skills/pr-merge-sequence
Claude Code and agent skill by lucaswilliameufrasio/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Merge one or more GitHub PRs in order with a normal merge, rebasing and revalidating each branch first. Use when asked to merge PRs, sequence merges, or rebase PR branches.
Install
npx vskill@latest install lucaswilliameufrasio/agent-skills/pr-merge-sequenceSKILL.md
The same SKILL.md was published earlier as lucaswilliameufrasio/agent-skills/pr-merge-sequence.
PR merge sequence
Use this workflow when several open pull requests must be merged without letting later PRs drift behind the base branch.
Before changing branches
- Confirm the repository, current branch, and
git status. Preserve any unrelated local work; do not reset or discard it. - List the requested PRs and inspect their base/head branches, draft state, mergeability, latest commit, checks, reviews, inline threads, and unresolved findings.
- Read applicable repository instructions and the user's merge/rebase preferences. Before rebasing, follow
git-delivery's base-refresh procedure: safely update the local base withgit pull --rebase, verify it against its upstream, and stop if it cannot be updated safely. Fetching alone is not the same as updating the local base. - Do not mark a draft ready or merge any PR until the user has authorized that state change.
Rebase and merge loop
- Before every feature/bugfix PR merge, refresh and verify the local base using the procedure above, then run
git rebase <updated-local-base>on the feature branch, even if it appears already current; Git may report that no changes are needed. Rewriting published history requires authorization; if the head changed, push only when authorized, using--force-with-leasewith the expected remote SHA, never plain--force. If a rebase conflicts or would overwrite unexpected work, stop and reconcile rather than dropping commits. Run the complete applicable gate on the resulting head; an old SHA's checks do not validate a changed head. - For the next PR in the user-specified order, verify its remote head matches the rebased commit, all required checks are green, and no unresolved valid review finding remains. Inspect new comments after each push/rebase; reply and resolve findings according to the user's established workflow. Do not dismiss a security finding merely to get a green review.
- Merge with a normal merge commit (for GitHub CLI,
gh pr merge <number> --merge). Never use squash or rebase merge when the user requires normal merge commits. - After each merge, update the local base with the same safe pull procedure and repeat the rebase/validation loop for the next requested feature/bugfix. Do not validate all branches against an old base and then merge the batch without refreshing it. Check for another base update before merging; if it moved, repeat the local-base pull, rebase, and validation before merging.
- Repeat until the requested sequence is complete. Do not merge unrelated PRs just because they are open or green.
Release branches are not feature branches
Discover the release workflow before applying the rebase loop. In a Gitflow project that promotes develop through a release branch, do not rebase the release onto main merely to satisfy a feature-branch freshness rule. Prepare the release from the updated development branch under the project's policy.
If that policy requires reconciling direct commits on main by rebasing develop onto main, do so before creating the release, not by patching only the release. Inspect divergence, exclusive release fixes, other worktrees and collaborators first. Rewriting a shared development branch requires explicit authorization, fresh validation, and a safe lease; do not recreate branches, discard commits, or bypass protection automatically. This is a conditional workflow, not a universal requirement for projects that use different release or back-merge policies.
Stop conditions
For explicitly confirmed billing-blocked Actions, use actions-billing-local-validation to complete equivalent local checks under the repository's approved substitution policy. Do not retry billing failures in a loop or bypass protection; real failures still block.
Pause before merging if a required check fails or is still running, a new actionable finding is unresolved, the PR is not mergeable, the head changed unexpectedly, or the rebase has conflicts. Report the concrete blocker and next safe action. A false positive should be explained with evidence and resolved; a valid finding should be fixed, tested, pushed, and re-reviewed.
Finish
Verify each requested PR's merged state and merge commit, confirm all surviving branches include the latest base, and report the final heads/checks. If the work included merges, preserve the sequence in the project progress record when the user requested that record be maintained.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/pr-merge-sequence/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lucaswilliameufrasio/agent-skills/pr-merge-sequence)