/gh-actions:gh-actionsfrom gh-actions
Creates, reviews, hardens and debugs GitHub Actions workflows and custom actions with least-privilege permissions. Use when editing .github/workflows/*.yml or action.yml, pinning action versions, auditing workflow security, or when a GitHub run fails (a pasted github.com actions/runs/<id> URL, "CI failed" or "the build is red" on a GitHub repo). Not for Forgejo or Codeberg (`forgejo-actions`).
Ships in gh-actions. 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.
Read when SKILL.md points to them.
Change workflows and actions from evidence in the affected files and runs, with minimal permissions and an explicit trust boundary. Use the gh CLI for runs, releases and API lookups.
Not for Dependabot config (dependabot), cutting releases (gh-release), dispatching workflows, or deployments.
origin host is Forgejo or Codeberg (not github.com and not a host gh auth status --hostname <host> knows), or .forgejo/workflows or .gitea/workflows exists, stop and point to forgejo-actions. Forgejo also runs .github/workflows when it is the only workflow directory, so a Forgejo remote with only .github/workflows is Forgejo's. Then read repo instructions, the affected .github/workflows/*.yml and/or action.yml, adjacent actions, and the current diff.action.yml or action.yaml change: custom actions. Read both when a workflow calls an action you are changing.permissions: {} defaults, zizmor, harden-runner, repo Actions settings): hardening.Start here when the user pastes a run or job URL, says CI failed, or reports the same failure again. Do the steps in order and stop at the first one that settles the cause.
https://github.com/<owner>/<repo>/actions/runs/<run-id>[/job/<job-id>] gives --repo <owner>/<repo> and the run ID. Without a URL, use the current repo and gh run list --limit 5.gh run view <run-id> --repo <owner>/<repo> --log-failed. For one job, add --job <job-id>. Also read --json event,headSha,headBranch,conclusion,jobs to see which commit and trigger failed.gh run rerun <run-id> --repo <owner>/<repo> --failed. If the fix was a new push, find the new run with gh run list --branch <branch> --limit 3 instead. Rerun an unchanged flaky failure once. Don't loop.gh run watch <new-run-id> --repo <owner>/<repo> --compact --exit-status. If it fails again with a new error, return to step 2 with that run. Report each cycle's class and result.The job ID in a browser URL is the one --job takes for gh run view. gh run rerun --job wants the databaseId from gh run view <run-id> --json jobs --jq '.jobs[] | {name, databaseId}'.
Pick the ref format in this order:
./local actions and reusable-workflow refs). SHA majority means pin a full SHA of the latest stable release. Tag majority means @vN.@vN and say why. When the user asks to harden the repo, propose SHA pinning plus a Dependabot github-actions entry instead (see hardening).When adding or updating an action, use its latest stable major. Look it up with gh:
gh release view --repo actions/checkout --json tagName,publishedAt
gh api repos/actions/checkout/git/ref/tags/<tag> --jq .object # tag -> SHA (dereference annotated tags)
A pinned SHA must be the verified release commit, never main HEAD, and carries the exact version as a trailing comment (@<sha> # v5.0.0) so Dependabot can bump both. If the new major is incompatible with the workflow, say so and propose the migration. Don't silently keep the old major, and don't touch unrelated actions. A moving tag can change and is not an immutable security guarantee.
Before editing, state the trigger, trust level, outcome, runner, data flow, and the exact permissions or external access needed.
Use a workflow for orchestration. Use a reusable workflow (workflow_call, .reusable.yml suffix) only for an intentionally shared whole job. Use a composite action for a reusable step sequence. Use JavaScript or Docker actions only when their runtime is needed.
Keep triggers, needs, if:, concurrency, permissions, inputs, outputs, shells, and runner labels narrow and visible. Add secrets, broad tokens, self-hosted runners, caches, matrices, or deployment gates only for a current need.
In a new workflow, set permissions: {} (or contents: read) at workflow level and grant scopes per job.
Keep YAML about orchestration. Move non-trivial run: logic into a versioned script under .github/scripts/ and call it with explicit arguments and env:. Short setup commands can stay inline. Never pass secrets on command lines.
Give each workflow_dispatch input its narrowest type:
| Type | Use for |
|---|---|
string | Free text whose values can't be enumerated |
boolean | A true/false toggle |
choice | One of a fixed list (declare options) |
number | A value consumed numerically |
environment | A deployment target with its protection rules and secrets |
Don't model a boolean, choice, or environment as string and then validate it in a step.
For manual dispatch, keep the selected branch or tag. Don't substitute the default branch or another SHA.
Use annotations, GITHUB_STEP_SUMMARY, and environment files for diagnostics. Never dump contexts or event payloads.
Recheck the YAML and metadata against the official reference, including where expressions are allowed and input/output paths.
Run the repo's existing checks for workflows. If actionlint or zizmor is already installed, run it. Don't install either just for this without asking.
For an action, exercise success and invalid-input paths with the project's test setup or a minimal calling workflow.
For a failed run, inspect it with gh:
gh run list --workflow <file> --limit 5
gh run view <run-id> --log-failed
gh run view <run-id> --json event,headSha,headBranch,jobs
Isolate the first failing step. Don't enable broad debug logging or rerun a privileged workflow instead of diagnosing.
Static checks can't prove hosted execution, permissions, runner availability, event delivery, or cloud authorization. Report what stays unverified.
pull_request_target or workflow_run, stop any execution of PR-controlled code in the privileged job. Never execute untrusted artifact contents.write-all or a long-lived credential.This skill covers workflow and action files. Dispatching workflows, cutting releases, deploying, and changing credentials, secrets, or repo and org Actions settings each need explicit authorization. Ask with AskUserQuestion first.
references/actions.md (opens in a new tab)references/audit.md (opens in a new tab)references/codeql.md (opens in a new tab)references/efficiency.md (opens in a new tab)references/failure-classes.md (opens in a new tab)references/go.md (opens in a new tab)references/hardening.md (opens in a new tab)references/security.md (opens in a new tab)references/workflows.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin gh-actions