Skip to main content
skill CX Codex

github-actions · oakoss — Claude Code skill for CI/CD workflows

Create and configure GitHub Actions workflows, from event triggers and build matrices to caching and authentication. Useful for automating tests, releases, and deployments.

MIT 149 installs ★ 29 updated 2026-08-17

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add oakoss/agent-skills --skill github-actions -a claude-code
Open on GitHub

What github-actions does

This skill helps write YAML workflows for builds, tests, and deployments with GitHub Actions. It covers event triggers, job dependencies, steps, matrix runs, caches, and artifacts. It also addresses reusable workflows, composite actions, and passing values between steps.

The guidance includes secrets, OIDC authentication, and permission settings. One security point is concrete: grant permissions per job instead of broadly at workflow level. GitHub Actions also stops a job after six hours, so this setup does not suit tasks that need longer runs.

What it helps with

  • create a workflow that tests pull requests
  • run builds across several runtime versions
  • cache dependencies and pass artifacts between jobs
  • package steps as a composite action
  • scope permissions and configure OIDC authentication

Example prompts for the agent

  • Create a GitHub Actions workflow that runs tests on every pull request.
  • Set up a build matrix for Node.js versions 18, 20, and 22.
  • Review the permissions and dependency cache in my workflow.

How to install github-actions

1Skills CLI (Vercel)

npx skills add oakoss/agent-skills --skill github-actions -a claude-code

2Manually: put the files in place

~/.claude/skills/github-actions/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/github-actions/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about github-actions

How do I install github-actions in Claude Code?

Run npx skills add oakoss/agent-skills --skill github-actions -a claude-code. The skill file is at ~/.claude/skills/github-actions/SKILL.md.

What does the github-actions skill do?

It helps author GitHub Actions workflows for CI/CD, including triggers, jobs, matrix builds, dependency caches, artifacts, and access permissions.

How does the skill handle GitHub Actions permissions?

It recommends setting workflow-level permissions to empty and granting access to individual jobs as needed. OIDC authentication uses the id-token: write permission.

Source text

SKILL.md · MIT
---
name: github-actions
description: >
  GitHub Actions workflow authoring for CI/CD pipelines. Covers workflow syntax,
  triggers, jobs, steps, matrix strategies, caching, artifacts, reusable workflows,
  composite actions, secrets management, OIDC authentication, and permissions hardening.

  Use when creating workflows, configuring jobs, setting up caching, or automating releases.
  Use for github-actions, workflow, ci, cd, actions, jobs, steps, matrix, cache, artifact,
  secrets, reusable-workflow.
license: MIT
metadata:
  author: oakoss
  version: '1.1'
  source: 'https://docs.github.com/en/actions'
user-invocable: false
---

# GitHub Actions

## Overview

GitHub Actions is a CI/CD platform that automates build, test, and deployment pipelines directly from GitHub repositories. Workflows are YAML files in `.github/workflows/` triggered by events like pushes, pull requests, schedules, or manual dispatch. Each workflow contains one or more jobs that run on GitHub-hosted or self-hosted runners.

**When to use:** Automated testing, continuous deployment, release automation, scheduled tasks, multi-platform builds, dependency updates, container publishing, code quality checks, security scanning.

**When NOT to use:** Long-running services (use a proper hosting platform), heavy compute tasks exceeding runner limits (6-hour job timeout), tasks requiring persistent state between runs (use external storage), real-time event processing (use webhooks with a server).

## Quick Reference

