monitor-ci-results
Skill692 starsChanged 6 days agoApache-2.0View on GitHub
Monitor remote CI results for a PR and autonomously launch
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- analyze-ci-failureSkill
- buildkite-get-resultsSkill
- conversation-doneSkill
- create-newsSkill
- create-prSkill
- merge-prSkill
- process-dependabot-prsSkill
- retry-ci-jobSkill
- review-codeSkill
- rule-creatorSkill
- sync-git-branch-continuouslySkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 7
When the user requests to monitor remote CI results or watch a pull request, or when monitoring CI after PR updates:
- Distinctive: line 14
Check Existing Process: Check if a monitor script is already running for
- Very specific: line 22
Launch Monitoring Script: If no monitor process is active for <pr_number>, launch the script via run_command with IsDaemon: true and …
- Very specific: line 35
Blocked Jobs (
.bazelci/presubmit.ymlApproval): When a Buildkite build is blocked on a manual approval step (e.g., when … - Very specific: line 43
Failure Reporting: When any GitHub check or Buildkite job completes with errors, monitor_remote_ci.py dispatches a high-priority …
- Very specific: line 52
If blocks-do-not-merge fails while the PR intentionally carries the "do not merge" label, treat it as an expected merge gate rather than a …
- Distinctive: line 61
Autonomous Flake Retry: If the CI Failure Analyzer subagent confirms that the failure is a transient infrastructure or network flake (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
When the user requests to monitor remote CI results or watch a pull request, or when monitoring CI after PR updates:
Note:
monitor_remote_ci.pyis a single long-running continuous task. It continuously watches all current and future CI runs for the PR. Do NOT launch duplicate monitoring jobs for the same PR.
- Check Existing Process: Check if a monitor script is already running for
this specific PR using
pgrep -af "[m]onitor_remote_ci.py <pr_number>". Do NOT use a generic grep without<pr_number>, as other active agent conversations may be monitoring different PRs concurrently. If one is already running for this PR, do not start another instance. Runpgrepas a standalone command—do NOT chain it with|| ... monitor_remote_ci.py <pr_number>in a single shell invocation, aspgrep -afwill match the parentbash -ccommand string and exit0. - Launch Monitoring Script: If no monitor process is active for
<pr_number>, launch the script viarun_commandwithIsDaemon: trueandWaitMsBeforeAsync: 500(do NOT append a trailing&, which causes the shell to exit immediately and kills the background process):
./.agents/skills/monitor-ci-results/scripts/monitor_remote_ci.py \
<pr_number> "<your_conversation_id>"✨ Autonomous Subagent Orchestration
- Background Polling:
monitor_remote_ci.pycontinuously polls both GitHub PR checks and Buildkite workflow executions in the background across new commits and CI re-runs. - Blocked Jobs (
.bazelci/presubmit.ymlApproval): When a Buildkite build is blocked on a manual approval step (e.g., when.bazelci/presubmit.ymlis modified),monitor_remote_ci.pyautomatically approves and unblocks it viabk job unblock <job_id> --no-inputso CI does not sit blocked. If automatic unblocking fails, it notifies the conversation viaagentapi send-message; unblock Buildkite jobs using theretry-ci-jobskill (retry_ci_jobs.py --pr <pr_number> --unblock). - Failure Reporting: When any GitHub check or Buildkite job completes
with errors,
monitor_remote_ci.pydispatches a high-priority notification message reporting the failed check back to your conversation.- Soft failures (e.g.
*rolling*Bazel) don't block merging, but the monitor counts them as passed. Before reporting that everything passed, list them withbk build view <build_number> --pipeline bazel/rules-python-python --json | jq '.jobs[] | select(.soft_failed) | {id, name}'and compare their failing tests with the latestmainbuild's. - If
blocks-do-not-mergefails while the PR intentionally carries the"do not merge"label, treat it as an expected merge gate rather than a code failure.
- Soft failures (e.g.
- Subagent Analysis: Upon receiving a failure notification message from
the monitoring script, immediately launch a separate subagent using the
invoke_subagenttool with the role "CI Failure Analyzer" to run theanalyze-ci-failureskill on the reported failure (instructing the subagent to pass its own subagent conversation ID toanalyze_ci_failure.pyso only its completion message wakes the parent). - Autonomous Flake Retry: If the CI Failure Analyzer subagent confirms
that the failure is a transient infrastructure or network flake (e.g. disk
I/O error, 504 gateway, sandbox initialization failure, or
setup-bazelfailing withUnable to find Bazelisk version), immediately and autonomously launch a separate subagent usinginvoke_subagentwith the role "CI Job Retrier" and the prompt template in.agents/skills/monitor-ci-results/retry-job-prompt.mdto run theretry-ci-jobskill for<pr_number>. Do not execute the script directly; use the subagent and skill orchestration instead. Continue monitoring without pausing to ask the user.
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
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.

