get-latest-ci
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGet Latest CI Information
获取最新CI信息
Fetch the latest CI pipeline execution for the current branch. This is a one-shot fetch — return results immediately. Do NOT poll, loop, or wait for status changes.
获取当前分支的最新CI流水线执行信息。这是一次单次获取——立即返回结果。请勿轮询、循环或等待状态变更。
Context
上下文信息
- Current Branch: !
git branch --show-current - Current Commit: !
git rev-parse --short HEAD
- 当前分支: !
git branch --show-current - 当前提交: !
git rev-parse --short HEAD
Step 0: Verify Nx Cloud Connection
步骤0:验证Nx Cloud连接
Read at workspace root. Check for or .
nx.jsonnxCloudIdnxCloudAccessTokenIf neither property exists, exit with:
Nx Cloud not connected. Unlock 70% faster CI and auto-fix broken PRs with https://nx.dev/nx-cloud读取工作区根目录下的文件,检查是否存在或。
nx.jsonnxCloudIdnxCloudAccessToken如果两个属性都不存在,则退出并输出:
Nx Cloud not connected. Unlock 70% faster CI and auto-fix broken PRs with https://nx.dev/nx-cloudStep 1: Fetch CI Status via Subagent
步骤1:通过Subagent获取CI状态
Spawn a subagent using the Task tool. The subagent will call the MCP tool and return results. Do NOT attempt to fetch CI information yourself — always delegate to the subagent.
general-purposeTask(
subagent_type: "general-purpose",
description: "Fetch latest CI status",
prompt: "Fetch the latest CI pipeline execution status. Do NOT use Bash for this.
Use the mcp__nx-mcp__ci_information MCP tool (or mcp__plugin_nx_nx-mcp__ci_information) with these parameters:
select: 'cipeStatus,cipeUrl,branch,commitSha,selfHealingStatus,verificationStatus,userAction,failedTaskIds,verifiedTaskIds,selfHealingEnabled,failureClassification,couldAutoApplyTasks,shortLink,confidence,confidenceReasoning'
Return ALL fields from the response as-is. Do not summarize or omit any fields.
If cipeStatus is FAILED and selfHealingStatus is COMPLETED or FAILED and there are failedTaskIds, make a SECOND call to the same MCP tool with:
select: 'taskOutputSummary,suggestedFix,suggestedFixReasoning,suggestedFixDescription'
Return those fields too. Only return the first page — do not paginate."
)使用Task工具启动一个(通用型)subagent。该subagent将调用MCP工具并返回结果。请勿自行尝试获取CI信息——务必委托给subagent处理。
general-purposeTask(
subagent_type: "general-purpose",
description: "Fetch latest CI status",
prompt: "Fetch the latest CI pipeline execution status. Do NOT use Bash for this.
Use the mcp__nx-mcp__ci_information MCP tool (or mcp__plugin_nx_nx-mcp__ci_information) with these parameters:
select: 'cipeStatus,cipeUrl,branch,commitSha,selfHealingStatus,verificationStatus,userAction,failedTaskIds,verifiedTaskIds,selfHealingEnabled,failureClassification,couldAutoApplyTasks,shortLink,confidence,confidenceReasoning'
Return ALL fields from the response as-is. Do not summarize or omit any fields.
If cipeStatus is FAILED and selfHealingStatus is COMPLETED or FAILED and there are failedTaskIds, make a SECOND call to the same MCP tool with:
select: 'taskOutputSummary,suggestedFix,suggestedFixReasoning,suggestedFixDescription'
Return those fields too. Only return the first page — do not paginate."
)Step 2: Report Results
步骤2:汇报结果
Based on the subagent's response, report to the user. Always include the CIPE URL when available.
根据subagent的响应结果,向用户进行汇报。只要CIPE URL可用,就务必包含该链接。
No CIPE found (null/empty response)
未找到CIPE(响应为空或无结果)
[get-latest-ci] No CI pipeline execution found for branch '<branch>'.[get-latest-ci] 未找到分支'<branch>'的CI流水线执行记录。CI Succeeded
CI执行成功
[get-latest-ci] CI passed!
[get-latest-ci] URL: <cipeUrl>
[get-latest-ci] Commit: <commitSha>[get-latest-ci] CI执行成功!
[get-latest-ci] 链接:<cipeUrl>
[get-latest-ci] 提交:<commitSha>CI In Progress / Not Started
CI执行中/未启动
[get-latest-ci] CI is <IN_PROGRESS|NOT_STARTED>.
[get-latest-ci] URL: <cipeUrl>
[get-latest-ci] Commit: <commitSha>If self-healing is also in progress, add:
[get-latest-ci] Self-healing: <selfHealingStatus> | Verification: <verificationStatus>[get-latest-ci] CI状态为<IN_PROGRESS|NOT_STARTED>。
[get-latest-ci] 链接:<cipeUrl>
[get-latest-ci] 提交:<commitSha>如果自修复也在进行中,添加以下内容:
[get-latest-ci] 自修复状态:<selfHealingStatus> | 验证状态:<verificationStatus>CI Failed — With Self-Healing Fix Available
CI执行失败——存在自修复可用方案
When AND AND :
cipeStatus == 'FAILED'selfHealingStatus == 'COMPLETED'suggestedFix != null[get-latest-ci] CI failed.
[get-latest-ci] URL: <cipeUrl>
[get-latest-ci] Commit: <commitSha>
[get-latest-ci] Failed tasks: <failedTaskIds>
[get-latest-ci]
[get-latest-ci] Self-healing fix available!
[get-latest-ci] Short link: <shortLink>
[get-latest-ci] Confidence: <confidence> — <confidenceReasoning>
[get-latest-ci] Verification: <verificationStatus>
[get-latest-ci] Auto-apply eligible: <couldAutoApplyTasks>
[get-latest-ci]
[get-latest-ci] Fix description: <suggestedFixDescription>
[get-latest-ci] Fix reasoning: <suggestedFixReasoning> (truncated to first page)当 且 且 时:
cipeStatus == 'FAILED'selfHealingStatus == 'COMPLETED'suggestedFix != null[get-latest-ci] CI执行失败。
[get-latest-ci] 链接:<cipeUrl>
[get-latest-ci] 提交:<commitSha>
[get-latest-ci] 失败任务ID:<failedTaskIds>
[get-latest-ci]
[get-latest-ci] 存在可用的自修复方案!
[get-latest-ci] 短链接:<shortLink>
[get-latest-ci] 置信度:<confidence> — <confidenceReasoning>
[get-latest-ci] 验证状态:<verificationStatus>
[get-latest-ci] 可自动应用:<couldAutoApplyTasks>
[get-latest-ci]
[get-latest-ci] 修复方案描述:<suggestedFixDescription>
[get-latest-ci] 修复方案说明:<suggestedFixReasoning>(仅返回第一页内容)CI Failed — Self-Healing In Progress
CI执行失败——自修复进行中
When AND :
cipeStatus == 'FAILED'selfHealingStatus == 'IN_PROGRESS'[get-latest-ci] CI failed. Self-healing is generating a fix...
[get-latest-ci] URL: <cipeUrl>
[get-latest-ci] Commit: <commitSha>
[get-latest-ci] Failed tasks: <failedTaskIds>
[get-latest-ci]
[get-latest-ci] Use /monitor-ci to wait for the fix and apply it.当 且 时:
cipeStatus == 'FAILED'selfHealingStatus == 'IN_PROGRESS'[get-latest-ci] CI执行失败。自修复正在生成修复方案...
[get-latest-ci] 链接:<cipeUrl>
[get-latest-ci] 提交:<commitSha>
[get-latest-ci] 失败任务ID:<failedTaskIds>
[get-latest-ci]
[get-latest-ci] 请使用/monitor-ci命令等待修复方案生成并应用。CI Failed — Self-Healing Failed or Not Available
CI执行失败——自修复失败或不可用
When AND ( is , , or ):
cipeStatus == 'FAILED'selfHealingStatusFAILEDNOT_EXECUTABLEnull[get-latest-ci] CI failed.
[get-latest-ci] URL: <cipeUrl>
[get-latest-ci] Commit: <commitSha>
[get-latest-ci] Failed tasks: <failedTaskIds>
[get-latest-ci] Self-healing: <selfHealingStatus or "not available">
[get-latest-ci] Classification: <failureClassification>If was fetched, include a brief summary of failures.
taskOutputSummary当 且(为、或)时:
cipeStatus == 'FAILED'selfHealingStatusFAILEDNOT_EXECUTABLEnull[get-latest-ci] CI执行失败。
[get-latest-ci] 链接:<cipeUrl>
[get-latest-ci] 提交:<commitSha>
[get-latest-ci] 失败任务ID:<failedTaskIds>
[get-latest-ci] 自修复状态:<selfHealingStatus或“不可用”>
[get-latest-ci] 失败分类:<failureClassification>如果已获取,请包含失败内容的简要总结。
taskOutputSummaryCI Failed — Environment Issue
CI执行失败——环境问题
When :
failureClassification == 'ENVIRONMENT_STATE'[get-latest-ci] CI failed due to environment issue.
[get-latest-ci] URL: <cipeUrl>
[get-latest-ci] Classification: ENVIRONMENT_STATE
[get-latest-ci]
[get-latest-ci] Use /monitor-ci to request an environment rerun.当时:
failureClassification == 'ENVIRONMENT_STATE'[get-latest-ci] CI因环境问题执行失败。
[get-latest-ci] 链接:<cipeUrl>
[get-latest-ci] 失败分类:ENVIRONMENT_STATE
[get-latest-ci]
[get-latest-ci] 请使用/monitor-ci命令请求重新运行环境。CI Canceled / Timed Out
CI已取消/超时
[get-latest-ci] CI was <CANCELED|TIMED_OUT>.
[get-latest-ci] URL: <cipeUrl>
[get-latest-ci] Commit: <commitSha>[get-latest-ci] CI已被<CANCELED|TIMED_OUT>。
[get-latest-ci] 链接:<cipeUrl>
[get-latest-ci] 提交:<commitSha>CI Failed — No Tasks Recorded
CI执行失败——无任务记录
When AND is empty AND is null:
cipeStatus == 'FAILED'failedTaskIdsselfHealingStatus[get-latest-ci] CI failed but no Nx tasks were recorded (likely infrastructure issue).
[get-latest-ci] URL: <cipeUrl>
[get-latest-ci] Check CI provider logs for details.当 且 为空 且 为时:
cipeStatus == 'FAILED'failedTaskIdsselfHealingStatusnull[get-latest-ci] CI执行失败,但未记录任何Nx任务(大概率是基础设施问题)。
[get-latest-ci] 链接:<cipeUrl>
[get-latest-ci] 请查看CI提供商的日志获取详细信息。Important
重要提示
- This skill is read-only. Do NOT apply fixes, push code, or modify anything.
- Always delegate the MCP call to a subagent. Do NOT call ci_information yourself.
- If the user wants to act on the results (apply a fix, monitor, etc.), suggest .
/monitor-ci - If the subagent returns an error, report it and suggest the user check their Nx Cloud connection.
- 该Skill为只读。请勿应用修复方案、推送代码或进行任何修改操作。
- 务必将MCP调用委托给subagent处理。请勿自行调用ci_information接口。
- 如果用户希望根据结果执行操作(如应用修复、监控状态等),建议使用命令。
/monitor-ci - 如果subagent返回错误,请向用户报告错误并建议检查Nx Cloud连接情况。