/infra-skills:github-actions-conventionsfrom infra-skills
Use when writing or reviewing GitHub Actions workflows or CI. Covers workflow structure, action pinning, secret access, gh CLI usage, uv-based Python jobs, gitleaks scanning, and automated-commit patterns.
Ships in infra-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
GitHub Actions workflows authenticate via GH_TOKEN (automatically provided as GITHUB_TOKEN). For operations needing broader scope (workflow file changes, package publishing), use the repo's configured token. Set a top-level permissions: block and grant each job only what it needs.
The gh CLI is pre-installed in GitHub-hosted runners. Use gh for all GitHub API operations — never raw curl to the GitHub API unless gh can't do it.
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: <workflow-name>
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
<job-name>:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@vX
- name: <step>
run: <command>
Reference every action by a semantic version tag, never a commit SHA. The major tag (@v4) receives the action's fixes without a PR; an exact release tag (@v4.2.1) makes every upgrade a reviewed change, and suits a job that holds write scope or secrets. A SHA says neither which release runs nor whether a change is a patch or a break, so SHA pins get bumped blind or not at all. An action's owner can move a tag, so keep each job's permissions: narrow, prefer actions from GitHub or verified creators, and read the release notes before raising a pinned version. Where the project's own policy differs, its local skill wins.
Use uv for Python setup — faster than pip, consistent with local development:
- name: Install uv
uses: astral-sh/setup-uv@vX
- name: Install dependencies
run: uv sync
- name: Lint
run: uv run ruff check
- name: Test
run: uv run pytest
Secrets come from GitHub Actions secrets (repository, environment, or organization level). When the project keeps secrets in an external manager, prefer the manager's official action or OIDC federation over a long-lived token; if a token is unavoidable, store it as one Actions secret and resolve everything else through it. Which manager and which paths the project uses belong in its secret-paths local skill, if it defines one.
Never hardcode tokens, passwords, or API keys in workflow files. Use ${{ secrets.SECRET_NAME }} for all credentials.
Pre-commit secret scanning via gitleaks prevents accidental secret commits. In CI, run as a step on PRs:
- name: Secret scan
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Automated commits from CI (e.g., version bumps, changelog updates) use the same commit format:
<type>(<scope>): <subject> [skip ci]
Use [skip ci] to prevent CI loops on automated commits.
# Create PR
gh pr create --title "..." --body "..."
# Comment on issue
gh issue comment 42 --body "..."
# Apply label
gh issue edit 42 --add-label "domain:ops"
# Check PR status
gh pr view 42 --json state,mergeable
# Merge PR
gh pr merge 42 --squash --auto
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/ansible-conventionsUse when writing, changing or reviewing Ansible roles, playbooks, or inventory. Covers repository structure, runtime secret injection, Jinja2/bash delimiter traps, boot-only hardware services, and idempotent check-mode runs./go-public-reviewUse before making a GitHub repository public, or when reviewing a public one. Audits history, commit metadata and PR refs for exposed content, plus branch and tag rules, docs, public CI, security policy and licence; grades each finding./infra-seamsUse when a diff touches secret-sync objects, tolerations, storage classes, RBAC, or an LLM/tool gateway's access config. Detects infrastructure seam crossings, states the authority delta, seeds the seams registry./k8s-diagnosticsUse when running a Kubernetes health sweep or diagnosing a failing node, pod, GitOps sync or secret sync. Gives kubectl, GitOps-controller and secret-sync checks per sweep section; node-OS tooling defers to topology./k8s-kustomize-conventionsUse when writing, changing or reviewing Kubernetes manifests or Kustomize files. Defines base-and-overlay structure, patch patterns, manifest validation, image-transform limits, and how overlays map to GitOps sync targets./k8s-workload-patternsUse when writing or reviewing a Kubernetes workload, choosing Deployment vs StatefulSet vs DaemonSet vs Job, or sizing a pod. Covers resources, probes, storage, security context, runtime class, and exposure.npx claudepluginhub pixeloven/crew --plugin infra-skills