cmd-fix-github-actions

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/fix-github-actions

/fix-github-actions

Agent skill wrapper for the Claude command
/fix-github-actions
.
When the original command text references
{{INPUT}}
,
$1
, or named arguments, map them from the user's current request.
Agent skill wrapper for the Claude command
/fix-github-actions
.
当原始命令文本引用
{{INPUT}}
$1
或命名参数时,从用户当前请求中映射这些参数。

Command Instructions

命令说明

Fix GitHub Actions failures from recent workflow runs. Work in a git worktree under
.trees/
. Repeat up to $1 times (default 5).
修复最近工作流运行中的GitHub Actions失败问题。在
.trees/
目录下的git worktree中进行操作。重复最多$1次(默认5次)。

Process

流程

  1. Identify failures:
    gh run list --status=failure --limit=5
    then
    gh run view <run-id> --log-failed
    for details
  2. Create worktree: Branch from the failing ref into
    .trees/fix-ci-<short-description>
    — create
    .trees/
    if missing
  3. Analyze and fix: Categorize failure (test/build/lint/deps/other), fix root cause in the worktree
  4. Verify locally when possible (e.g.
    mix test
    ,
    mix format --check-formatted
    ,
    mix compile
    )
  5. Commit with descriptive message, push the fix branch
  6. Re-check:
    gh run watch
    — if still failing, continue next iteration
  1. 识别失败: 执行
    gh run list --status=failure --limit=5
    ,然后使用
    gh run view <run-id> --log-failed
    查看详细信息
  2. 创建工作树: 从失败的引用分支到
    .trees/fix-ci-<简短描述>
    ——如果
    .trees/
    目录不存在则创建
  3. 分析并修复: 对失败进行分类(测试/构建/代码检查/依赖/其他),在工作树中修复根本原因
  4. 尽可能本地验证(例如
    mix test
    mix format --check-formatted
    mix compile
  5. 提交并添加描述性消息,推送修复分支
  6. 重新检查: 执行
    gh run watch
    ——如果仍然失败,继续下一次迭代

Rules

规则

  • Fix root causes, not symptoms
  • Do not skip/disable tests or modify CI workflow config without human approval
  • Do not make unrelated changes
  • Keep each commit focused on the specific failure being fixed
  • 修复根本原因,而非表面症状
  • 未经人工批准,不得跳过/禁用测试或修改CI工作流配置
  • 不得进行无关更改
  • 每次提交需专注于当前要修复的特定失败问题

Stop and ask for human review if

出现以下情况时停止并请求人工审核

  • Same failure recurs 3+ times despite different fix approaches
  • Failure is caused by secrets, credentials, or external infrastructure
  • Fix requires significant architectural changes
  • CI workflow YAML itself needs modification
  • 尽管尝试了不同的修复方法,相同的失败仍重复出现3次以上
  • 失败由密钥、凭证或外部基础设施导致
  • 修复需要重大架构变更
  • CI工作流YAML本身需要修改