Token导航 LogoToken导航TokenDH.com
待分类权限需确认github未标认证来源可访问许可证需确认审计未展示

github-actions-finopsGitHub actions finops 工具

Agent Skill

用于围绕 GitHub 仓库、Issue、Pull Request、分支、提交和代码协作流程提供辅助能力。它适合让 Agent 查询项目状态、整理变更、辅助创建或检查协作事项,并把仓库中的信息转成可执行的下一步。使用时需要区分只读查询和写入操作;涉及创建 PR、修改 Issue、推送分支或访问私有仓库时,应确认 token 权限、目标仓库范围和用户授权。

总安装

196

周安装

8

GitHub Stars

28

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:github-actions-finops(GitHub actions finops 工具)
来源仓库:https://github.com/laurigates/claude-plugins
仓库路径:skills/github-actions-finops
安装命令:
npx skills add https://github.com/laurigates/claude-plugins --skill github-actions-finops
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/laurigates/claude-plugins --skill github-actions-finops

简介

监控和分析 GitHub Actions 使用成本与资源消耗。

  • 帮助企业优化云资源支出和配额分配。
  • 识别闲置工作流和低效执行模式。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 依赖仓库级别的访问权限获取数据。
  • 生成可视化报告辅助决策制定。github-actions-finops 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
github-actions-finops
description
|
user-invocable
false
allowed-tools
Bash(gh api *), Bash(gh repo *), Bash(gh workflow *), Bash(gh run *), Read, Grep, Glob, TodoWrite
created
2025-01-30
modified
2026-02-11
reviewed
2025-01-30

GitHub Actions FinOps

Analyze GitHub Actions usage, costs, and efficiency across organizations and repositories.

When to Use This Skill

Use this skill when...Use X instead when...
Analyzing CI/CD costs and billingDebugging a specific failed workflow -- use gh-workflow-monitoring
Identifying wasted workflow runsSetting up new workflows -- use github-actions-workflows
Investigating workflow trigger patternsManaging cache keys -- use github-actions-cache-optimization
Comparing efficiency across reposMonitoring a single run -- use gh-workflow-monitoring

Context

  • Current repo URL: !git remote get-url origin
  • Workflow files: !find .github/workflows -maxdepth 1 -name '*.yml' -o -name '*.yaml'
  • Active workflows: !gh workflow list --json id,name,state

Execution

Execute this GitHub Actions FinOps analysis:

Step 1: Determine scope

