Community研究与数据分析github.com

ComposioHQ/gh-fix-ci

检查 GitHub PR 检查状态,拉取失败的 GitHub Actions 日志,总结失败上下文,然后创建修复计划并在用户批准后实施。

gh-fix-ci 是什么?

该技能主要用于调试和修复 GitHub PR 上失败的 CI/CD 检查。它通过 `gh` 命令定位失败的 PR 检查,获取 GitHub Actions 的日志,分析失败片段,并生成一个修复计划。在用户明确批准后,它才会实施该计划。 该技能依赖内置脚本 `scripts/inspect_pr_checks.py` 来执行主要操作,该脚本能处理 `gh` 字段变化并支持动态回退。对于非 GitHub Actions 的外部检查(如 Buildkite),技能仅报告其 URL 并将其标记为超出范围。 使用前需要确保 `gh` 已通过 `gh auth login` 认证并具备工作流/仓库作用域。技能的工作流包括验证认证、解析 PR、检查失败的运行、为外部检查限定范围、总结失败信息、使用 `plan` 技能草拟计划,并在用户批准后实现修复。最后,它会建议重新运行相关测试以确认修复成功。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/gh-fix-ci

Installed? Explore more 研究与数据分析 skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Gh Pr Checks Plan Fix

概述

使用 gh 定位失败的 PR 检查,获取 GitHub Actions 日志中可操作的失败信息,总结失败片段,然后在获得明确批准后提出修复计划并实施。

  • 依赖 plan 技能来草拟和批准修复计划。

前提:确保 gh 已认证(例如,运行一次 gh auth login),然后使用升级的权限(包括 workflow/repo 作用域)运行 gh auth status,以便 gh 命令成功执行。如果沙箱阻止了 gh auth status,请使用 sandbox_permissions=require_escalated 重新运行它。

输入

  • repo:仓库内的路径(默认为 .)
  • pr:PR 编号或 URL(可选,默认为当前分支的 PR)
  • 用于仓库主机的 gh 认证

快速开始

  • python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"
  • 如果需要便于总结的机器可读输出,请添加 --json。

工作流程

  1. 验证 gh 认证。
    • 在仓库中使用升级后的作用域(workflow/repo)运行 gh auth status,但需要先运行 gh auth login。
    • 如果沙箱中的认证状态失败,请使用 sandbox_permissions=require_escalated 重新运行该命令,以允许网络/密钥环访问。
    • 如果未认证,请让用户先登录。
  2. 解析 PR。
    • 优先选择当前分支的 PR:gh pr view --json number,url。
    • 如果用户提供了 PR 编号或 URL,则直接使用。
  3. 检查失败的检查(仅限 GitHub Actions)。
    • 推荐:运行捆绑的脚本(处理 gh 字段变化和作业日志回退):
      • python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "<number-or-url>"
      • 添加 --json 以获得机器可读的输出。
    • 手动回退:
      • gh pr checks <pr> --json name,state,bucket,link,startedAt,completedAt,workflow
        • 如果某个字段被拒绝,请根据 gh 报告的可选字段重新运行。
      • 对于每个失败的检查,从 detailsUrl 中提取运行 ID 并运行:
        • gh run view <run_id> --json name,workflowName,conclusion,status,url,event,headBranch,headSha
        • gh run view <run_id> --log
      • 如果运行日志显示仍在进行中,请直接获取作业日志:
        • gh api "/repos/<owner>/<repo>/actions/jobs/<job_id>/logs" > "<path>"
  4. 为非 GitHub Actions 检查限定范围。
    • 如果 detailsUrl 不是 GitHub Actions 运行,则将其标记为外部,并仅报告 URL。
    • 不要尝试 Buildkite 或其他提供商;保持工作流程精简。
  5. 为用户总结失败信息。
    • 提供失败的检查名称、运行 URL(如果有)以及简洁的日志片段。
    • 明确说明缺少的日志。
  6. 创建计划。
    • 使用 plan 技能草拟一个简洁的计划并请求批准。
  7. 批准后实施。
    • 应用批准的计划,总结差异/测试,并询问是否要打开一个 PR。
  8. 重新检查状态。
    • 更改后,建议重新运行相关测试和 gh pr checks 以确认。

捆绑资源

scripts/inspect_pr_checks.py

获取失败的 PR 检查,拉取 GitHub Actions 日志,并提取失败片段。如果仍有失败,则返回非零退出码,以便用于自动化。

使用示例:

  • python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "123"
  • python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --pr "https://github.com/org/repo/pull/123" --json
  • python "<path-to-skill>/scripts/inspect_pr_checks.py" --repo "." --max-lines 200 --context 40

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相关技能