watch-ci

Monitor the current branch's PR for CI failures and review comments. Fix issues automatically and loop until clean.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "watch-ci" with this command: npx skills add langwatch/langwatch/langwatch-langwatch-watch-ci

Watch CI

Monitor the current branch's PR for CI failures and review comments. Fix issues automatically and loop until clean.

Flow

┌─► gh pr checks --watch (blocks, zero tokens) │ │ │ pass ▼ fail │ ┌────┴────┐ │ │ │ │ │ Read logs, diagnose, fix, push │ │ │ │ └────┬────┘ │ │ │ Check for unaddressed review comments │ │ │ none ▼ found │ ┌────┴────┐ │ │ │ │ │ Address comments, push │ │ │ │ └────┬────┘ │ │ │ ▼ │ CI still running? ──yes──► loop back │ │ │ no, all green │ ▼ │ Done ✓ └─────────────────────────────────

Steps

  1. Find the PR

gh pr view --json number,title,headRefName,url --jq '{number, title, headRefName, url}'

If no PR exists for the current branch, tell the user and exit.

  1. Wait for CI

Run this and let it block — it costs zero tokens while waiting:

gh pr checks --watch --fail-fast 2>&1

This blocks until all checks complete. Capture the exit code and output.

  1. Handle CI result

If CI passes (exit 0): proceed to step 4.

If CI fails (exit non-zero):

  • Get the failed check names from the output

  • Fetch the logs for each failed run: gh run view <run-id> --log-failed 2>&1 | tail -200

  • Diagnose the root cause from the logs

  • Fix the issue — edit files, run tests locally to verify

  • Commit and push: git add -A && git commit -m "fix: address CI failure - <brief description>" git push origin HEAD

  • Go back to step 2 (wait for CI again)

Max 3 fix attempts. If CI still fails after 3 pushes, report the situation to the user and stop.

  1. Check for review comments

gh pr view --json reviewDecision,reviews,comments --jq '{ reviewDecision, reviews: [.reviews[] | select(.state != "APPROVED" and .state != "DISMISSED") | {author: .author.login, state: .state, body: .body}], comments: [.comments[] | {author: .author.login, body: .body}] }'

Also check inline review comments:

gh api repos/{owner}/{repo}/pulls/{number}/comments --jq '[.[] | select(.position != null) | {path: .path, line: .line, body: .body, author: .user.login}]'

If there are unaddressed review comments or changes requested:

  • Read and understand each comment

  • Make the requested changes

  • Commit and push

  • Go back to step 2

If review is clean or approved: proceed to step 5.

  1. Report

Print a summary:

  • PR URL

  • CI status (green)

  • Review status

  • What was fixed (if anything)

If $ARGUMENTS contains --once , stop here. Otherwise, ask the user if they want to keep watching.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

challenge

No summary provided by upstream source.

Repository SourceNeeds Review
General

learn

No summary provided by upstream source.

Repository SourceNeeds Review
General

implement

No summary provided by upstream source.

Repository SourceNeeds Review
General

orchestrate

No summary provided by upstream source.

Repository SourceNeeds Review