Skip to content
Back to skills

Write Github Actions Workflow

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 26, 2026
ai-agentspythonrustgoshellgitdevops

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned November 26, 2026

npx -y skills add hermes-hq/hodios-dist --skill write-github-actions-workflow --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Write Github Actions Workflow?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Write Github Actions Workflow
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hermes-hq-write-github-actions-workflow/badge)](https://www.skillsdirectory.com/skills/hermes-hq-write-github-actions-workflow)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: write-github-actions-workflow
description: 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.
license: CC0-1.0
arguments:
  - goal
  - requirements
argument-hint: <goal> [requirements]
disable-model-invocation: true
metadata:
  version: 1.0.0
  kind: prompt
  category: devops
  source: https://hermes-ide.com/prompts/write-github-actions-workflow
  catalog: 2026.1014.1
---

# Write a GitHub Actions workflow

## Inputs

- `goal` (required): What the workflow must do and when, for example "run lint and tests on every PR and on pushes to main".
- `requirements` (optional): Extra constraints such as OS or runtime versions, required secrets, deploy targets, or "must finish under 10 minutes".

Arguments fill these in order. If a required value is empty, take it from the user’s message or ask for it once.

<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.
</context>

<task>
Write a GitHub Actions workflow that does this: $goal
Only if requirements was provided: 
Requirements: $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.
</task>

<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.
</constraints>

<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.
</output_format>

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.