optimize-runner-usage

A GitHub Actions workflow optimizer that adds rules for skipping irrelevant changes, cancelling superseded runs, and limiting job duration.

In plain words
What is it for?
Use it on existing files in .github/workflows/ to add paths-ignore filters, concurrency groups, and timeout-minutes settings.
Why use it?
It reduces wasted CI runs, GitHub Actions minutes, and runner time when changes do not need testing or an older run is no longer useful.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/cboone/agent-harness-plugins/optimize-runner-usage
Any agent
npx skills add cboone/agent-harness-plugins --skill optimize-runner-usage
Clone the repo
git clone --depth 1 https://github.com/cboone/agent-harness-plugins

Made for: Claude Code, Codex.

Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,297 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00130 $0.02297
Opus 5 $0.00065 $0.01149
Sonnet 5 $0.00026 $0.00459
Haiku 4.5 $0.00013 $0.00230

Measured 2d ago against content hash 34110fe309a0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

optimize-runner-usage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/optimize-runner-usage/skills/optimize-runner-usage/SKILL.md · 210 lines

How it starts

The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Optimize Runner Usage

Scan existing GitHub Actions workflows and add missing runner-usage optimizations: paths-ignore filters, concurrency groups, and timeout-minutes on jobs.

Private GitHub repos pay for Actions minutes, and macOS runners cost 10x Linux runners. These optimizations reduce wasted minutes by skipping unnecessary runs, cancelling superseded builds, and preventing runaway jobs.

Workflow

1. Scan for Workflow Files

Use Glob to find all .yml and .yaml files in .github/workflows/.

If the .github/workflows/ directory does not exist, abort with:

No .github/workflows/ directory found. This skill optimizes existing GitHub Actions workflows. Invoke the set-up-ci skill to create a CI workflow from scratch.

If no workflow files are found, abort with:

No workflow files found in .github/workflows/. Invoke the set-up-ci skill to create a CI workflow.

2. Classify Each Workflow

Read each workflow file and classify it based on its on: triggers.

GitHub Actions allows on: in multiple forms:

  • Mapping form: on: { push: ..., pull_request: ... } (or multi-line equivalents)
  • Single-event shorthand: on: push
  • Multi-event shorthand: on: [push, pull_request]

Before classifying, normalize shorthand forms to mapping shape:

  • on: push becomes on: { push: {} }
  • on: [push, pull_request] becomes on: { push: {}, pull_request: {} }

If applying edits would require rewriting on: from shorthand into a mapping (for example, to add paths-ignore under push:), perform the rewrite explicitly, updating on: to a mapping while preserving existing semantics.

Then classify workflows using the normalized on: structure:

Trigger pattern Classification
pull_request: (any configuration) CI
push: with branches: (optionally plus pull_request:) CI
push: with tags: only (no branches: or pull_request:) Release
push: with both branches: and tags: Mixed
schedule: / workflow_dispatch: only Scheduled
Bare push: with no filters Broad push
Workflow name or filename contains secret scanning keyword Secret scanning
workflow_call: trigger Reusable

Read the full file on GitHub · 210 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 210 lines · 130 tokens per session scan A 34110fe309a0

Subscribe to this mod's changes

optimize-runner-usage is a skill published in the GitHub repository cboone/agent-harness-plugins (2 stars, last pushed 1mo ago), licensed MIT. It adds 130 tokens to every session and 2,297 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

os-rust-backend-ci

Use this skill when the user wants to set up, configure, debug, or extend a GitHub Actions pipeline for a Rust backend that runs CI checks and produces a container image artifact in GHCR. Scope is testing + artifact only — deployment is intentionally out of scope. Trigger on: PR checks (fmt, clippy, tests, OpenAPI /…

open-software-network/os-clovy · 256 tokens

headless-claude-code

Reference guide for running Claude Code in third-party headless, container, and CI environments. Covers auth strategies, interactive mode pitfalls, tmux orchestration, root user workarounds, and git auth without SSH agents or keychains.

vellum-ai/vellum-assistant · 53 tokens

ci-all

Full CI pipeline: run local tests, type check, push branch, and return the pipeline URL. The only command you need before opening a PR.

FlorianBruniaux/claude-code-plugins · 33 tokens

ci-pipeline

Push current branch and return the pipeline tracking URL (GitLab or GitHub Actions).

FlorianBruniaux/claude-code-plugins · 21 tokens

npm-release

Guide for setting up automated npm package releases via GitHub Actions using Trusted Publishing (OIDC). Use when creating release workflows, publishing to npm, or troubleshooting CI/CD publish failures.

OzzyCzech/dotfiles · 39 tokens

gitlab-cli

Reference guide for GitLab CLI (glab) commands. Use when running glab commands for issues, merge requests, pipelines, releases, or CI/CD operations, or when the user asks about GitLab CLI syntax.

OzzyCzech/dotfiles · 48 tokens