Read the Context values above. Parse $OWNER and $REPO from the current repo URL (e.g., https://github.com/OWNER/REPO.git). Run gh api repos/$OWNER/$REPO --jq '.owner.type' to determine if the owner is an "Organization" or "User". If Organization, set $GITHUB_ORG to the repo owner for org-level billing queries.

If no repo context is available, ask the user for the target organization or repository.

Step 2: Fetch org-level billing (if org and admin access)

Query the Actions billing API:

gh api /orgs/$GITHUB_ORG/settings/billing/actions \
  --jq '{included_minutes, total_minutes_used, total_paid_minutes_used}'

If this returns a permissions error, note that admin access is required and skip to Step 3.

Optionally also check packages and storage billing:

gh api /orgs/$GITHUB_ORG/settings/billing/packages \
  --jq '{included_gigabytes_bandwidth, total_gigabytes_bandwidth_used}'

gh api /orgs/$GITHUB_ORG/settings/billing/shared-storage \
  --jq '{days_left_in_billing_cycle, estimated_paid_storage_for_month}'

Step 3: Analyze workflow runs

Fetch recent runs and group by workflow:

gh api "/repos/$OWNER/$REPO/actions/runs?per_page=100" \
  --jq '.workflow_runs | group_by(.name) |
        map({workflow: .[0].name, runs: length,
             conclusions: (group_by(.conclusion) | map({(.[0].conclusion // "unknown"): length}) | add)}) |
        sort_by(-.runs)'

Calculate run durations:

gh api "/repos/$OWNER/$REPO/actions/runs?per_page=20&status=completed" \
  --jq '.workflow_runs | group_by(.name) |
        map({name: .[0].name, count: length,
             total_seconds: (map(.run_started_at as $start | .updated_at as $end |
                            (($end | fromdateiso8601) - ($start | fromdateiso8601))) | add)}) |
        sort_by(-.count) | .[] | "\(.name): \(.count) runs, ~\(.total_seconds/60|floor)min total"'

Step 4: Detect waste patterns

Check each waste indicator:

Skipped runs:

gh api "/repos/$OWNER/$REPO/actions/runs?per_page=100" \
  --jq '[.workflow_runs[] | select(.conclusion == "skipped")] |
        group_by(.name) | map({workflow: .[0].name, skipped: length}) |
        sort_by(-.skipped)'

Bot-triggered runs:

gh api "/repos/$OWNER/$REPO/actions/runs?per_page=100" \
  --jq '[.workflow_runs[] | select(.triggering_actor.type == "Bot")] | length'

High-frequency workflows (candidates for path filters):

gh api "/repos/$OWNER/$REPO/actions/runs?per_page=100" \
  --jq '.workflow_runs | group_by(.name) | map(select(length > 50)) |
        map({workflow: .[0].name, runs: length})'

Step 5: Analyze workflow files

Read each workflow file from .github/workflows/ and check for:

  1. Missing concurrency: groups
  2. Missing paths: filters on push/PR triggers
  3. Missing bot-trigger guards (if: github.event.sender.type != 'Bot')

Step 6: Report findings

Print a summary with these sections:

  1. Billing summary (if available): minutes used, paid minutes, days left in cycle
  2. Workflow run counts: table of workflows with run counts and conclusion breakdown
  3. Waste indicators: skipped runs, bot triggers, high-frequency workflows, missing concurrency groups
  4. Recommendations: specific fixes for each waste pattern detected

Use these thresholds for flagging:

MetricRed Flag Threshold
Skipped runs>10% of total runs
Bot triggersBot-to-bot chains detected
Long durations>10min average
High frequency>50 runs/month without path filters
Duplicate runsSame commit triggers multiple runs

Step 7: Suggest fixes

For each waste pattern found, recommend the specific fix:

PatternFix
Bot-triggered wasteAdd if: github.event.sender.type != 'Bot' to jobs
Missing concurrencyAdd concurrency: { group: ${{ github.workflow }}-${{ github.ref }}, cancel-in-progress: true }
No path filtersAdd paths: with relevant source directories
Duplicate runsAdd concurrency groups with cancel-in-progress: true

API Reference

EndpointPurposeAdmin Required
/orgs/{org}/settings/billing/actionsMinutes usageYes
/orgs/{org}/settings/billing/packagesPackage bandwidthYes
/orgs/{org}/settings/billing/shared-storageStorage billingYes
/orgs/{org}/actions/cache/usageOrg cache statsNo
/repos/{owner}/{repo}/actions/runsWorkflow runsNo
/repos/{owner}/{repo}/actions/workflowsWorkflow definitionsNo

Agentic Optimizations

ContextCommand
Org billinggh api /orgs/$ORG/settings/billing/actions --jq '{included_minutes, total_minutes_used}'
List reposgh repo list $ORG --json nameWithOwner --limit 100
Workflow runsgh api "/repos/$O/$R/actions/runs?per_page=100" --jq '.workflow_runs' --jq 'length'
Skipped count`gh api "..." --jq '[.workflow_runs[]select(.conclusion == "skipped")]length'`
Bot triggers`gh api "..." --jq '[.workflow_runs[]select(.triggering_actor.type == "Bot")]length'`

See Also

  • github-actions-cache-optimization - Cache-specific analysis and cleanup
  • gh-workflow-monitoring - Watching individual workflow runs

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.44%
按下载量换算20

Claude

31.94%
按下载量换算20

Cursor

18.89%
按下载量换算12

Gemini CLI

9.21%
按下载量换算6

安全审计

暂无安全审计结果可展示。

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills