swarm-ci-monitor

Monitors CI checks on approved pull requests, fixes failures, and merges via gh CLI.

Updated Sep 14, 2026
One-click install
npx skills add https://github.com/pandejesal/drone-nav-sar --skill swarm-ci-monitor-pandejesal
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swarm-ci-monitor
Source: https://github.com/pandejesal/drone-nav-sar/tree/main/.swarm/bundled-skills/swarm-ci-monitor
Command: npx skills add https://github.com/pandejesal/drone-nav-sar --skill swarm-ci-monitor-pandejesal

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Getting an approved pull request across the finish line often stalls on flaky tests, stale checks, merge queues, and race conditions from concurrent pushes. This Skill automates the terminal closeout phase: it monitors CI on an already-reviewed PR, researches and fixes every failure, and merges only after rigorous safety gates pass. ## Core Features & Use Cases - Pre-flight safety gates: Verifies the PR is explicitly named, has reviewDecision APPROVED, and is MERGEABLE before doing anything, aborting if human review is incomplete. - Bounded fix loop: Classifies each CI failure (flake vs. real regression), applies per-type fix recipes composed from ci-fix-monitor, quarantines flaky test files correctly across four OS-specific quarantine files, and caps the loop at 5 iterations before escalating. - Safe merge with independent confirmation: Runs gh pr merge without strategy flags (supporting merge queues), then confirms the merge via the local git object DB rather than trusting the GitHub API alone. - Use Case: A reviewer approves a PR but CI shows a flaky macOS test and a BEHIND merge state. Invoke this Skill to rebase onto main, quarantine the flake in the correct OS-specific file, wait for green checks, and merge with post-merge verification. ## Quick Start Monitor and fix CI on approved pull request number 123, then merge it once all required checks are green.

Frequently Asked Questions about swarm-ci-monitor

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

FAQPage Schema
How do I automatically fix CI failures and merge a GitHub pull request?

Invoke this Skill on an approved PR by number. It fetches check runs with gh pr checks, classifies each failure, applies the matching fix recipe, pushes with --force-with-lease discipline, and merges with gh pr merge once all required checks are green.

How do I quarantine a flaky test in GitHub Actions CI?

Add the test's repo-relative file path to the correct quarantine file: the base file for unit tests, the macOS or Windows variants for OS-specific flakes, or the integration file for merge_group-only steps. Quarantine works at whole-file granularity only, never single test cases.

Can this Skill merge a pull request that has not been reviewed?

No. A hard pre-flight gate requires reviewDecision to be APPROVED before anything runs. The Skill aborts immediately if human review is incomplete and never negotiates or bypasses reviews.

Does gh pr merge work with merge queues?

Yes. The Skill runs gh pr merge with no merge-strategy flag, so branch protection decides the method. On queue-required branches the PR is enqueued, and the Skill polls until state is MERGED, escalating only after a 90-minute queue timeout.

What happens when the CI fix loop keeps failing?

The loop is capped at 5 fix iterations. When the budget is exhausted, or on terminals like un-approval, merge conflicts, or post-merge mismatch, the Skill escalates with the terminal reason, attempts made, last failing check, and current HEAD SHA.

Why does the Skill re-verify checks right before merging?

Check results can go stale between green detection and merge. Step 3 re-fetches checks for the current head SHA, re-verifies mergeable state and approval, and Step 4b confirms the merge SHA against the local git object DB as an independent gate.