landing-prs

Automates merging GitHub pull requests through the native merge queue, including stacked PRs.

1|Updated Apr 5, 2026
One-click install
npx skills add https://github.com/moolah-rocks/moolah-native --skill landing-prs-moolah-rocks
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: landing-prs
Source: https://github.com/moolah-rocks/moolah-native/tree/main/.claude/skills/landing-prs
Command: npx skills add https://github.com/moolah-rocks/moolah-native --skill landing-prs-moolah-rocks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Landing a pull request on a repo that uses GitHub's native merge queue involves more than clicking merge: automerge must be enabled, CI must pass on the queue branch, and stacked PRs risk merging into their parent's feature branch instead of main. This Skill automates the entire flow and watches until the PR actually merges. ## Core Features & Use Cases - Automerge and monitoring: Enables automerge on PRs targeting main and polls until the PR actually merges, reporting CI failures, conflicts, or queue removal. - Stacked PR handling: Detects PRs targeting a feature branch, waits for the parent PR to merge, retargets the child to main, then enables automerge automatically. - Failure recovery guidance: Reports terminal failure states (CI failure, merge conflict, closed parent, unmergeable queue entry) with instructions to fix and rerun. - Use Case: You open PR #42 stacked on PR #41. Run the land script once; a background watcher waits for #41 to merge, retargets #42 to main, enqueues it, and notifies you when it lands. ## Quick Start Ask the assistant to land PR number 42 using the landing-prs skill and watch it until it merges.

Frequently Asked Questions about landing-prs

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

FAQPage Schema
How do I merge a PR with GitHub's native merge queue?▼

Run the land-pr.sh script with the PR number; it enables automerge via gh pr merge --auto --rebase, which enqueues the PR in the native merge queue. A background watcher then polls until the PR actually merges or reports a failure.

How do I land a stacked PR without merging into the parent branch?▼

Run land-pr.sh on the child PR; it detects the non-main base, finds the parent PR, and starts a watcher. When the parent merges, the watcher retargets the child to main and only then enables automerge, avoiding the footgun of merging into the feature branch.

Why did my stacked PR merge into the parent branch instead of main?▼

GitHub automerge merges a PR into whatever branch it currently targets. If automerge was enabled while the base was still the parent's feature branch, the child merges there directly, bypassing the merge queue which only protects main.

What happens if CI fails while a PR is in the merge queue?▼

The watcher detects failed, cancelled, timed-out, or unmergeable states and exits nonzero with a desktop notification. Fix the underlying problem, push the change, and rerun land-pr.sh to re-enable automerge and restart monitoring.

Can I cancel a running PR watcher or remove a PR from the queue?▼

Kill the watcher with pkill -f 'watch-pr.sh <N> ' and disable automerge with gh pr merge <N> --disable-auto. If the PR is already in the queue, remove it from the GitHub UI.

Does the watcher keep running if I close the terminal?▼

Yes. The watcher is launched under nohup and disowned, so it survives terminal closure. Its log lives at .agent-tmp/landing-prs/watch-<N>.log and can be tailed at any time.