Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

github-actions-optimizerGitHub actions 优化器

Agent Skill

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

总安装

924

周安装

37

GitHub Stars

公开资料未说明

下载量

299
OpenClaw

安装说明

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

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:github-actions-optimizer(GitHub actions 优化器)
来源仓库:https://github.com/charlie-morrison/github-actions-optimizer
安装命令:
openclaw skills install github-actions-optimizer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

ClawHubOpenClaw
openclaw skills install github-actions-optimizer

简介

优化 GitHub Actions 工作流程的速度、成本、安全性和可靠性 - 分析运行时间、缓存策略、作业并行性和运行器选择。

SKILL.md

name
github-actions-optimizer
description
Optimize GitHub Actions workflows for speed, cost, security, and reliability — analyze run times, cache strategies, job parallelism, and runner selection.
metadata
tags
["github-actions", "ci-cd", "optimization", "devops", "automation"]

GitHub Actions Optimizer

Analyze and optimize GitHub Actions workflows for faster builds, lower costs, better security, and higher reliability. Reviews workflow files, run history, cache usage, and runner configurations. Use when CI is slow, expensive, or unreliable.

Usage

"Optimize my GitHub Actions workflows"
"Why are my CI builds so slow?"
"Audit my workflows for security issues"
"Reduce GitHub Actions costs"
"Find flaky steps in my CI pipeline"

How It Works

1. Workflow Discovery

# Find all workflow files
find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null

# Check recent run durations
gh run list --limit 20 --json name,status,conclusion,startedAt,updatedAt,databaseId | python3 -c "
import json, sys
from datetime import datetime
runs = json.load(sys.stdin)
for r in runs:
    start = datetime.fromisoformat(r['startedAt'].rstrip('Z'))
    end = datetime.fromisoformat(r['updatedAt'].rstrip('Z'))
    duration = (end - start).total_seconds() / 60
    print(f'{r[\"name\"]:30s} {r[\"conclusion\"]:10s} {duration:.1f}min')
"

2. Speed Optimization

Caching analysis:

  • Are dependencies cached? (actions/cache or actions/setup-node with cache)
  • Cache hit rate from recent runs
  • Missing cache keys for build artifacts, Docker layers, compiled assets
  • Cache size approaching 10GB limit?
  • Stale cache keys never cleaned up

Job parallelism:

  • Sequential jobs that could run in parallel
  • Large matrix builds that could be split
  • Test suites that could be sharded
  • Independent steps within a single job

Runner optimization:

  • Self-hosted vs GitHub-hosted: cost/speed tradeoff
  • Larger runners available? (ubuntu-latest-xl, ubuntu-latest-16-cores)
  • ARM runners for compatible workloads (30% cheaper)
  • Container jobs vs VM jobs

Build optimization:

  • Unnecessary checkout of full git history (fetch-depth: 0)
  • Redundant install steps across jobs
  • Tests running on every push instead of just PRs
  • Docker builds without layer caching
  • Missing path filters (trigger on irrelevant file changes)

3. Cost Reduction

Minute savings:

  • Identify most expensive workflows (minutes × frequency)
  • Timeout missing on long-running jobs (default: 6 hours!)
  • Concurrency groups to cancel redundant runs
  • Path filtering to skip irrelevant triggers
  • PR-only vs push+PR triggers

Storage savings:

  • Artifact retention too long (default: 90 days)
  • Large artifacts uploaded unnecessarily
  • Cache entries never evicted

4. Security Audit

  • Pinned actions: Using @v3 instead of SHA pinning
  • Secrets exposure: Secrets passed to untrusted steps
  • GITHUB_TOKEN permissions: Overly broad default permissions
  • Pull request target: Workflow runs on pull_request_target with checkout of PR head
  • Script injection: Untrusted input in run: blocks (${{ github.event.issue.title }})
  • Third-party actions: Unverified marketplace actions with broad permissions
  • Environment protection: Missing required reviewers on production deployments

5. Reliability

  • Retry strategy: Flaky steps without retry configuration
  • Timeout values: Missing or too generous timeouts
  • Error handling: continue-on-error hiding real failures
  • Status checks: Required checks that aren't actually running
  • Concurrency: Race conditions between parallel workflow runs

6. Modern Patterns

Recommend modern GitHub Actions features:

  • Reusable workflows for DRY CI
  • Composite actions for shared steps
  • Environments with deployment protection rules
  • OIDC for cloud authentication (no long-lived secrets)
  • Merge queues for safe main branch

Output

## GitHub Actions Optimization Report

**Workflows:** 5 | **Avg monthly minutes:** 12,400 | **Monthly cost:** ~$99

### ⚡ Speed Improvements

1. **Add dependency caching** — ci.yml
   Current: `npm ci` runs fresh every time (2m 15s)
   Fix: Add `cache: 'npm'` to `actions/setup-node`
   Savings: ~1m 45s per run × 180 runs/mo = 315 min/mo

2. **Parallelize test suites** — ci.yml
   Current: Unit + integration + e2e run sequentially (18 min)
   Fix: Split into 3 parallel jobs
   Savings: ~12 min per run (runs in 6 min instead of 18)

3. **Add path filters** — ci.yml
   Current: Triggers on all pushes including docs changes
   Fix: `paths-ignore: ['docs/**', '*.md', 'LICENSE']`
   Savings: ~40 unnecessary runs/mo × 18 min = 720 min/mo

### 🔐 Security Issues

4. **Unpinned action** — deploy.yml:12
   `uses: actions/checkout@v4` → pin to SHA
   
5. **Script injection risk** — pr-comment.yml:8
   `run: echo "${{ github.event.comment.body }}"` 
   → Use environment variable instead

6. **Broad GITHUB_TOKEN** — all workflows
   No `permissions:` block = read-write to everything
   → Add explicit `permissions: { contents: read }`

### 💰 Cost Savings
| Optimization | Minutes Saved/mo | $ Saved/mo |
|-------------|------------------|------------|
| Dependency cache | 315 | $2.52 |
| Path filters | 720 | $5.76 |
| Concurrency cancel | 200 | $1.60 |
| Timeout (6h → 30m) | ~0 (prevents surprise) | — |
| **Total** | **1,235** | **$9.88** |

Projected monthly: 12,400 → 11,165 min (-10%)

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

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

04

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

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

平台分布

OpenClaw

90.72%
按下载量换算271

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills