SuperAPI AI 工具集

ci-monitor

部署与运维

查看项目

更新于 10-16 08:08

技能介绍

用途:在推送后监控 GitHub Actions CI 运行,自动识别仓库与分支、去重并发监控并报告结果。

主要能力:分支自动检测(优先 jj bookmarks,回退 git);通过哨兵文件 /tmp/{repo}-ci-monitor 去重防止重复监控;轮询等待分支上的 CI 运行出现(最多 60 秒);用 gh run watch --exit-status 监视直到完成;失败时取 gh run view --log-failed 的最后 3000 字符日志;始终清理哨兵文件。

使用方式:推送后以后台方式运行脚本:uv run ~/.claude/skills/ci-monitor/ci-monitor.py;可指定分支:uv run ~/.claude/skills/ci-monitor/ci-monitor.py --branch my-feature。从 Claude 调用时建议作为后台 Bash 命令运行并设置 run_in_background: true,避免阻塞对话。

退出码:0 表示 CI 通过或未发现运行;1 表示 CI 失败(打印日志)。

要求:已认证的 gh CLI,且仓库中存在 GitHub Actions 工作流。

限制:资料未提供其他平台支持、错误恢复细节或额外配置项。