← Back to blog

GitHub Actions optimizations: 18 best practices guides you can give to your agent to read

·By: Yonas Beshawred, Co-founder & CEO, StarSling
View in markdown
18 best practices guides: GitHub Actions optimizations you can give to your coding agent

Over the last few months we shipped three open-source agent skills that read your GitHub Actions workflows and fix what is wrong with them: ci-speedup for what is slowing CI down, ci-secure for the critical attack vectors, and ci-score for how your configuration grades overall. Every finding those skills report rests on a practice: a specific thing a workflow should do, and a specific reason it should.

Today those practices are all published in one place. The GitHub Actions best practices catalog is 18 reference pages, one per practice, grouped into the six categories the CI Score uses. They're all available in markdown and can be handed directly to a coding agent.

What is on each page

Every practice gets the same shape, built so you can check your own repo against it in two minutes:

  • What good looks like. The practice stated plainly, before any YAML.
  • A good and bad YAML pair. Side by side, and copyable whole.
  • How to verify it on your own repo. The command or the run view that shows you the practice is in place.
  • Seen in the wild. Public open-source repositories running the practice today.
  • The guardrails. How to keep the fix safe. Scoping a build to changed files keeps a full-run fallback, and moving a check off the critical path is for advisory output, not for the checks that run your tests.
  • A copy-paste agent prompt. Hand the page to your coding agent and it applies the practice to your workflows and opens a reviewable PR, grounded in the upstream GitHub docs the page cites.
  • A markdown mirror. Every page is also served as plain markdown at the same path plus .md, so an agent or an answer engine reads the content without executing a line of JavaScript.

The catalog

Caching and setup

Stop repeating work between runs.

Parallelization

Make the remaining work finish sooner.

Trigger scope

Do not start the run at all.

Required-check hygiene

Runner and queue

Time your team pays for before and after the useful work.

Security

The configuration side of the attack surface.

How the guides and the skills fit together

The skills and the guides are the same knowledge at two different moments.

The skills act on your repo. ci-speedup reads your own runs and tells you what is actually costing you wall-clock, which is usually not the thing you assumed. ci-secure checks the ten critical attack vectors an outsider can reach and reports each one as a plain-English attacker scenario. ci-score grades your configuration against pass-or-fail checks and gives you the six-category breakdown these guides are organized by. All three are open source and install in one command from the skills page.

The guides explain the practice, standing alone. That matters in three places: when you are deciding whether to accept a fix an agent proposed, when a teammate asks why the concurrency group is scoped the way it is, and when the practice hardens your configuration. Each skill owns the axis it checks, so ci-secure reports the attack paths an outsider can walk end to end, while pinning actions to commit SHAs and scoping id-token write are graded by ci-score and documented here.

Hand the whole catalog to your agent

The hub carries a master prompt that points an agent at the machine-readable index and every practice page, then walks your workflows against all 18. Paste this into your coding agent:

Audit this repository's GitHub Actions CI against StarSling's best practices catalog at https://starsling.dev/best-practices/github-actions.md, read each per-practice page it links, and fix what is missing. Show me the diff and open a PR for each change rather than applying anything blindly, and skip any practice that genuinely does not apply to this repo, noting why.

It works with every coding agent. The pages are public, the markdown mirrors are public, and the fixes land in your repo as PRs you review.

Start here

Read the catalog, or pick the page for whatever is annoying you most this week. If you would rather have the audit run for you, install the skills:

npx skills add starslingdev/skills

Then invoke /ci-speedup, /ci-secure, or /ci-score in your agent. All three are MIT licensed, live on the skills page, and are readable in full in the skills repo.