agentleFS
anhnguyen0905anhnguyen0905/codex-mcp/skills/exec-github-actions/SKILL.md

exec-github-actions

Skill4 starsChanged 4 days agoMITView on GitHub

GitHub Actions execution idioms to embed into Codex prompts when a task edits .github/workflows — job and step structure, tag-gated release steps, OS matrices, secrets hygiene, timeouts, and smoke-step wiring for npm packages.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use when a task creates or edits a workflow under .github/workflows/.

    line 10
  2. Very specific:

    Every uses: is pinned to a major tag.

    line 37
  3. Very specific:

    Every job has timeout-minutes.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GitHub Actions (embed into Codex prompts)

Serves: tasks that create or edit .github/workflows/*.yml (npm smoke wiring, OS matrix, tag-gated publish) — R9.2

Use when a task creates or edits a workflow under .github/workflows/. Embed the block below in the execution prompt; Codex cannot see this file.

Core method

  • Source: .github/workflows/ci.yml and publish.yml in this repository. Embed the block below verbatim in the Codex prompt for any task touching .github/workflows/:
GitHub Actions rules (mandatory):
- Pin every action by major tag (actions/checkout@v4, actions/setup-node@v4); never @main.
- Every job sets `timeout-minutes`; every network step (npm, npx, curl) has its own timeout or retry.
- Release-only steps are gated: `if: startsWith(github.ref, 'refs/tags/v')`; PR/main jobs never publish.
- Secrets: read only via `${{ secrets.NAME }}` into `env:`; never echo, never write to files that are uploaded or committed; `.npmrc` tokens come from env, never from the repo.
- Install with `npm ci` (lockfile), not `npm install`; cache with `actions/setup-node` `cache: npm`.
- Cross-platform jobs use `strategy.matrix.os: [ubuntu-latest, macos-latest, windows-latest]`; shell steps that must behave the same everywhere set `shell: bash` explicitly, or call `node` scripts instead of shell constructs.
- A smoke/verification step fails the job on non-zero exit; do not `|| true` a check.
- Derive the version from the tag with `${GITHUB_REF_NAME#v}` (bash) and pass it as an argument; never hard-code versions in YAML.
- Keep job names stable (they are branch-protection checks); add new checks as new jobs, do not rename existing ones.
- Prefer `node scripts/<name>.mjs` over inline shell for anything longer than one line, so the logic is unit-testable and platform-neutral.

Why embedded

Workflow YAML fails late (only on push) and platform differences hide until the matrix runs. Encoding the rules in the prompt prevents the common regressions: unpinned actions, missing timeouts, release steps running on PRs, secrets echoed in logs, and bash-only substitutions breaking the Windows runner.

Reviewer checklist

  • Source: the Workflow block above (each line below restates one rule as a yes/no check).
  • Every uses: is pinned to a major tag; no @main/@master.
  • Every job has timeout-minutes; release steps carry a tag if: gate.
  • No echo of a secret, no secret written into an uploaded artifact or committed file.
  • npm ci used; matrix covers ubuntu/macos/windows when the task says cross-platform.
  • Any smoke/verification step fails the job on non-zero exit (no || true, no continue-on-error on checks).
  • Version derived from the tag, not hard-coded.

Failure modes

  • Source: the Workflow block above. Unpinned action silently changes behaviour on a later push → pin by tag. Missing timeout-minutes hangs the runner for 6 h on a stuck npx → set timeouts. Release step without a tag gate publishes from a PR → gate with if:. Secret echoed in a log or written to an uploaded artifact → env-only, never print. Bash-only substitution on the Windows runner fails the matrix → call a node script instead.

Provenance

  • Source: .codex-flow/SKILL-BRIEF-github-actions.md (brief for gap R9.2, authored 2026-09-09 for codex-mcp 0.26.0).
  • Source: .github/workflows/ci.yml and .github/workflows/publish.yml in this repository (existing pinning, matrix, tag-gate, and npm-view wait conventions).
  • derived, unverified: GitHub Actions security-hardening guidance (pin actions, secrets via env only, per-job timeouts) as commonly documented; not re-checked against a primary source in this session.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.