跳到正文
Skillpedia
部署与云(DevOps)15k · #10937

loop-on-ci

它能做什么

让助手持续关注你分支的检查,并修复失败项,直到它们通过。适合希望获得免人工干预、直到构建变绿的循环的开发者。

适用场景

  • ✓当你的拉取请求检查处于等待或失败状态,并且你希望修复它们时。
  • ✓当你希望助手监视检查,并在每次推送后采取行动时。
  • ✓当某项检查时好时坏,并且你希望重试一次并获得清晰报告时。

技能链接

https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/loop-on-ci/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/cursor/plugins/blob/main/cursor-team-kit/skills/loop-on-ci/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Resolve the PR for the current branch.
  2. Inspect current PR checks before waiting.
  3. If checks already failed, diagnose those failures first.
  4. If checks are pending, watch with gh pr checks --watch --fail-fast.
  5. 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,link after 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能