← Skills Library
DevOps & Ops

CI Wait and Merge

Block on CI, fix nits, auto-merge when green. Monitors your PR from push to merged — polls CI, classifies review comments, implements nits and minors autonomously, merges on green.

How It Works

CI Wait and Merge · Workflow
Poll CI, classify reviews, fix nits, auto-merge when green.
TriggerPR just pushed · Open, non-draft PR you want merged this session
1
Poll CI until resolvedGATE
Check every 30s; STOP on failure or timeout — never auto-fix CI
failCheck failed or timed out → stop & report
2
Fetch & classify reviews
CodeRabbit + Gemini — Critical · Major · Minor · Nit by severity markers
3
Auto-fix trivial nitsGATE
Apply diffs, run selective tests, push fixes
failAny Major+ → surface to human, do not merge
4
Squash-merge & delete branch
Merge once green with no Major+ unresolved, then verify MERGED state
Merge report · CI verdict · review counts · nits fixed/skipped · MERGED + URL
  1. PR just pushed: Open, non-draft PR you want merged this session
  2. Poll CI until resolved: Check every 30s; STOP on failure or timeout — never auto-fix CI
  3. Fetch & classify reviews: CodeRabbit + Gemini — Critical · Major · Minor · Nit by severity markers
  4. Auto-fix trivial nits: Apply diffs, run selective tests, push fixes
  5. Squash-merge & delete branch: Merge once green with no Major+ unresolved, then verify MERGED state
  6. Merge report: CI verdict · review counts · nits fixed/skipped · MERGED + URL
ↆ download card

Invocation Triggers

/ci-wait-and-mergewait for CImerge when greenauto mergewatch CI

Use Cases

  • Push a PR and come back to find it already merged
  • Let an agent fix review nits while you work on something else
  • Stop manually polling CI and checking for review comments

The Problem

You push a PR. CI takes 8 minutes. You switch context. 40 minutes later you remember to check — CI passed but there are 3 review comments, two of which are typos and one is a missing error message. You fix them, push again, wait 8 more minutes. This cycle repeats. The wasted time is not the CI run — it is the forgotten checks and the context switching.

What It Does

  1. 1
    Identify the open PR and CI run

    Finds the current PR on the current branch, locates the CI run via gh CLI.

  2. 2
    Poll CI until resolved

    Checks status every 60 seconds, surfaces immediately on failure, continues on pass. Configurable timeout — defaults to escalating after 20 minutes.

  3. 3
    Triage CI failure if it occurs

    If CI fails, classifies the failure (test failure, lint error, build error), routes to the appropriate fix strategy, implements the fix and re-pushes.

  4. 4
    Fetch and classify review comments

    Pulls all review comments, classifies each as nit (typo, formatting, minor naming) / minor (small logic improvement, missing test, rename) / major (architecture, security, design issue). Implements nits and minors autonomously.

  5. 5
    Merge when green

    Once CI is green and no Major+ unresolved comments remain, merges the PR with squash and deletes the branch. Produces a summary of what was done.

What You Get / What It Doesn't Do

What you get
  • CI monitored to completion without polling
  • Nit and minor review comments resolved autonomously
  • PR merged with branch cleaned up
  • Summary of what was fixed vs what was left for human judgment
What it doesn't do
  • Fix failing tests that require new logic — that is quality-team
  • Resolve Major+ review comments that need product judgment
  • Merge if there are unresolved Major+ comments
  • Handle PRs with merge conflicts

Tips

Run immediately after pushing

The window between push and merge is dead time. Don't come back to check — let it run.

Major+ comments are yours to resolve

If a reviewer flags an architectural concern, that's your judgment call — not an autonomous fix.

Set a timeout expectation

If CI takes more than 20 minutes, it is surfaced rather than blocking indefinitely.

Get the Skill

Pro SkillPRO

Unlock the full CI Wait and Merge SKILL.md — drop it into ~/.claude/skills/ and trigger it by name.

What you unlock
  • CI monitored to completion without polling
  • Nit and minor review comments resolved autonomously
  • PR merged with branch cleaned up
  • Summary of what was fixed vs what was left for human judgment
...

Commonly Used With

Skills Library

29 more production skills ready to install.

Browse All Skills