github-actions-patterns

github-actions-patterns is a skill for Claude Code, Codex from sawrus/agent-guides. It costs 45 tokens per session (743 once invoked), scanned A, original, MIT.

A guide to building and reviewing GitHub Actions workflows, which automate checks, tests, and deployments when code changes.

In plain words
What is it for?
Use it when creating or debugging workflow files for linting, type checks, tests, coverage, reusable jobs, cloud access through OIDC, matrix builds, or deployment gates.
Why use it?
It helps prevent fragile or repetitive CI/CD setups and addresses common needs such as authentication, caching, parallel test combinations, and protected deployments.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when creating or debugging workflow files for linting, type checks, tests, coverage, reusable jobs, cloud access through OIDC, matrix builds, or deployment gates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawrus/agent-guides/github-actions-patterns
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.

Any agent
npx skills add sawrus/agent-guides --skill github-actions-patterns
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

Made for: Claude Code, Codex.

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 github-actions-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/sawrus/agent-guides/github-actions-patterns/github.svg)](https://agentmods.dev/skills/sawrus/agent-guides/github-actions-patterns)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/github-actions-patterns"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/github-actions-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for github-actions-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/sawrus/agent-guides/github-actions-patterns"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/github-actions-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 743 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 138
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 148
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 150
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 150
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Excessive Agency · line 195
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.1 $0.00045 $0.00743
Opus 5.5 $0.00018 $0.00297
Sonnet 5.5 $0.00009 $0.00149
Haiku 4.5 $0.00005 $0.00074

Measured 1mo ago against content hash ab6b2b7c230e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

github-actions-patterns 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 1mo 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.

areas/devops/ci-cd/skills/github-actions-patterns/SKILL.md · 58 lines

How it starts

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

GitHub Actions: change and debug a workflow

1. Read the current workflows

  1. List .github/workflows/*.yml and the on: triggers of each file.
  2. Find reusable workflows (on: workflow_call) and composite actions under .github/actions/.
  3. Change the reusable workflow only when the task says so; otherwise change the caller.

2. Make the change

  1. Set permissions: at the top of the workflow to the minimum, for example contents: read. Grant more per job only where a step needs it.
  2. Pin every third-party action to a full commit SHA and keep the version in a comment: uses: actions/checkout@<40-char-sha> # v4.2.2.
  3. Use actions/setup-python, actions/setup-go, or actions/setup-java with their built-in cache: input before you add a separate actions/cache step.
  4. Set timeout-minutes: on every job.
  5. Add concurrency: with cancel-in-progress: true for pull request workflows.
  6. Move steps that two workflows share into a reusable workflow or a composite action.
  7. Use pull_request, not pull_request_target, for code from forks. If pull_request_target is required, do not check out the fork head in that job.
  8. Do not put ${{ github.event.* }} text such as titles or branch names directly into run:; pass it through env: and quote the variable.
  9. Read cloud credentials with OIDC (permissions: id-token: write) instead of long-lived secrets.
  10. Put deploys behind a GitHub Environment with required reviewers. Ask the user first before you trigger a production deploy.

3. Validate before you push

actionlint                      # syntax, expressions, shellcheck of run: blocks
zizmor .github/workflows/       # security findings (optional)

If actionlint is not installed, run it as a container: docker run --rm -v "$PWD":/repo -w /repo rhysd/actionlint.

4. Debug a failed run

  1. Get the log: gh run list --limit 5, then gh run view <run-id> --log-failed.
  2. Find the first failing step and its first error line.
  3. Decide the cause class:
    • Permissions — a 403 or Resource not accessible by integration needs a permissions: entry.
    • Secret missing — secrets are empty in workflows from forks and in environments that do not define them.
    • Cache — check the cache key inputs; a changed lock file must change the key.
    • Runner image — compare the tool versions with the last green run.
  4. Rerun failed jobs with debug logs once: gh run rerun <run-id> --failed --debug.
  5. Fix the cause and push. Do not add continue-on-error: true to make the run green.

Read the full file on GitHub · 58 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. 1mo ago Changed · -138 lines · -21 tokens per session ab6b2b7c230e
  2. 3mo ago First seen · 196 lines · 66 tokens per session scan A 79460b96ee7c

Subscribe to this mod's changes

github-actions-patterns is a skill published in the GitHub repository sawrus/agent-guides (21 stars, last pushed 2d ago), licensed MIT. It adds 45 tokens to every session and 743 once invoked, about $0.0002 per session on Opus 5.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-30.

Related

github-actions-patterns compared with skills from other repositories

github-actions-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
github-actions-patternssawrus/agent-guidesSkill212d agoMITA45Claude Code, Codex
ci-cd-and-automationaddyosmani/agent-skillsSkill123k2d agoMITA45Claude Code
agentic-actions-auditorsickn33/agentic-awesome-skillsSkill51ktodayMITA59Claude Code
depsickn33/agentic-awesome-skillsSkill51ktodayMITA14Claude Code
sast-configurationsickn33/agentic-awesome-skillsSkill51ktodayMITA31Claude Code
expo-cicd-workflowssickn33/agentic-awesome-skillsSkill51ktodayMITA60Claude Code, Codex
k6-load-testingsickn33/agentic-awesome-skillsSkill51ktodayMITA35Claude Code