ci-github-actions

A reference guide to common problems in GitHub Actions, GitHub's system for running automated checks and jobs. It focuses on branch selection, git history, tags, and workflow inputs.

In plain words
What is it for?
Use it when writing or debugging workflows that run manually, read previous tags, use git history, create changelogs, or build releases.
Why use it?
It helps explain why actions cannot find tags or commit history, and prevents unnecessary trigger and condition changes.

Skill for Claude CodeCodex

Part of the workflow plugin — 28 skills, 2 hooks, 1 MCP server shipped together

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.

agentmods
npx agentmods add skills/axgord/claude-workflow/ci-github-actions
Any agent
npx skills add AxGord/claude-workflow --skill ci-github-actions
Clone the repo
git clone --depth 1 https://github.com/AxGord/claude-workflow

Made for: Claude Code, Codex.

Or install workflow, the plugin that ships this one along with the rest of its 28 skills, 2 hooks, 1 MCP server.

Per session 11 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,423 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00011 $0.02423
Opus 5 $0.00005 $0.01211
Sonnet 5 $0.00002 $0.00485
Haiku 4.5 $0.00001 $0.00242

Measured 2d ago against content hash f329f79231aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ci-github-actions 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 2d 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.

templates/skills/ci-github-actions/SKILL.md · 190 lines

How it starts

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

GitHub Actions — Verified Gotchas

workflow_dispatch Runs on ANY Branch — No Trigger Changes Needed

Wrong: Add branch filter to push: trigger, prefix artifact names with ${{ github.ref_name }}, add if: conditionals on release jobs.

Right: Nothing. workflow_dispatch already lets the user pick any branch in the GitHub UI. Tag the commit first (git tag v1.2.3-suffix && git push origin v1.2.3-suffix), then dispatch from that branch — tag-based actions pick it up automatically.

Why: Before proposing new triggers or conditions, enumerate what existing triggers + marketplace actions already accept.

WyriHaximus/github-action-get-previous-tag Requires fetch-depth: 0

The action resolves the most recent tag reachable from the current commit via git history. With the default fetch-depth: 1, no tags are reachable — the action returns empty or stale results.

- uses: actions/checkout@v7
  with:
    fetch-depth: 0  # required for tag resolution

Same applies to git describe, git log --follow, gitversion, and any changelog generator that walks commit history.

actions/checkout Default Fetches Only 1 Commit (v4+)

Unless fetch-depth: 0 (full history) or fetch-depth: N is set, you get a shallow clone with depth 1. Breaks: tag lookup, git log-based changelogs, git blame, branch comparison diffs.

github.ref vs github.ref_name vs github.head_ref

Expression Value When to use
github.ref refs/heads/main or refs/tags/v1.0 Conditional checks (startsWith(github.ref, 'refs/tags/'))
github.ref_name main or v1.0 Display, artifact names, slugs
github.head_ref feature/foo PR source branch only — empty on push/dispatch

Wrong: Using github.ref as an artifact name prefix → gets refs/heads/main as the string. Right: Use github.ref_name for human-readable values.

needs: Skips Downstream Jobs When Dependency Was Skipped

If a job in needs: was skipped (via if: false), dependent jobs are also skipped — they don't run, they don't fail, they silently disappear.

Read the full file on GitHub · 190 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. 2d ago First seen · 190 lines · 11 tokens per session scan A f329f79231aa

Subscribe to this mod's changes

ci-github-actions is a skill published in the GitHub repository AxGord/claude-workflow (5 stars, last pushed 1mo ago), licensed MIT. It adds 11 tokens to every session and 2,423 once invoked, about $0.0001 per session on Opus 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-31.

Related

Other skills, from other repositories

multi-agent-release-manager

Cleans up the workspace, formats code, runs presubmit checks, and uploads CLs to Gerrit.

chromium/chromium · 27 tokens

dsh-web-pre-push-checks

Use before pushing, opening or updating a pull request, or claiming dsh-web checks pass. Selects the required repository gates and diff-specific generation, build, and GUI evidence.

zhu1090093659/dsh-web · 45 tokens

babysit

Same-session monitoring loop for PRs, CI runs, tickets, and deployments using the monitorstart / monitorupdate / autonudgestop MCP tools. The loop re-injects your check instructions into THIS session on an idle interval — same context, same tools — and works from dashboard chat, Slack threads, and Discord DMs. Use…

kirodotdev/KiroCrew · 137 tokens

azsdk-common-pipeline-analysis

Analyze Azure SDK CI/CD pipeline failures into a structured diagnosis, and define the required output format. Load this skill before calling azsdkanalyzepipeline, which returns raw failure data that this skill interprets and formats. USE FOR: "pipeline failed", "build failure", "CI check failing", "tests failing in…

Azure/azure-sdk-for-net · 192 tokens

harness-setup

HAR: Project init, tool setup, agent config, memory setup, skill mirror sync. Trigger: setup, init, new project, CI/Codex setup, harness-mem, mirror. Do NOT load for: implementation, review, release, planning.

Chachamaru127/claude-code-harness · 57 tokens

managing-github-actions-secrets

Creates and updates GitHub Actions secrets for PostHog workflows. Use when adding a new CI secret, rotating an existing secret, wiring a workflow to an API token, package registry credential, deploy key, or any value referenced via ${{ secrets. }} in .github/workflows/.

PostHog/posthog-foss · 67 tokens