ci
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCI Replicate & Status
CI 复现与状态
This skill enables the agent to efficiently monitor GitHub Actions, triage
failures, and bridge remote CI errors to local development. It defaults to
automatic replication of failures to streamline the fix cycle.
本技能可让Agent高效监控GitHub Actions、分类处理失败问题,并将远程CI错误关联到本地开发环境。它默认开启自动复现失败功能,以简化修复流程。
Core Capabilities
核心功能
- Automatic Replication: Automatically monitors CI and immediately executes suggested test or lint commands locally upon failure.
- Real-time Monitoring: Aggregated status line for all concurrent workflows on the current branch.
- Fail-Fast Triage: Immediately stops on the first job failure to provide a structured report.
- 自动复现:自动监控CI,一旦检测到失败,立即在本地执行建议的测试或代码检查命令。
- 实时监控:为当前分支上所有并行工作流提供聚合状态行。
- 快速失败分类:在首个作业失败时立即停止,生成结构化报告。
Workflow
工作流程
1. CI Replicate (replicate
) - DEFAULT
replicate1. CI 复现(replicate
)- 默认模式
replicateUse this as the primary path to monitor CI and automatically replicate
failures locally for immediate triage and fixing.
- Behavior: When this workflow is triggered, the agent will monitor the CI and immediately and automatically execute all suggested test or lint commands (marked with 🚀) as soon as a failure is detected.
- Tool:
node .gemini/skills/ci/scripts/ci.mjs [branch] - Discovery: The script automatically finds the latest active or recent run for the branch. Do NOT manually search for run IDs.
- Goal: Reproduce the failure locally without manual intervention, then proceed to analyze and fix the code.
将此作为监控CI并自动在本地复现失败以快速分类和修复的主要方式。
- 行为:触发此工作流后,Agent会监控CI,一旦检测到失败,就会立即自动执行所有建议的测试或代码检查命令(标记为🚀)。
- 工具:
node .gemini/skills/ci/scripts/ci.mjs [branch] - 实例发现:脚本会自动找到该分支最新的活跃或最近运行实例。请勿手动搜索运行ID。
- 目标:无需手动干预即可在本地复现失败,随后进行代码分析和修复。
1. CI Status (status
)
status2. CI 状态(status
)
statusUse this when you have pushed changes and need to monitor the CI and reproduce
any failures locally.
- Tool:
node .gemini/skills/ci/scripts/ci.mjs [branch] [run_id] - Discovery: The script automatically finds the latest active or recent run for the branch. You should NOT manually search for `run_id` using `gh run list` unless a specific historical run is requested. Simply provide the branch name.
- Step 1 (Monitor): Execute the tool with the branch name.
- Step 2 (Extract): Extract suggested `npm test` or `npm run lint` commands from the output (marked with 🚀).
- Step 3 (Reproduce): Execute those commands locally to confirm the failure.
- Behavior: It will poll every 15 seconds. If it detects a failure, it will exit with a structured report and provide the exact commands to run locally.
当你推送变更后,需要监控CI并在本地复现任何失败时使用此模式。
- 工具:
node .gemini/skills/ci/scripts/ci.mjs [branch] [run_id] - 实例发现:脚本会自动找到该分支最新的活跃或最近运行实例。除非需要特定历史运行实例,否则请勿使用手动查找
gh run list。只需提供分支名称即可。run_id - 步骤1(监控):使用分支名称执行该工具。
- 步骤2(提取):从输出中提取建议的或
npm test命令(标记为🚀)。npm run lint - 步骤3(复现):在本地执行这些命令以确认失败。
- 行为:它会每15秒轮询一次。如果检测到失败,会退出并生成结构化报告,同时提供可在本地运行的准确命令。
Failure Categories & Actions
失败类别与处理动作
- Test Failures: Agent should run the specific command suggested.
npm test -w <pkg> -- <path> - Lint Errors: Agent should run or the specific package lint command.
npm run lint:all - Build Errors: Agent should check output or build logs to resolve compilation issues.
tsc - Job Errors: Investigate for infrastructure or setup failures.
gh run view --job <job_id> --log
- 测试失败:Agent应运行建议的特定命令。
npm test -w <pkg> -- <path> - 代码检查错误:Agent应运行或特定包的代码检查命令。
npm run lint:all - 构建错误:Agent应检查输出或构建日志以解决编译问题。
tsc - 作业错误:通过调查基础设施或设置失败问题。
gh run view --job <job_id> --log
Noise Filtering
噪声过滤
The underlying scripts automatically filter noise (Git logs, NPM warnings, stack
trace overhead). The agent should focus on the "Structured Failure Report"
provided by the tool.
底层脚本会自动过滤无关信息(Git日志、NPM警告、堆栈跟踪冗余内容)。Agent应专注于工具提供的“结构化失败报告”。