跳到正文
Skillpedia
部署与云(DevOps)7.1k · #13571

nx-ci-monitor

它能做什么

这个技能监控 Nx Cloud 的持续集成运行,并帮助处理失败,包括自动修复尝试。适合在 Nx 单体仓库中工作、并希望减少人工检查来保持流水线正常的开发者。

适用场景

  • ✓当你希望持续关注 CI 流水线,直到它完成时。
  • ✓当 Nx Cloud 流水线中的构建失败,并且你希望处理这次失败时。
  • ✓当你希望智能体在设定的时间和循环次数限制内自愈 CI 失败时。

技能链接

https://github.com/tech-leads-club/agent-skills/blob/main/packages/skills-catalog/skills/(tooling)/nx-ci-monitor/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“你能监控我分支的 CI 运行,并修复 Nx Cloud 能够自愈的任何失败吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会启动一个监视器,轮询流水线状态、读取结果并决定下一步行动。它会遵守循环次数、时间和详细程度的限制,并尊重你给出的任何指示。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

CI Monitor Command

You are the orchestrator for monitoring Nx Cloud CI pipeline executions and handling self-healing fixes. You spawn the ci-watcher subagent to poll CI status and make decisions based on the results.

Context

  • Current Branch: !git branch --show-current
  • Current Commit: !git rev-parse --short HEAD
  • Remote Status: !git status -sb | head -1

User Instructions

$ARGUMENTS

Important: If user provides specific instructions, respect them over default behaviors described below.

Configuration Defaults

Setting Default Description
--max-cycles 10 Maximum CIPE cycles before timeout
--timeout 120 Maximum duration in minutes
--verbosity medium Output level: minimal, medium, verbose
--branch (auto-detect) Branch to monitor
--subagent-timeout 60 Subagent polling timeout in minutes
--fresh false Ignore previous context, start fresh
--auto-fix-workflow false Attempt common fixes for pre-CIPE failures (e.g., lockfile updates)
--new-cipe-timeout 10 Minutes to wait for new CIPE after action
--local-verify-attempts 3 Max local verification + enhance cycles before pushing to CI

Parse any overrides from $ARGUMENTS and merge with defaults.

Nx Cloud Connection Check

CRITICAL: Before starting the monitoring loop, verify the workspace is connected to Nx Cloud.

Step 0: Verify Nx Cloud Connection

  1. Check nx.json at workspace root for nxCloudId or nxCloudAccessToken

  2. If nx.json missing OR neither property exists → exit with:

    [ci-monitor] Nx Cloud not connected. Unlock 70% faster CI and auto-fix broken PRs with https://nx.dev/nx-cloud
    
  3. If connected → continue to main loop

Session Context Behavior

Important: Within a Claude Code session, conversation context persists. If you Ctrl+C to interrupt the monitor and re-run /ci-monitor, Claude remembers the previous state and may continue from where it left off.

  • To continue monitoring: Just re-run /ci-monitor (context is preserved)
  • To start fresh: Use /ci-monitor --fresh to ignore previous context
  • For a completely clean slate: Exit Claude Code and restart claude

Default Behaviors by Status

The subagent returns with one of the following statuses. This table defines the default behavior for each status. User instructions can override any of these.

Status Default Behavior
ci_success Exit with success. Log "CI passed successfully!"
fix_auto_applying Fix will be auto-applied by self-healing. Do NOT call MCP. Record last_cipe_url, spawn new subagent in wait mode to poll for new CIPE.
fix_available Compare failedTaskIds vs verifiedTaskIds to determine verification state. See Fix Available Decision Logic section below.
fix_failed Self-healing failed to generate fix. Attempt local fix based on taskOutputSummary. If successful → commit, push, loop. If not → exit with failure.
environment_issue Call MCP to request rerun: update_self_healing_fix({ shortLink, action: "RERUN_ENVIRONMENT_STATE" }). New CIPE spawns automatically. Loop to poll for new CIPE.
no_fix CI failed, no fix available (self-healing disabled or not executable). Attempt local fix if pos
常见问题

它需要 Nx Cloud 吗?

需要。该技能要求连接 Nx Cloud,不涵盖其他 CI 系统。

我可以限制它的运行时间吗?

可以。它有默认的循环次数和总分钟数限制,你可以修改。

它会在我的电脑上运行任务吗?

不会。对于本地任务运行,该技能会指向另一个单独的 Nx 任务技能。

详情

作者的原始描述

Monitor Nx Cloud CI pipeline status and handle self-healing fixes automatically. Use when user says "watch CI", "monitor pipeline", "check CI status", "fix CI failures", or "self-heal CI". Requires Nx Cloud connection. Do NOT use for local task execution (use nx-run-tasks) or general CI debugging outside Nx Cloud.

repo: tech-leads-club/agent-skills

热度

GitHub 星标
7.1k
排名
#13571
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能