wait-merge-pr

Wait for GitHub CI checks to pass, then squash-merge the pull request and delete its branch.

Updated Mar 9, 2026
One-click install
npx skills add https://github.com/poitch/skills --skill wait-merge-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wait-merge-pr
Source: https://github.com/poitch/skills/tree/main/wait-merge-pr
Command: npx skills add https://github.com/poitch/skills --skill wait-merge-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gh, git, sleep.

What problem does it solve?

This Skill automates the process of waiting for all automated checks to pass on a pull request before merging it, ensuring code quality and preventing accidental merges of broken code.

Core Features & Use Cases

  • Automated CI/CD Integration: Ensures that all tests and checks pass before merging.
  • Safe Merging: Prevents merging of pull requests with failing checks.
  • Branch Cleanup: Automatically deletes the merged branch.
  • Use Case: After pushing a feature branch, you can invoke this skill to automatically monitor its CI status and merge it once all checks are green, then clean up the branch.

Quick Start

Use the wait-merge-pr skill to wait for checks and merge the current pull request.

Frequently Asked Questions about wait-merge-pr

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

FAQPage Schema
How do I automatically merge a GitHub pull request after CI checks pass?

You can automate merging a GitHub pull request after CI checks pass by using a skill that monitors the check status via gh CLI and squash-merges the PR once all statuses are green. It then cleans up the branch automatically.

What is the safest way to wait for GitHub checks before merging a pull request?

The safest way to wait for GitHub checks before merging is to poll the CI status and only proceed with the merge if all checks report success. This prevents merging broken code and ensures full test suite completion.

Do I need the gh CLI installed to automate pull request merges and branch cleanup?

Yes, you need the gh CLI installed to interact with GitHub for checking PR statuses and merging. You also need the git CLI for local branch operations and the sleep command for polling intervals.

Can I prevent merging a pull request with failing CI checks automatically?

Yes, you can prevent merging a pull request with failing CI checks by automating the wait process. The automation blocks the merge action until every configured GitHub check returns a successful status.

How do I automatically delete a local branch after squash-merging a pull request?

To automatically delete a local branch after squash-merging, an automation script can trigger git branch deletion commands once the GitHub pull request is successfully merged. This ensures your repository stays clean.