hermes

Write a GitHub Actions workflow

Writes a secure, cached and least-privilege GitHub Actions workflow that fits the repository's real build and test commands. Use when adding CI, a release job or a scheduled task.

context

Most CI workflows are copied from a template and then patched until they pass. The usual results are a token with write access to everything, unpinned third-party actions, no caching, and untrusted pull request data flowing into shell scripts. A workflow that is right the first time is short, uses the project's own commands, and grants only what each job needs.

task

Write a GitHub Actions workflow that does this: Only if [REQUIREMENTS] is given: Requirements:

  1. Inspect the repository first: languages, package manager and lockfile, the scripts or make targets that lint, build and test, runtime version files (.nvmrc, .python-version, go.mod, rust-toolchain.toml), and the workflows already in .github/workflows/. Reuse existing commands instead of inventing new ones.
  2. Choose triggers that match the goal, including paths or branches filters when they avoid useless runs.
  3. Set permissions at the workflow level to contents: read, and grant more only on the job that needs it, with a comment saying why.
  4. Use the official setup action for the runtime with its built-in dependency cache keyed on the lockfile. Install with the lockfile-respecting command (npm ci, pip install -r with hashes, cargo --locked).
  5. Add concurrency that cancels superseded runs on the same branch, and a timeout-minutes on every job.
  6. Use a matrix only when the goal needs several versions or operating systems.
  7. Write the file to .github/workflows/<name>.yml. If actionlint is available, run it and fix what it reports.
constraints
  • Pin every third-party action to a full commit SHA with the version in a trailing comment. If you cannot look up the SHA, use the major version tag and list that action under Follow-ups.
  • Use only actions you are certain exist. Never invent an action name or an input.
  • Never place pull request titles, branch names, commit messages or other event fields directly inside a run: script. Pass them through env: and quote the variable.
  • Do not use pull_request_target or expose secrets to jobs that run code from forks.
  • Reference secrets by name only, and list every secret the user must create.
  • Do only what was asked. If you notice something else worth changing, mention it in one line at the end instead of changing it.
  • Keep the change as small as it can be while still being correct.
  • Before saying the work is done, run the check that proves it (tests, build, type check or the command the user gave) and report the real result.
  • If you could not run a check, say so plainly and say which one.
output format

Workflow

The path, then the complete YAML file.

Decisions

One bullet per non-obvious choice (trigger filters, permissions, cache key, matrix), each with the reason.

Verify

How you checked the file (actionlint output, or "not run") and how the user can trigger a first run.

Follow-ups

Secrets to create, actions still to pin, and branch protection settings to update. "None" if empty.

1 required value still a placeholder; the assistant will ask for it.

details

kind
Prompt: a task you run by name to get one finished thing back
domain
Software engineering
category
DevOps
level
Intermediate
made for
DevOps / platform engineer, Software engineer
needs
repo-read, file-write
risk
edits-files
version
v1.0.0 · experimental
reviewed
2026-10-02
works in
Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Antigravity, OpenCode, Windsurf, Zed, Continue, AGENTS.md

Edit on GitHubReport a problem

use in

Hodios CLI
npx @hermes-hq/hodios install write-github-actions-workflow --target claude-code
Agent Skills
npx skills add hermes-hq/hodios-dist --skill write-github-actions-workflow -a claude-code
Add the Hodios marketplace (once)
claude plugin marketplace add hermes-hq/hodios-dist
Install the software-engineering plugin
claude plugin install hodios-software-engineering@hodios

The plugin brings every entry in this domain at once.

pairs well with

All of DevOps
PromptDevOps

Speed up a CI pipeline

Analyses a slow CI configuration and its job timings, then proposes caching, parallelism and test splitting with the minutes each change saves. Use when builds are slowing the team down.

speed-up-ci-pipeline
PromptDevOps

Design a deployment strategy

Chooses and specifies a deployment strategy (rolling, blue-green, canary or feature-flagged) with health gates, automated rollback triggers and database-change ordering. Use when deploys feel risky.

design-deployment-strategy
PromptDevOps

Review a Dockerfile

Reviews a Dockerfile for security, image size, build cache use and runtime correctness, and returns ranked findings with a corrected file. Use before shipping a new or changed container image.

review-dockerfile
PromptDevOps

Review an infrastructure plan before apply

Reviews a Terraform, OpenTofu or other IaC plan for destructive changes, security exposure, cost surprises and changes outside the stated intent. Use before running apply, especially in production.

review-iac-plan
PromptDevOps

Write a Docker Compose dev environment

Writes a Docker Compose local development setup that mirrors production dependencies, with health checks, named volumes, seed data, env files and a one-command start. Use when onboarding developers.

write-docker-compose
PersonaDevOps

DevOps engineer

Acts as a DevOps engineer who automates the second time, keeps pipelines fast and reproducible, and makes every change reversible. Use for CI/CD, infrastructure and release work.

devops-engineer