agentleFS
IgorGanapolskyIgorGanapolsky/mac-yolo-safeguards/.agents/skills/ci-pr-monitor/SKILL.md

ci-pr-monitor

Skill3 starsChanged 4 days agoMITView on GitHub

Repeatable workflow for monitoring CI check status, tracking PR merge-readiness, and verifying auto-merge success using the gh CLI.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill whenever you need to verify GitHub Actions CI check status, track PR merge-readiness, or confirm auto-merge success.

    line 20
  2. Very specific:

    Auto-merge: If mergeable: MERGEABLE and mergeStateStatus: CLEAN, run gh pr merge <PR> --auto --squash.

    line 45
  3. Very specific:

    If state: "MERGED", the PR is already in main.

    line 52
  4. Very specific:

    Never gh run rerun a queued run — it's a no-op.

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CI-PR Monitor Skill

Use this skill whenever you need to verify GitHub Actions CI check status, track PR merge-readiness, or confirm auto-merge success.

Quick Commands

ActionCommand
List all checks for a PRgh pr checks <PR_NUM>
JSON status of a PRgh pr view <PR_NUM> --json state,mergeable,mergeStateStatus
Get required status contextsgh api repos/<owner>/<repo>/branches/<branch>/protection --jq '.required_status_checks.contexts[]'
Enable auto-merge (squash)gh pr merge <PR_NUM> --auto --squash
Wait for a specific checkgh pr checks <PR_NUM> --watch
Get workflow runs for a branchgh api repos/<owner>/<repo>/actions/workflows/<workflow>/runs --jq '[.workflow_runs[] | select(.head_branch=="<branch>")]'

Decision Flow

  1. Check current status: gh pr checks <PR> --json name,state,conclusion
  2. Classify results:
    • pass / SUCCESS → check is green
    • pending → still running, wait
    • fail / FAILURE → investigate the failing step
    • skipping → not applicable to this change
  3. Required checks only: Compare against the protected-branch required contexts. Non-required checks (e.g., macOS runners, mobile E2E) that remain pending should NOT block merge if all required checks are green.
  4. Auto-merge: If mergeable: MERGEABLE and mergeStateStatus: CLEAN, run gh pr merge <PR> --auto --squash. GitHub will queue the merge for when all required checks clear.

Notes

  • The mergeStateStatus field returns UNKNOWN once the PR is merged. If state: "MERGED", the PR is already in main.
  • Cloudflare/GitHub Actions queue storms: check GitHub Status API (https://www.githubstatus.com/api/v2/summary.json) before blaming code or runners if checks are missing (not failing).
  • Never gh run rerun a queued run — it's a no-op.
  • Auto-merge via --auto requires the pull-requests: write permission.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.