merge-and-ci

Manages PR-to-merge workflows with CI polling and auto-merge on GitHub.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/missingbulb/GoogleCalendarEventCreator --skill merge-and-ci-missingbulb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: merge-and-ci
Source: https://github.com/missingbulb/GoogleCalendarEventCreator/tree/main/.claudinite/local/packs/gcec/skills/merge-and-ci
Command: npx skills add https://github.com/missingbulb/GoogleCalendarEventCreator --skill merge-and-ci-missingbulb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Waiting on CI and landing pull requests in a Claude web session wastes wall time and tokens when done naively — duplicate workflow dispatches, tight polling loops, blocked sleep calls, and PRs stranded unmerged because a turn ended on an unreliable subscription. This Skill encodes the measured, low-cost way to open, watch, and merge PRs in this repository. ## Core Features & Use Cases - Early PR opening: Open PRs early for e2e, heavy-browser, and UI-snapshot changes whose reviewable artifacts only exist on CI. - Cheap CI polling: Poll check status via MCP on a 5s/10s/15s/30s back-off with backgrounded sleeps, avoiding duplicate workflow dispatches and blocked foreground sleeps. - Auto-merge strategy: Arm squash auto-merge for unattended runs, interpret arming refusals as state signals, and merge directly when checks are already green. - Post-merge discipline: Replace git checkout main with a plain git fetch origin main, with a one-retry policy on permission denials. - Use Case: An unattended scheduled run opens a fix PR mid-task; instead of ending the turn waiting on CI events, it arms auto-merge and finishes, letting GitHub land the PR the moment checks pass. ## Quick Start Use the merge-and-ci skill to watch this PR's CI and merge it when green without wasting polling time.

Frequently Asked Questions about merge-and-ci

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

FAQPage Schema
How do I wait for GitHub CI to go green in a Claude session?

Poll the check status via MCP on a back-off of 5s, 10s, 15s, then 30s repeating, with each sleep run in the background. Do real work or end the turn between polls instead of tight-polling or using one long sleep.

How do I auto-merge a GitHub PR when checks pass?

Call enable_pr_auto_merge with SQUASH so GitHub lands the PR once required checks pass. If arming is refused as unstable, keep polling and retry; if refused as already clean, squash-merge directly since the PR is ready.

Why was my sleep command blocked in a Claude web session?

The harness rejects standalone foreground sleeps like sleep 30 and requires run_in_background: true. Pass the background flag on every sleep in a polling loop starting with the first one to avoid a failed call and recovery overhead.

Should I manually dispatch a GitHub Actions workflow after pushing?

Usually no. A push through the in-session git proxy already triggers the test workflow on main and claude/** branches, and an open PR adds a pull_request run. Only dispatch manually when no run appeared at all.

Can I rely on PR activity subscriptions to know when CI is green?

No. Check-suite rollup events can arrive late or not at all, so a turn spent waiting on a subscription may never see the transition. Use MCP polling for merge-on-green, or arm auto-merge and end the turn.

Why skip git checkout main after merging a PR?

Nothing downstream reads the working tree: capture scripts write through git plumbing against the fetched remote tip, and conformance checks resolve origin/main. A plain git fetch origin main avoids checkout denials that have cost 30-57 seconds per session.