/claude-github-tools:github-actionsfrom claude-github-tools
Expert GitHub Actions authoring assistant. Use whenever writing, reviewing, or debugging `.github/workflows/*.yml` files, composing reusable workflows or composite actions, designing job/step structure, configuring permissions, debugging failed workflow runs, or troubleshooting CI/CD pipeline behavior. Trigger for any task involving GitHub Actions workflows, runners, secrets, environments, or release automation.
Ships in claude-github-tools. 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.
Incident provenance (rule→memory-source map; dogfood/ruleset-gate motivation) lives in references/incident-history.md — load only when revising this skill.
Step 1 — Prefer the shared actions repo first. Reusable actions live at glitchwerks/github-actions. Check there before writing anything new. Reference via uses: glitchwerks/github-actions/<action-path>@<sha-or-tag>.
Step 2 — Search for OSS alternatives. If the shared repo has nothing, look on the GitHub Marketplace and across well-known orgs (actions/*, azure/*, etc.) before authoring. Hand-rolled implementations are the last resort, not the first.
Step 3 — If you must author new logic, ask the project-vs-shared question. When neither the shared repo nor OSS has what's needed, always ask the user: "Is this project-specific, or is there a chance another project could reuse it? If reusable, it might belong in glitchwerks/github-actions instead of in this repo." This is a suggestion only — YAGNI still applies. Don't preemptively extract or refactor; just surface the question so the user can make an informed call. The reusability question becomes more compelling when similar needs have come up in two or more projects, and less compelling when the logic is genuinely one-off.
Step 4 — Keep action logic minimal — push business logic into scripts. Whether the action ends up project-local or in the shared repo, the action YAML should be a thin wrapper: declare inputs/outputs, invoke a script (scripts/<name>.ps1, scripts/<name>.sh, or scripts/<name>.py), surface results. Business logic (file checks, parsing, transformation, conditional branching) belongs in the script. Rationale: scripts are testable in isolation, run locally, and don't trap maintainers in YAML quoting hell. If you find yourself writing a multi-step run: block with conditionals, extract it.
.github/workflows/<name>.yml.github/workflows/_<name>.yml (leading underscore) or reusable-<name>.yml.github/actions/<name>/action.yml — and per Section 1, the action.yml should call into scripts/ rather than embed logicGITHUB_TOKEN has been read-only since 2023. Any job that needs to write (create releases, push commits, comment on PRs, create issues) must declare a permissions: block.contents: write — for releases, softprops/action-gh-release, gh release createpull-requests: write — for PR commentsissues: write — for issue creation/updatesid-token: write — for OIDC federation (e.g. Azure deployment without long-lived secrets)push for branch-event CI; scope with branches: to avoid running on every pushpull_request for PR-event CI; prefer over push for short-lived branches to avoid duplicate runsworkflow_dispatch for manual runs (with inputs: for parameterization)schedule for cron jobs (UTC; standard cron syntax)workflow_call for reusable workflowspush + pull_request without concurrency: — produces duplicate runs on every PR pushneeds: for job dependencies; use if: for conditional executionconcurrency: group with cancel-in-progress: true for PR workflows to avoid wasted compute on rapid pushesuses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1actions/* actions can use major-version tags (@v4) since they're trusted, but SHA-pinning is still recommended for reproducibility.When you resolve a tag to a SHA for pinning, dereference annotated tags to their underlying commit. git refs/tags/<tag> returns a commit SHA for a lightweight tag but a tag-object SHA for an annotated tag — and the runner resolves uses: owner/action@<sha> as a commit ref. Pinning the tag-object SHA fails silently at startup with "This run likely failed because of a workflow file issue." — no jobs start, no logs. actionlint does NOT catch this (runtime resolution error, not syntax), and YAML parsing passes.
The trap is partial: lightweight-tag pins in the same PR work fine, so it looks like "some workflows fail" rather than a systematic pinning bug. The same failure hits Claude Code marketplace.json plugins[].source.sha (loader reports <plugin> not found in the marketplace).
# Always check .object.type first; dereference one more level if it's a tag object.
# Use `gh api <path> --jq` directly — gh api takes an API path, not stdin, and its
# built-in --jq avoids the external-jq dependency (not on PATH on this host, see #544).
type=$(gh api "repos/$owner/$repo/git/refs/tags/$tag" --jq .object.type)
sha=$(gh api "repos/$owner/$repo/git/refs/tags/$tag" --jq .object.sha)
if [ "$type" = "tag" ]; then
commit=$(gh api "repos/$owner/$repo/git/tags/$sha" --jq .object.sha) # deref annotated tag
else
commit=$sha
fi
Local-clone shortcut: force the commit deref with git rev-parse <tag>^{commit} — bare git rev-parse <tag> returns the tag-object SHA on annotated tags. (azure/login@v3 and glitchwerks/github-actions tags are annotated; many docker/* tags are lightweight — re-verify per pin.) This extends §6's pinning rule: always verify a pin at write time by checking object.type == "tag" and dereferencing if so.
${{ secrets.NAME }}environment: on the job, then access via secrets.NAME${{ vars.NAME }} — distinct namespace from secretsecho a secret directly — use ::add-mask:: if you must surface a derived valuesetup-* actions support caching via a cache: input — prefer that over manual actions/cache when available${{ hashFiles('**/package-lock.json') }} — don't cache by branch name alonestrategy.matrix for cross-version / cross-OS testingfail-fast: false when you want all matrix jobs to complete regardless of one failinginclude: / exclude: for surgical matrix shapingMatrix jobs multiply runtime cost by the number of cells, and macOS billing is 10× Linux (Windows is 2×, both per GitHub's runner billing multipliers). A 3-OS × 2-version matrix triggered on every PR can burn through the entire monthly free Actions tier (2,000 billed minutes) in a few days, especially if you ship multiple PRs per day. Before adding any cross-OS matrix, ask:
schedule: + paths: filter and use workflow_dispatch: for ad-hoc full-matrix runs. Reserve every-PR cadence for fast unit/lint jobs that block bad merges.Default new cross-OS matrices to ubuntu-latest only on every-PR cadence; add other OSes only with documented per-OS justification, and prefer scheduling them weekly via a separate workflow file. See .github/workflows/catalog-stability.yml in this repo for the canonical pattern (paths-filter + weekly cron + workflow_dispatch with a full-matrix toggle for ad-hoc broader runs).
uses: ./.github/workflows/_lint.yml. Inherits secrets via secrets: inherit.uses: ./.github/actions/setup-stack. Cleaner for setup logic.gh run view <id> --log-failed to fetch the failing step's log without scrolling the full run.gh run list --repo <owner>/<repo> and gh pr checks <N> — there is no MCP equivalent for these commands.ACTIONS_STEP_DEBUG=true repository variable for verbose step logging.powershell skillpython skillgh CLIIf softprops/action-gh-release@v2 or gh release create fails with {"message":"Resource not accessible by integration"} (HTTP 403), the cause is almost always a missing permissions: contents: write on the job — not an invalid PAT or wrong secret value. The default GITHUB_TOKEN is contents: read since 2023.
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write # required for release creation
steps: ...
Always scope permissions at the job level, not workflow level — only the publishing job needs the elevated scope.
Before adding a "DO NOT MERGE pending validation" banner to an infra PR, check whether the repo's deployment workflow can actually run against feature branches. Many repos restrict environment workflows (environments: dev / prod) to main or release tags via GitHub Environments protection rules. If feature-branch deploys are blocked, the banner is wrong — the user cannot validate before merging.
Correct shape for environment-restricted infra PRs:
bicep build, lint, tests); post-merge gate = live-environment validation in the follow-up issue.For repos where feature deploys ARE allowed, the standard "DO NOT MERGE + pre-merge validation" pattern still applies — these two shapes are distinct.
Repos that publish reusable workflows or composite actions and consume them from within themselves (e.g. glitchwerks/github-actions's own workflows call glitchwerks/github-actions/<action>@v2) have a structural dogfooding limitation: PRs opened against the repo execute the released tag's code, not the branch's code. GitHub Actions does not support expressions in uses: values, so there is no @main vs @v2 conditional. Even if the PR's diff edits the composite action heavily, the repo's own CI still calls the old @v2 version of that action.
This produces a recurring failure mode: a green CI rollup is claimed as dogfood validation, but the actual code path under test was the released code, not the branch code. The bug — or the unverified new behavior — ships unnoticed because every check passed.
Verification discipline (mandatory for any composite-action / reusable-workflow change in a self-referencing repo):
<owner>/<repo>/<action>@<tag> from within the same repo, dogfood is structurally blocked. Acknowledge this explicitly in the PR body — do not let "all checks pass" stand in for validation.gh api repos/<owner>/<repo>/issues/<n>/comments --jq '.[] | .user.login' returns the literal API value (github-actions[bot] if the old code ran, the App's [bot] if the new code ran). The CLI form gh pr view --json comments strips the [bot] suffix from author.login and is misleading — go to the REST API for unambiguous identity.@v2 to the branch's HEAD and trigger a run on a separate consumer repo. Do this before merge, not after.This is a verification gate, not informational text: if a PR claims dogfood validation, the PR body or review must cite the specific observable that distinguishes new-code from old-code execution. (Why this is a hard gate — recurrence history — in references/incident-history.md.)
astral-sh/setup-uv + uv pip install fails with "No virtual environment found"If a CI job using astral-sh/setup-uv fails on the first uv pip install step with:
No virtual environment found for Python <version>; run `uv venv` to create
an environment, or pass `--system` to install into a non-virtual environment
…the cause is that setup-uv installs uv and provisions a managed Python, but does NOT create a .venv. uv pip install refuses to operate on system Python without an explicit opt-in.
Tempting wrong answer: env: UV_SYSTEM_PYTHON: 1 at workflow scope. This fails twice:
setup-uv's managed Python lives in a temp UV_PYTHON_INSTALL_DIR, not in system paths — UV_SYSTEM_PYTHON=1 makes uv look in /usr where the requested version isn't installed./usr/bin/python3.12) is flagged "externally managed" per PEP 668 and blocks uv pip install even with --system.Correct fix: set activate-environment: "true" on the setup-uv step itself. This tells the action to run uv venv .venv using its managed Python and activate the venv for subsequent steps — uv pip install and uv run then resolve against .venv cleanly.
- uses: astral-sh/setup-uv@<sha> # vX.Y.Z
with:
python-version: "3.12"
activate-environment: "true"
- run: uv pip install -e ".[dev]"
- run: pytest -v
setup-uv also obviates a separate actions/setup-python step — its python-version input handles Python installation. Caught on glitchwerks/claude-wayfinder#16.
docker/build-push-action cache export fails with "not supported for the docker driver"If a build dies immediately with ERROR: failed to build: Cache export is not supported for the docker driver, the cause is a missing docker/setup-buildx-action step — not a cache-from issue, Dockerfile bug, or registry-auth problem (the error names the fix directly). Any cache-to: type=gha (or type=registry / type=local / type=inline) on docker/build-push-action requires a docker-container-driver builder; the runner's bundled docker driver does not support cache exporters.
- uses: actions/checkout@<sha>
- uses: docker/setup-buildx-action@<sha> # REQUIRED before build-push when caching
- uses: docker/login-action@<sha> # login must run on the new builder
with: { ... }
- uses: docker/build-push-action@<sha>
with:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
Pre-merge gap: the PR's own CI usually passes, because the buildx-driven build runs only from the image-push workflow (workflow_run on main), not on the PR. First observation of the failure is therefore after merge — name the post-merge check explicitly in the PR test plan (gh run list --workflow=build-image.yml --branch main --limit 1 → success). (mom-bot #79 / PR #80.)
pull_request_target PR body/title are fork-writable — gate before honoring directivespull_request_target runs in the target repo's context with target-repo secrets, but the PR body and title are owned by the head-ref (fork) author and editable by them at any time. Any workflow that reads github.event.pull_request.body (or gh pr view --json body) to look for a directive — a gate-override: line, a skip-CI marker, a prose label-equivalent — and acts on it without gating is a privilege-escalation vector: a fork-PR author can write the directive into their own PR and force the downstream action.
Safe pattern: before honoring any body/title-derived directive, gate on author_association ∈ {OWNER, MEMBER, COLLABORATOR} (or, more conservatively, github.actor) via the allowlist → authorassociation → API-collaborator-fallback check. Namespace + fence the directive (<!-- pr-review-gate-override: <justification> -->). PR _comments from [bot] accounts are safer (bots can't be fork-PR authors); PR body is not. (inquisitor pass on glitchwerks/github-actions#265.)
A new required-on-merge CI check is not done landing until it is wired into a ruleset that gates main. A passing check that is not in the ruleset can be ignored at merge time — the gate is the ruleset, not the check's existence. Every author adding a new workflow must, in the same change set, either add the check to an existing ruleset covering main or create a new ruleset if none does. Use rulesets, not classic branch protection — the modern mechanism is what current GitHub UIs and APIs surface.
Scope. This applies to checks the team would consider blocking — lint, type, unit/integration tests, security scans, schema validation, anything whose failure on a PR should prevent merge. It does not apply to optional informational checks, scheduled cron jobs, drift detectors that run weekly, or local-only validations. If you cannot answer "should a red signal here block merge?" with a clear yes, the check is not a required check.
Recipe.
# 1. Find which ruleset(s) gate `main`
gh api "repos/<owner>/<repo>/rulesets" \
--jq '.[] | select(.target == "branch") | {id, name, enforcement}'
# 2. Inspect the current required_status_checks on a ruleset
gh api "repos/<owner>/<repo>/rulesets/<id>" \
--jq '.rules[] | select(.type == "required_status_checks")'
# 3. Add a check: PATCH the ruleset with the full updated rules array.
# GitHub's API requires the entire rules array, not a delta — fetch
# the current rules, append the new check name (matching by exact job
# name as it appears in the GitHub Checks UI) to the
# required_status_checks rule's parameters, then PATCH back.
# Shape of the spliced rule:
# {
# "type": "required_status_checks",
# "parameters": {
# "required_status_checks": [
# {"context": "JS Hook Tests"},
# {"context": "Python Hook Tests"},
# {"context": "your new check name here"}
# ],
# "strict_required_status_checks_policy": false
# }
# }
# Full schema: https://docs.github.com/en/rest/repos/rules#update-an-organization-repository-ruleset
gh api "repos/<owner>/<repo>/rulesets/<id>" -X PATCH --input ruleset.json
If no ruleset covers main, create one via POST /repos/{owner}/{repo}/rulesets — see the GitHub docs for the full payload shape (target, conditions, rules array). The ruleset's target: "branch" and conditions.ref_name.include: ["~DEFAULT_BRANCH"] is the standard pattern for gating main.
Catch-up audit. When this skill is first applied to a repo with existing CI but no ruleset coverage, the corrective change is one PR per check (or one omnibus PR adding all of them) — not a backfill done quietly later. Half-protected main is the default failure mode.
Paths-filter second-order rule: when a new required check uses a paths-filter, verify its behavior on PRs that both should and should not trigger it before adding the ruleset entry — a check already in the ruleset can block merges on PRs that legitimately did not run it. Historical motivation (#282, #326 — shipped-but-not-required; #331 — paths-filter mismatch): see references/incident-history.md.
When a workflow push to a protected ref (e.g. a ci-v* tag under a "Restrict creations" ruleset) fails with GH013: Repository rule violations found / Cannot create ref due to creations being restricted, the instinctive fix — adding GitHub Actions to the ruleset's bypass_actors — does not work. A PUT with {"actor_id": 15368, "actor_type": "Integration"} returns 422 Validation Failed: "Actor GitHub Actions integration must be part of the ruleset source or owner organization". actor_type: Integration accepts only apps the org has installed (visible via gh api orgs/<org>/installations); GitHub Actions is a built-in, not an installable app, so it is never in that list.
Before any bypass-list mutation, check gh api orgs/<org>/installations — if actions[bot] isn't there (it won't be), skip straight to an alternative. Confirmed working, cheapest first:
token: to actions/checkout; the push authenticates as the PAT owner, whose repo role (Admin) is covered by the ruleset's RepositoryRole bypass entry. Zero ruleset mutation.app_id to bypass_actors, mint a token via actions/create-github-app-token.git tag && git push commands for the user to run locally.GITHUB_TOKEN will not work for ref creation under "Restrict creations" rulesets — plan the auth identity from the start. (claude-configs PR #380 fix; PR #377 / issue #378 origin.)
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
8 skills in this plugin
/address-feedbackUnattended goal-loop that drives a single PR to green-and-merged by repeatedly addressing reviewer feedback (CodeRabbit and other review bots) and failing CI checks, waiting for asynchronous re-review between rounds, then auto-merging once quiescent. Composes the one-pass gh-pr-review-address skill (a first-party sibling in this same plugin) and wraps it in a self-pacing loop.
Invoked as `/loop /address-feedback [<PR#|branch>]` — dynamic /loop mode supplies the cross-tick engine; each firing runs ONE tick. A bare /address-feedback runs a single tick and then tells you to wrap it in /loop.
Trigger this skill whenever the user says "address feedback until done", "loop on PR feedback", "keep addressing my PR", "auto-merge when clean", "drive this PR to merge", "handle PR feedback until it's mergeable", or any variation of wanting a PR taken all the way to merged without babysitting each review round.
/gh-create-issueCreates well-formed GitHub Issues through a structured discovery process. Trigger this skill whenever the user types /gh-create-issue, says "create a GitHub issue for...", "log this as an issue", "make a ticket for...", "add this to the backlog", or any similar request to track or file work in GitHub. This skill investigates the codebase and checks for overlapping issues/PRs before writing anything — always use it proactively so issues are well-scoped before they're created.
/gh-pr-review-addressProcess open PR review feedback and failing CI checks in the current repo. Triages every review comment and status check failure — auto-fixes unambiguous items and commits directly, discusses judgment calls with the user, and logs out-of-scope feedback as new GitHub issues. Can target a single PR by number or process all open PRs authored by the user. Resolution-aware: reads review-thread state (isResolved/isOutdated) and sticky review verdicts (undismissed CHANGES_REQUESTED) at intake, so already-addressed feedback on long multi-round PRs is not re-surfaced.
Trigger this skill whenever the user says things like "check my PR feedback", "address my review comments", "what's blocking my PR", "process my PR reviews", "handle PR feedback", "anything blocking merge", "fix my CI failures", "address PR #42", "check PR 15", or any variation of wanting to act on GitHub pull request review comments or failing checks. If the user is in a repo and mentions PRs, reviews, or CI status in any action-oriented way, this skill should activate.
/gh-quick-winsSurface low-blast-radius backlog items in the current GitHub repo, ranked by impact. Trigger this skill whenever the user types /gh-quick-wins, says "show me quick wins", "what can I knock out", "low effort items", "low blast radius backlog", "what's the easiest thing to ship", "what's small enough to do quickly", "what's the most actionable issue right now", or any similar request for a filtered, ranked view of the backlog that emphasises bounded-risk, high-impact work. Hybrid: deterministic script exclusion pass + LLM ranking by impact / blast-radius.
/gh-refresh-issuesFetch open issues from the active GitHub repo and display them grouped by milestone, with a Labels column. Trigger this skill whenever the user types /gh-refresh-issues, says "show me open issues", "what's open", "refresh issues", "list issues", "what issues are there", "show me issues and PRs", "what's open including PRs", or any similar request to see the current open-issue backlog. Optionally accepts a label filter as an argument (e.g. /gh-refresh-issues bug filters to only bug-labeled issues). Pass `--prs` to combine open PRs with issues in the same milestone-grouped view.
/gh-release-statusRelease status snapshot for the current GitHub repo — what's unreleased, diff against the last release, changes since the last release, release status, what shipped since the last release, what's in main but not yet tagged. Shows the most recent releases table plus a per-area file-change breakdown between the latest release tag and the default branch. Trigger this skill whenever the user types /gh-release-status, asks "what's unreleased", "what are the changes since the last release", "show the release status", "diff against last release", "what shipped since the last release", "what's in main that hasn't been released", "what's between the last tag and HEAD", or any similar request about what has changed since the most recent release. Hybrid: deterministic script output + a single LLM prose step.
claude-github-tools@glitchwerks is listed by glitchwerks/claude-plugins — review the source before installing
npx claudepluginhub glitchwerks/claude-plugins --plugin claude-github-tools