| Pattern             | Syntax / Action                                  | Key Points                                  |
| ------------------- | ------------------------------------------------ | ------------------------------------------- |
| Push trigger        | `on: push: branches: [main]`                     | Filter by branch, path, or tag              |
| PR trigger          | `on: pull_request: types: [opened, synchronize]` | Defaults to opened, synchronize, reopened   |
| Scheduled trigger   | `on: schedule: - cron: '0 6 * * 1'`              | UTC only, minimum 5-minute interval         |
| Manual trigger      | `on: workflow_dispatch: inputs:`                 | Define typed inputs for manual runs         |
| Job dependencies    | `needs: [build, test]`                           | Run jobs in sequence or parallel            |
| Conditional job     | `if: github.ref == 'refs/heads/main'`            | Expression-based job/step filtering         |
| Matrix strategy     | `strategy: matrix: node: [18, 20, 22]`           | Generates jobs for each combination         |
| Dependency cache    | `actions/cache@v5`                               | Hash-based keys with restore-keys fallback  |
| Setup with cache    | `actions/setup-node@v6` with `cache: 'pnpm'`     | Built-in caching for package managers       |
| Upload artifact     | `actions/upload-artifact@v4`                     | Share data between jobs or preserve outputs |
| Download artifact   | `actions/download-artifact@v4`                   | Retrieve artifacts from earlier jobs        |
| Reusable workflow   | `uses: ./.github/workflows/reusable.yml`         | Called with `workflow_call` trigger         |
| Composite action    | `action.yml` with `using: composite`             | Bundle multiple steps into one action       |
| Concurrency         | `concurrency: group: ${{ github.ref }}`          | Cancel or queue duplicate runs              |
| Environment secrets | `${{ secrets.API_KEY }}`                         | Scoped to repo, org, or environment         |
| OIDC authentication | `permissions: id-token: write`                   | Short-lived tokens for cloud providers      |
| Step outputs        | `echo "key=value" >> "$GITHUB_OUTPUT"`           | Pass data between steps and jobs            |
| Service containers  | `services: postgres: image: postgres:16`         | Sidecar containers for integration tests    |
| Timeout             | `timeout-minutes: 30`                            | Fail fast on hung jobs or steps             |
| Attestations        | `actions/attest-build-provenance@v3`             | SLSA build provenance for supply chain      |

## Expressions and Contexts

| Context   | Example                         | Description                               |
| --------- | ------------------------------- | ----------------------------------------- |
| `github`  | `github.ref_name`, `github.sha` | Event metadata, repo info, actor          |
| `env`     | `env.NODE_ENV`                  | Environment variables at current scope    |
| `secrets` | `secrets.API_KEY`               | Encrypted secrets (masked in logs)        |
| `inputs`  | `inputs.environment`            | Workflow dispatch or reusable inputs      |
| `matrix`  | `matrix.node`                   | Current matrix combination values         |
| `steps`   | `steps.build.outputs.version`   | Outputs from previous steps               |
| `needs`   | `needs.prepare.outputs.tag`     | Outputs from dependent jobs               |
| `runner`  | `runner.os`, `runner.arch`      | Runner environment info                   |
| `vars`    | `vars.DEPLOY_URL`               | Repository or org configuration variables |

## Common Mistakes

| Mistake                                      | Correct Pattern                                                            |
| -------------------------------------------- | -------------------------------------------------------------------------- |
| Using outdated action major versions         | Pin to current major version (`@v6`) or commit SHA                         |
| Missing `persist-credentials: false`         | Set on checkout when using custom tokens or OIDC                           |
| Broad `permissions` at workflow level        | Set `permissions: {}` at workflow level, grant per-job                     |
| Cache key without dependency file hash       | Include `hashFiles('**/pnpm-lock.yaml')` in cache key                      |
| Secrets in `if:` conditions                  | Secrets cannot be used in `if:` expressions directly                       |
| Using `pull_request_target` carelessly       | Never run PR code with write permissions from `pull_request_target`        |
| Not cancelling stale runs                    | Use `concurrency` with `cancel-in-progress: true`                          |
| Storing structured data as a single secret   | Create individual secrets per value for proper log redaction               |
| Referencing action tags without SHA pinning  | Pin third-party actions to full commit SHA for supply chain safety         |
| Hardcoding runner OS in scripts              | Use `runner.os` context for cross-platform compatibility                   |
| Using `actions/cache` without `restore-keys` | Always provide restore-keys for partial cache matches                      |
| Interpolating user input in `run:` blocks    | Pass untrusted values through `env:` to prevent script injection           |
| No `timeout-minutes` on jobs                 | Set explicit timeouts to fail fast on hung processes                       |
| Using `always()` without scoping             | Combine with status checks: `if: always() && steps.x.outcome == 'success'` |

## Delegation

- **Workflow debugging**: Use `Explore` agent to inspect workflow run logs
- **Security auditing**: Use `Task` agent to review permissions and secret usage
- **Code review**: Delegate to `code-reviewer` agent for workflow PR reviews

## References

