闲社服务运行正常AI智能体自动化平台
g

SHA重跑审计

技能标识:github-actions-sha-rerun-debt-audit

Audit rerun debt by commit SHA to find commits that repeatedly burn CI minutes across workflows.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

SHA重跑审计

GitHub Actions SHA 重跑债务审计

使用此技能检测在多个工作流中触发重复 GitHub Actions 重跑和失败结果的提交。

该技能的功能

  • - 读取 GitHub Actions 运行 JSON 导出文件
  • 通过运行 ID 和每次运行的最新结果关联尝试历史
  • 按仓库 + 提交 SHA 聚合重跑债务
  • 使用重跑率、失败运行次数、工作流分布和浪费的重跑分钟数进行风险评分
  • 为 CI 门禁输出严重级别(ok、warn、critical)

输入参数

可选参数:
  • - RUNGLOB(默认值:artifacts/github-actions/*.json)
  • TOPN(默认值:20)
  • OUTPUTFORMAT(text 或 json,默认值:text)
  • MINRUNS(每个 SHA 的最小运行次数,默认值:3)
  • WARNRERUNRATE(0..1,默认值:0.25)
  • CRITICALRERUNRATE(0..1,默认值:0.45)
  • WARNFAILEDRUNS(默认值:2)
  • CRITICALFAILEDRUNS(默认值:4)
  • WARNWASTEDMINUTES(默认值:25)
  • CRITICALWASTEDMINUTES(默认值:75)
  • WARNWORKFLOWS(受影响的不同工作流数,默认值:2)
  • CRITICALWORKFLOWS(默认值:4)
  • WORKFLOWMATCH / WORKFLOWEXCLUDE(正则表达式,可选)
  • BRANCHMATCH / BRANCHEXCLUDE(正则表达式,可选)
  • EVENTMATCH / EVENTEXCLUDE(正则表达式,可选)
  • REPOMATCH / REPOEXCLUDE(正则表达式,可选)
  • HEADSHAMATCH / HEADSHAEXCLUDE(正则表达式,可选)
  • FAILURECONCLUSIONS(逗号分隔,默认值:failure,cancelled,timedout,startupfailure,actionrequired)
  • FAILONCRITICAL(0 或 1,默认值:0)

收集运行 JSON

bash
gh run view --attempt \
--json databaseId,runAttempt,workflowName,event,headBranch,headSha,conclusion,createdAt,updatedAt,runStartedAt,url,repository \
> artifacts/github-actions/run--attempt-.json

运行

文本报告:

bash
RUN_GLOB=artifacts/github-actions/*.json \
bash skills/github-actions-sha-rerun-debt-audit/scripts/sha-rerun-debt-audit.sh

JSON 输出 + 失败门禁:

bash
RUN_GLOB=artifacts/github-actions/*.json \
OUTPUT_FORMAT=json \
FAILONCRITICAL=1 \
bash skills/github-actions-sha-rerun-debt-audit/scripts/sha-rerun-debt-audit.sh

针对捆绑的测试数据运行:

bash
RUN_GLOB=skills/github-actions-sha-rerun-debt-audit/fixtures/*.json \
bash skills/github-actions-sha-rerun-debt-audit/scripts/sha-rerun-debt-audit.sh

输出约定

  • - 报告模式下退出码为 0(默认)
  • 当 FAILONCRITICAL=1 且一个或多个 SHA 组为严重级别时,退出码为 1
  • 文本模式打印摘要 + 排序后的 SHA 风险组
  • JSON 模式打印摘要 + 排序后的组 + 严重级别组

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 github-actions-sha-rerun-debt-audit-1776193801 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 github-actions-sha-rerun-debt-audit-1776193801 技能

通过命令行安装

skillhub install github-actions-sha-rerun-debt-audit-1776193801

下载

⬇ 下载 github-actions-sha-rerun-debt-audit v1.0.0(免费)

文件大小: 5.96 KB | 发布时间: 2026-4-15 13:28

v1.0.0 最新 2026-4-15 13:28
Initial release of the GitHub Actions SHA Rerun Debt Audit skill.

- Audits GitHub Actions run exports to detect commits that repeatedly trigger reruns and CI minutes usage.
- Aggregates and ranks rerun "debt" by repository and commit SHA.
- Scores and emits severity (`ok`, `warn`, `critical`) based on rerun rate, failure count, wasted minutes, and workflow spread.
- Highly configurable with environment variables and filters for SHAs, branches, workflows, events, and repositories.
- Supports text and JSON reports, with optional CI gate failure on critical findings.
返回顶部