xt-merge

Merge open xt worktree pull requests in FIFO order with rebases.

4|1|Updated Nov 1, 2025
One-click install
npx skills add https://github.com/xtrm-dev/specialists --skill xt-merge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xt-merge
Source: https://github.com/xtrm-dev/specialists/tree/main/.xtrm/skills/default/xt-merge
Command: npx skills add https://github.com/xtrm-dev/specialists --skill xt-merge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill safely drains multiple open xt worktree pull requests in the correct order, preventing history drift, stale CI decisions, and avoidable rebase conflicts when several sessions are waiting to merge.

Core Features & Use Cases

  • FIFO PR queue handling: Finds open xt/ pull requests, sorts them by creation time, and merges the oldest first.
  • CI and SHA validation: Checks that the current PR head matches the CI run before merging, so a green result is still trustworthy after rebases.
  • Rebase cascade management: Rebases every remaining branch onto the new main after each merge to keep history linear.
  • Failure-aware workflow: Stops on auth, dirty working tree, lease violations, and unresolved conflicts so you can intervene safely.
  • Use case: When a project has several worktree sessions finishing at different times, this Skill turns the merge process into a repeatable queue instead of a manual branch-by-branch cleanup task.

Quick Start

Use the xt-merge skill to review the open xt/ pull request queue, verify the head PR’s CI, and merge the oldest branch while rebasing the remaining branches in order.

Frequently Asked Questions about xt-merge

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

FAQPage Schema
How do I merge multiple queued pull requests while keeping git history linear?

To keep git history linear, merge queued pull requests in FIFO order by creation time and rebase every remaining branch onto the new main after each merge. This prevents history drift and avoidable rebase conflicts.

How do I verify CI checks are still valid after a git rebase before merging a branch?

Verify CI checks after a git rebase by comparing the current PR head SHA against the SHA recorded during the CI run. Merging only when these SHAs match ensures the green result remains trustworthy.

What happens to the PR queue when a git rebase hits an unresolved conflict?

When a git rebase encounters an unresolved conflict, the merge queue stops automatically. This failure-aware workflow halts on dirty working trees and conflicts so you can safely intervene before proceeding.

Do I need authenticated GitHub CLI access to automate pull request merges?

Yes, automating pull request merges requires authenticated GitHub CLI access to verify CI checks, fetch branches, validate stale SHAs, and clean up branches after each successful merge operation.

What is the best way to drain a backlog of worktree pull requests without breaking history?

The best way to drain a worktree pull request backlog is processing open PRs sequentially from oldest to newest, rebasing remaining branches onto the updated main after each merge to maintain linear history.

Why does my pull request queue fail on lease violations or auth errors during automated merges?

Pull request queues fail on lease violations and auth errors because the workflow intentionally stops when it detects unsafe conditions, preventing stale CI decisions and unauthorized merges until you manually intervene.