loop-on-ci
它能做什么
让助手持续关注你分支的检查,并修复失败项,直到它们通过。适合希望获得免人工干预、直到构建变绿的循环的开发者。
适用场景
- ✓当你的拉取请求检查处于等待或失败状态,并且你希望修复它们时。
- ✓当你希望助手监视检查,并在每次推送后采取行动时。
- ✓当某项检查时好时坏,并且你希望重试一次并获得清晰报告时。
技能链接
https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/loop-on-ci/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请监视我拉取请求上的检查,修复任何失败的项目,并在全部变绿时停止。”
每周 5 个新技能,1 分钟读完。
工作原理
助手会读取拉取请求上的所有检查,先诊断任何失败,监视等待中的检查,并在每次推送后重新检查全部结果,直到全部通过。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Loop on CI
Trigger
Need to watch a branch or pull request and iterate on CI failures until all required checks are green.
Use gh pr checks as the source of truth. It includes all PR-attached checks, while gh run list only covers GitHub Actions.
Workflow
- Resolve the PR for the current branch.
- Inspect current PR checks before waiting.
- If checks already failed, diagnose those failures first.
- If checks are pending, watch with
gh pr checks --watch --fail-fast. - After each push, re-check the full PR check set and repeat until green.
Commands
# Resolve the active PR
gh pr view --json number,url,headRefName
# Inspect all attached checks
gh pr checks --json name,bucket,state,workflow,link
# Watch pending checks and fail fast
gh pr checks --watch --fail-fast
# GitHub Actions logs, when the failing check links to a GHA run
gh run view <run-id> --log-failed
Guardrails
- Keep each fix scoped to a single failure cause when possible.
- Do not bypass hooks (
--no-verify) to force progress. - If the failure is clearly unrelated to the PR and appears fixed on main, merge latest main instead of bloating the PR with unrelated fixes.
- If failures are flaky, retry once and report flake evidence.
- Re-run
gh pr checks --json name,bucket,state,workflow,linkafter every push; the check set can change.
Output
- Current CI status
- Failure summary and fixes applied
- PR URL once checks are green
常见问题
检查结果以什么为准?
以拉取请求检查命令为准,因为它包含附加在拉取请求上的所有检查。
如果失败与我的修改无关怎么办?
如果它在 main 上看起来已经修复,该技能会建议合并最新的 main,而不是添加无关的修复。
它会为了尽快完成而跳过 git 钩子吗?
不会。该技能说明不得为了强行推进而绕过钩子。
详情
作者的原始描述
Monitor PR checks and fix failures until green. Uses gh pr checks as the source of truth for PR-attached checks.
repo: cursor/plugins
热度
- GitHub 星标
- 15k
- 排名
- #10937
- 许可证
- —
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
advisor
15k如果你开启该功能,让你的智能体在关键节点咨询一个更强的第二模型,例如在重大决定之前,或在错误上卡住时。
check-agent-compatibility
15k全面检查 AI 编程智能体能否启动、验证和记录某个代码仓库,并返回一个兼容性评分以及主要问题。
cli-for-agents
15k教你的智能体设计或审查命令行工具,使 AI 智能体无需提示即可运行,并提供清晰的帮助文字和示例。
continual-learning
15k通过把回顾过往对话的工作交给专门的记忆更新程序,使你的 AGENTS.md 笔记保持最新。