optimize-workflow

optimize-workflow is a command for coding agents from armanzeroeight/fastagent-plugins. It costs 15 tokens per session (640 once invoked), scanned A, original, MIT.

A guide to reviewing GitHub Actions workflow files for speed, cost, and maintainability. GitHub Actions runs automated jobs such as tests and builds when repository events occur.

In plain words
What is it for?
Use it to analyze workflow structure, improve job ordering and caching, optimize matrix runs, share artifacts, and reduce redundant CI runs.
Why use it?
It identifies repeated work, unnecessary dependencies, and missed opportunities for caching, parallel execution, and cancellation.

Command

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 commands/armanzeroeight/fastagent-plugins/optimize-workflow
Clone the repo
git clone --depth 1 https://github.com/armanzeroeight/fastagent-plugins

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for optimize-workflow

README.md
[![agentmods](https://agentmods.dev/badge/commands/armanzeroeight/fastagent-plugins/optimize-workflow.svg)](https://agentmods.dev/commands/armanzeroeight/fastagent-plugins/optimize-workflow)
Your own site
<a href="https://agentmods.dev/commands/armanzeroeight/fastagent-plugins/optimize-workflow"><img src="https://agentmods.dev/badge/commands/armanzeroeight/fastagent-plugins/optimize-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 640 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.00015 $0.00640
Opus 5 $0.00008 $0.00320
Sonnet 5 $0.00003 $0.00128
Haiku 4.5 $0.00002 $0.00064

Measured yesterday against content hash cfbca66f5fe6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

optimize-workflow 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 yesterday.

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/github-actions-toolkit/commands/optimize-workflow.md · 110 lines

How it starts

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

Optimize Workflow

Analyze a GitHub Actions workflow file and provide optimization recommendations.

Context

  • Workflow file: ![ -f "$1" ] && cat "$1" || find .github/workflows -name "*.yml" -o -name "*.yaml" | head -5
  • Repository structure: !ls -la

Your Task

Analyze the GitHub Actions workflow and provide specific optimization recommendations.

Arguments

  • $1: Path to workflow file (optional, will search .github/workflows if not provided)

Steps

  1. Identify the workflow file

    • If argument provided, use that file
    • Otherwise, list workflows in .github/workflows and ask user which to analyze
  2. Analyze workflow structure

    • Check for parallelization opportunities
    • Identify caching opportunities
    • Review job dependencies
    • Check for redundant steps
  3. Performance optimizations

    • Suggest caching for dependencies (npm, pip, cargo, etc.)
    • Recommend artifact usage for inter-job data sharing
    • Identify steps that can run in parallel
    • Check checkout depth (shallow clones)
    • Review matrix strategy efficiency
  4. Cost optimizations

    • Suggest concurrency controls to cancel redundant runs
    • Recommend appropriate runner types
    • Identify unnecessary jobs or steps
    • Check for over-testing (too many matrix combinations)
  5. Best practices

    • Verify actions are pinned to specific versions (SHA)
    • Check for hardcoded secrets (should use GitHub Secrets)
    • Review permissions (use least-privilege)
    • Suggest reusable workflows for common patterns
    • Check for proper error handling
  6. Security recommendations

    • Verify permissions are set appropriately
    • Check for OIDC usage with cloud providers
    • Review secret handling
    • Suggest environment protection rules if deploying
  7. Provide specific recommendations

    • List issues found with severity (high/medium/low)
    • Provide code snippets for fixes
    • Estimate potential time/cost savings
    • Prioritize recommendations by impact

Read the full file on GitHub · 110 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. yesterday First seen · 110 lines · 15 tokens per session scan A cfbca66f5fe6

Subscribe to this mod's changes

optimize-workflow is a command published in the GitHub repository armanzeroeight/fastagent-plugins (29 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 640 once invoked, about $0.0001 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-09-03.