- [Workflow syntax, triggers, jobs, steps, and concurrency](references/workflow-syntax.md)
- [Caching strategies and artifact management](references/caching-and-artifacts.md)
- [Matrix strategies, reusable workflows, and composite actions](references/matrix-and-reusable.md)
- [Security, secrets, OIDC, and permissions hardening](references/security-and-secrets.md)

© oakoss · MIT · oakoss/agent-skills

Similar skills

All skills for DevOps and infrastructure →

github-actions by other authors comes first.

github-actions callstackincubator Reusable GitHub Actions patterns to build React Native apps for iOS simulators and Android emulators in the cloud and download artifacts. Simplifies CI pipeline setup and scripted retrieval via gh CLI or REST API. CX Codex +1 12,400installs github-actions devops-skills Gets your agent writing GitHub Actions workflows: builds, tests, deploys, secrets, caching and self-hosted runners. CX Codex +1 429installs github-actions bobmatnyc github-actions is a Claude Code skill for building GitHub Actions workflows that handle builds, tests, and deployments. Use it to wire checks to pull requests or automate releases. CX Codex +1 778installs github-actions tartinerlabs Writes and audits GitHub Actions workflows: pins actions to SHAs, tightens permissions, catches stale Node versions. CX Codex +1 446installs github-actions tddworks This skill handles ClaudeBar’s GitHub Actions builds, tests, and releases. Use it to configure CI secrets, publish tagged or manual releases, and investigate failures. CX Codex +1 ★ 1,586repo stars GitHub Actions Expert official github GitHub Actions Expert — a GitHub Copilot subagent that drafts and reviews CI/CD workflows with supply-chain security in mind. Useful when you need actions pinned by SHA and long-lived keys gone. CX Codex +1 ★ 41,430repo stars github-actions-expert carlrannaberg github-actions-expert is a Claude Code subagent that optimizes and hardens GitHub Actions workflows. It helps with slow CI runs, YAML trigger failures, or deployments requiring OIDC auth. CX Codex ★ 763repo stars github-actions-generator akin-ozer The github-actions-generator skill scaffolds GitHub Actions workflows, custom actions and reusable pipelines from a plain request. Handy when you need working .github/workflows files without hand-picking action versions. CX Codex +1 714installs github-actions-2025 JosiahSiegel github-actions-2025 guides your agent through modern GitHub Actions features, including 1 vCPU runners, immutable releases, and Node24 migrations. CX Codex +1 166installs github-actions-ci-cd-best-practices official github github-actions-ci-cd-best-practices — a GitHub Copilot rule that guides workflow structure, token permissions, caching and matrix setups whenever you touch files under .github/workflows/. CX Codex +1 ★ 41,430repo stars github-actions-templates Seth Hobson The github-actions-templates skill creates GitHub Actions workflows for testing, builds, and deployments. Use it when a project needs CI/CD or reusable workflow templates. CX Codex +1 17,420installs

From the same set106

The whole set →
opentofu Get help writing and reviewing OpenTofu configurations and Pulumi programs. Use the skill to manage infrastructure code, state, and environment setups. CX Codex +1 153installs arktype-validation arktype-validation — a skill for ArkType, where schemas are TypeScript-shaped strings. Covers morphs, scopes and ArkEnv checks for environment variables. Handy for runtime validation that stays close to the type syntax. CX Codex +1 153installs tanstack-router tanstack-router adds guidance for type-safe file-based React routing with @tanstack/react-router. Useful for loaders, search param validation, and code splitting. CX Codex +1 150installs api-testing api-testing is a Claude Code skill for writing REST API integration tests and checking endpoint responses. It activates for HTTP mocking, response validation, and API error tests. CX Codex +1 149installs git-workflow git-workflow guides AI coding agents through trunk-based development, conventional commits, reusable GitHub Actions workflows, and Git history repair. CX Codex +1 149installs ux-designer ux-designer is a Claude Code skill that guides AI agents from information architecture to developer handoff, with usability and accessibility checks. CX Codex +1 148installs responsive-images Implements performant responsive images with srcset, modern formats like AVIF and WebP, CLS prevention, and LCP prioritization. CX Codex +1 148installs tanstack-virtual Teaches the agent to virtualize long lists, grids and tables with TanStack Virtual, so only visible rows stay in the DOM. CX Codex +1 148installs

Project sponsors

Companies that keep this analytics open