github-ci-fix
GitHub自动修复 GitHub CI/Actions 失败检查。支持通过 PR URL、仓库号或分支名触发,处理冲突合并、生成锁文件并推送代码。
Trigger Scenarios
Install
npx skills add Tracer-Cloud/opensre --skill github-ci-fix -g -y
SKILL.md
Frontmatter
{
"name": "github-ci-fix",
"description": "Fix failing GitHub CI \/ Actions checks via fix_github_pr_ci and push to the existing PR head, or fix a branch's failing CI via a linked repair worktree"
}
══════════════════════════════════════════════════════════ GITHUB CI FIX SKILL — interactive-shell action agent: ══════════════════════════════════════════════════════════
WHEN TO USE:
- The user asks to fix failing CI, broken GitHub Actions checks, failing PR
checks, a red pull request branch, or CI on a named branch such as
main. - The user says "fix CI on this PR", "fix the CI of PR 123 and push", "repair the failing checks on owner/repo#123", or provides a GitHub pull request URL and asks for CI/check fixes.
- The user asks to fix failing CI on a branch itself — "fix the CI on main", "main is red, fix it", or "fix CI on the default branch and push" — with no PR involved.
USE THIS TOOL:
fix_github_pr_ci
DO NOT USE THIS SKILL FOR:
- Ordinary PR reads, comments, closes, merges, labels, or issue work. Use
github_cli. - Security alert remediation. Use
fix_github_security_alert.
HARD RULES:
- For a GitHub PR URL, call:
fix_github_pr_ci(pr_url="<url>") - For
owner/repo#123or "PR 123 in owner/repo", call:fix_github_pr_ci(owner="owner", repo="repo", pr_number=123) - For "fix the CI on main" (or any named branch with no PR), call:
fix_github_pr_ci(branch="main")Never passbranchtogether with a PR selector, and never invent a branch the user did not name. - If no owner/repo is named, omit both and let the tool use the current checkout's GitHub origin.
- Never use
github_cliorshell_runto run rawgh pr checks,gh run view, checkout, commit, or push for this workflow. The CI fixer owns PR metadata, failing-check log inspection, fix execution, branch safety, commit, and push. - The tool pushes to the existing PR head branch after approval. Do not ask the user whether to open a new PR.
- A PR that conflicts with its base branch (GitHub shows it as not mergeable
and starts no checks) is handled by the tool: it merges the base branch into
the PR branch, resolves conflicts, regenerates lockfiles, pushes, and waits
for the checks. Never run
git merge,git rebase, or conflict edits around it. If it reports blocked files, relay that one line and stop. - For branch targets such as
main, the tool creates a separate linked git worktree, commits on a freshopensre/ci-fix-*branch, and pushes that branch. It never pushes directly to protected branches. - If the tool returns
response_text, output exactly that text and stop. - If
error_kindis set, reply in one short line fromerror. Do not say "next steps", do not add numbered options, do not list example commands, and do not ask a broad follow-up question.
Compact examples:
- "fix CI on https://github.com/Tracer-Cloud/opensre/pull/4597 and push" → fix_github_pr_ci(pr_url="https://github.com/Tracer-Cloud/opensre/pull/4597")
- "fix failing checks on Tracer-Cloud/opensre#4597" → fix_github_pr_ci(owner="Tracer-Cloud", repo="opensre", pr_number=4597)
- "fix CI on main in Tracer-Cloud/opensre and push" → fix_github_pr_ci(owner="Tracer-Cloud", repo="opensre", branch="main")
- "the current PR CI is failing, fix and push" → fix_github_pr_ci()
- "fix the CI on main" → fix_github_pr_ci(branch="main")
Version History
-
f22b81d
Current 2026-09-09 05:04
新增功能:在修复 CI 前自动将基础分支合并到存在冲突的 PR 中。
-
34b77c8
2026-09-03 06:26
移除对 Live incident RCA 的使用限制,不再调用 investigation_start 工具。
-
48aed16
2026-08-28 08:04
新增通过关联 worktree 修复非 PR 分支(如 main)CI 的功能,避免直接推送到受保护分支。
-
087938e
2026-08-27 19:28
新增直接针对分支(如 main)修复 CI 的功能,解决此前仅支持 PR 的局限;增加对已合并 PR 的防护及日志去重优化。
- 8bfe7b1 2026-08-19 21:46


