github-actions
Skill71 starsChanged 8 days agoApache-2.0View on GitHub
Design, review, secure, and debug GitHub Actions workflows — reusable workflows, OIDC federation, SHA pinning, token scoping, promotion orchestration, and CI failure diagnosis.
- Reads credentials
- Commits and pushes
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 35 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
When invoked with no arguments, ask before proceeding:
- Very specific: line 52
Read references/github-actions.md before responding.
- Distinctive: line 64
Every workflow should follow this job order:
- Distinctive: line 75
Keep jobs small and named by intent.
- Distinctive: line 105
Prefer updating Git over imperative deploys:
- Distinctive: line 195
Add the version as a comment so reviewers can audit without resolving the SHA manually:
- Very specific: line 228
Never print secrets: avoid echo $SECRET in run: steps
- Distinctive: line 239
Ask the user to paste the workflow file or provide the path.
- Very specific: line 318
Check the IAM trust policy sub condition matches the exact repo/branch/env
“Common” is measured: kept by at least 6 in 10 of the 35 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub Actions Command
Structured guidance for designing, hardening, reviewing, and debugging GitHub Actions workflows.
Activation
/platform-skills:github-actions design # reusable workflow or job graph design
/platform-skills:github-actions security # OIDC, SHA pinning, token scoping, secrets hygiene
/platform-skills:github-actions review # production-readiness checklist for an existing workflow
/platform-skills:github-actions debug # diagnose a failing workflow or jobInteractive Wizard (fires when no mode is provided)
When invoked with no arguments, ask before proceeding:
Q1 — Mode?
What do you need?
1. design — reusable workflow, job graph, promotion pipeline
2. security — OIDC federation, SHA pinning, token scoping, secret hygiene
3. review — production-readiness checklist for an existing workflow file
4. debug — job failure, permission error, OIDC rejection, missing context
Enter 1–4 or mode name:Q2 — Context (after mode selected):
- design:
Describe what the workflow should do — validate, build, promote, deploy? - security:
Paste the workflow file or describe the auth pattern you are using. - review:
Paste the workflow file or provide the path. - debug:
Paste the error output or describe the failure symptom.
Mode: design
Triggers: design, build workflow, create pipeline, reusable workflow, job graph, promote, deploy flow
Read references/github-actions.md before responding.
Step 1 — Classify the workflow type
| Type | When to use |
Reusable workflow (workflow_call) | Same job sequence needed across multiple repos or environments |
| Composite action | Same step sequence needed within job graphs — use /platform-skills:composite-actions |
| Standard workflow | One-off or repo-specific, not shared |
Step 2 — Apply the canonical job pattern
Every workflow should follow this job order:
validate → build → [test] → promote → [deploy]validate: lint, format, policy gates, unit checks — fast, no credentialsbuild: image or artifact packaging — OIDC to registrypromote: update version pin or overlay in Git — triggers GitOps reconcilerdeploy: guarded apply only if not using GitOps
Keep jobs small and named by intent. If a job is hard to name, it is doing too much.
Step 3 — Reusable workflow structure
# .github/workflows/validate.yml — called by other workflows
on:
workflow_call:
inputs:
environment:
required: true
type: string
description: "Target environment (dev | staging | prod)"
secrets:
token:
required: true
jobs:
validate:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ secrets.token }}Step 4 — Promotion orchestration
Prefer updating Git over imperative deploys:
# promote job — updates the version pin in the GitOps repo
promote:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Update image tag
env:
NEW_TAG: ${{ needs.build.outputs.image_tag }}
run: |
sed -i "s|image:.*|image: ghcr.io/org/app:${NEW_TAG}|" \
deploy/overlays/${{ inputs.environment }}/kustomization.yaml
git config user.email "ci@org.com"
git config user.name "CI"
git commit -am "chore: promote app to ${NEW_TAG} in ${{ inputs.environment }}"
git pushHandoffs:
- Extracting repeated steps →
/platform-skills:composite-actions - Terraform plan/apply in the workflow →
/platform-skills:terraform - GitOps reconciler that picks up the promotion commit →
/platform-skills:gitops
Mode: security
Triggers: OIDC, pin, SHA, token, permissions, secrets, secure, harden, federation
Read references/github-actions.md before responding.
Repositories with Kubernetes manifests or Helm charts: the posture gate is /platform-skills:kubescape ci (signature-verified CLI install, fails PRs only on new findings). Do not use kubescape/github-action: its latest release bundles CLI v3.0.21 and its README pins @main.
OIDC federation — AWS
permissions:
id-token: write # required for OIDC token request
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1
with:
role-to-assume: arn:aws:iam::123456789012:role/github-actions-deploy
aws-region: eu-north-1IAM trust policy (scope to repo and branch):
{
"Condition": {
"StringLike": {
"token.actions.githubusercontent.com:sub": "repo:org/repo:ref:refs/heads/main"
}
}
}OIDC federation — Azure
permissions:
id-token: write
contents: read
steps:
- uses: azure/login@532459ea530d8321f2fb9bb10d1e0bcf23869a43 # v3.0.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}SHA pinning checklist
# Resolve a tag to its current commit SHA
gh api repos/{owner}/{repo}/git/refs/tags/{tag} \
--jq '.object.sha'
# For actions that use a commit SHA directly (not a tag ref):
gh api repos/{owner}/{repo}/commits/{tag} --jq '.sha'Add the version as a comment so reviewers can audit without resolving the SHA manually:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0Token scoping — minimum permissions per job
| Job type | Permissions needed |
| Read-only checkout | contents: read |
| Push a commit | contents: write |
| Create or comment on PR | pull-requests: write |
| Publish packages | packages: write |
| OIDC token request | id-token: write |
| Read Issues | issues: read |
Set permissions: {} at the workflow level to deny all, then grant per-job:
permissions: {} # deny all at workflow level
jobs:
build:
permissions:
contents: read
id-token: write
packages: writeSecret hygiene
- Store secrets in GitHub Environments, not at repository level, for deployment secrets
- Never print secrets: avoid
echo $SECRETinrun:steps - Mask dynamic secrets:
echo "::add-mask::${DYNAMIC_SECRET}" - Rotate long-lived tokens on a schedule; prefer OIDC to eliminate them
- Audit secret usage:
gh secret listandgh secret list --env <env>
Mode: review
Triggers: review, audit, checklist, is this workflow safe, production ready
Ask the user to paste the workflow file or provide the path. Then evaluate against:
CRITICAL (must fix before merge)
❌ External `uses:` with mutable tag (@v4, @main, @latest) — supply chain risk; pin to full SHA
❌ `permissions: write-all` or no permissions block — grants all scopes by default
❌ `${{ github.event.*.body }}` or PR title interpolated in run: — script injection risk
❌ Long-lived cloud credentials stored as secrets — replace with OIDC
❌ `pull_request_target` with checkout of the PR head — arbitrary code execution riskWARNING (should fix)
⚠️ No concurrency group — parallel runs on same branch can conflict or double-deploy
⚠️ No timeout-minutes on jobs — a hung job blocks runners indefinitely
⚠️ Secrets passed to untrusted third-party actions — scope secrets to first-party or audited actions only
⚠️ Environment protection rules not used for production deploys
⚠️ No required status checks on the branch protection rule this workflow targetsINFORMATIONAL
ℹ️ No dependabot.yml for github-actions ecosystem — action versions will drift
ℹ️ Reusable workflow could replace copy-pasted job sequence
ℹ️ Job name does not describe intent clearlyReport format:
## Review: <workflow-name>
### CRITICAL (N findings)
❌ Line 12: uses: actions/checkout@v4 — pin to SHA. Current SHA: <sha>
### WARNING (N findings)
⚠️ No concurrency group defined
### INFORMATIONAL (N findings)
ℹ️ No dependabot.yml for the github-actions ecosystem
### Score: N/15 — Poor | Fair | Good | ExcellentMode: debug
Triggers: failing, error, permission denied, OIDC, 401, 403, missing context, debug, not working
Identify the failure layer first:
1. Syntax / parse error → workflow YAML invalid
2. Permission / auth error → token scoping, OIDC trust, secret missing
3. Missing context → expression evaluates to empty, wrong event trigger
4. Action version mismatch → SHA pinned to a version with a breaking change
5. Runner environment → tool not available on runner image
6. Downstream service error → cloud API, registry, or deploy target failingDiagnosis by error type
Resource not accessible by integration / 403
# Check the permissions block — add the missing scope
permissions:
contents: write # missing if you get 403 on git push
pull-requests: write # missing if you get 403 on PR comment
id-token: write # missing if OIDC token request failsOIDC rejection (Not authorized to perform sts:AssumeRoleWithWebIdentity)
- Confirm
id-token: writeis set on the job - Check the IAM trust policy
subcondition matches the exact repo/branch/env - Confirm the workflow is running from the branch/environment specified in the condition
- For environment-scoped trust:
repo:org/repo:environment:production— job must useenvironment: production
# Decode the OIDC token to inspect claims (add a debug step temporarily)
- name: Inspect OIDC token claims
run: |
TOKEN=$(curl -sSfL -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sts.amazonaws.com" | jq -r '.value')
echo "${TOKEN}" | cut -d. -f2 | base64 -d 2>/dev/null | jqExpression evaluates to empty
# Workflow inputs are empty in non-workflow_call events
# Guard with:
- if: ${{ inputs.environment != '' }}Context access might be invalid
Caused by accessing a context that does not exist for the triggering event (e.g. github.event.pull_request on a push event). Check which contexts are available for the trigger.
Validation command
# Lint the workflow file locally before pushing — syntax, expressions, shell
actionlint .github/workflows/<workflow>.yml
# Audit the same file for security findings — a valid workflow can still be unsafe
zizmor --strict-collection .github/workflows/<workflow>.yml
# Check recent run failures with full logs
gh run list --workflow <workflow>.yml --limit 10
gh run view <run-id> --log-failedactionlint and zizmor do not overlap. actionlint answers "is this workflow valid" (syntax, expression types, shellcheck on run:). zizmor answers "is this workflow safe" (template injection, credential persistence, unpinned uses:, over-broad permissions:, impostor commits). Run both. For the full audit catalogue, policy file, and CI gate: /platform-skills:zizmor.
Common mistakes
pull_request_target+ PR head checkout — runs with write permissions and access to secrets; combined with checkout of untrusted code this allows secret exfiltration. Never checkout${{ github.event.pull_request.head.sha }}in apull_request_targetworkflow.- Mutable action tags —
@v4can be rewritten by the action author; a supply chain compromise silently executes attacker code. Always pin to SHA. - Over-scoped
GITHUB_TOKEN— default permissions can be broad depending on repo settings. Always set an explicitpermissions:block. - Forgetting OIDC requires the job's environment to match the trust policy — if the trust uses
environment:production, the job must declareenvironment: productionor the token request is rejected. workflow_dispatchwith no input validation — inputs are free-text by default. Usetype: choicefor enum inputs and validate string inputs in the first step.
Reference
Full guidance: references/github-actions.md
For composite action scaffolding and review: /platform-skills:composite-actions
For workflow security auditing with zizmor (audit catalogue, zizmor.yml policy, auto-fix, CI gate, pre-commit): /platform-skills:zizmor
Examples:
examples/github-actions/terraform-cicd.yml— Terraform plan + apply with OIDCexamples/github-actions/container-build.yml— Docker build + GHCR pushexamples/github-actions/reusable-workflows/— reusable workflow patterns
Other versions44 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 44
- JabRef/jabref★ 4.9ksame name
- callstackincubator/agent-skills★ 1.7ksame name
- tddworks/ClaudeBar★ 1.6ksame name
- OpenHands/extensions★ 167same name
- wendylabsinc/claude-skills★ 62same name
- nahid-sparktales/agent-dispatcher★ 59same name
- mujez/claude-skills★ 47same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- G1Joshi/Agent-Skills★ 15same name
- maikotrindade/awesome-react-native-skills★ 13same name
34 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use react-native-brownfield-migration, upgrading-react-native and 6 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
maikotrindadeSkillreact-native-brownfield-migration
Provides an incremental adoption strategy to migrate native iOS or Android apps to React Native or Expo using @callstack/react-native-brownfield for initial setup. Use when planning migration steps, packaging XCFramework/AAR artifacts, and integrating them into host apps.
Also in 4 projects that use this
maikotrindadeSkillupgrading-react-native
Upgrades React Native apps to newer versions by applying rn-diff-purge template diffs, updating package.json dependencies, migrating native iOS and Android configuration, resolving CocoaPods and Gradle changes, and handling breaking API updates. Use when upgrading React Native, bumping RN version, updating from RN 0.x to 0.y, or migrating Expo SDK alongside a React Native upgrade.
Also in 3 projects that use this
ffsshhttiikkSkillnodejs
JavaScript runtime built on Chrome's V8 JavaScript engine
Also in 4 projects that use this
jcsaaddupuySkillgitlab-ci
GitLab CI/CD configuration guide
Also in 3 projects that use this
Sorcha-PlatformSkillgrpc
Build or review gRPC services and clients in .NET. USE FOR: ASP.NET Core gRPC, protobuf contracts, unary or streaming RPC, gRPC client factory, interceptors, deadlines, cancellation, channel reuse, backend service integration. DO NOT USE FOR: broad browser-facing APIs without gRPC-Web tradeoff review, SignalR realtime hubs, plain REST APIs. INVOKES: dotnet build/test and focused service or client smoke checks when code changes.
Also in 3 projects that use this
ffsshhttiikkSkillgcp
Google Cloud Platform services and best practices
Also in 3 projects that use this
In this repository59 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/keda.mdcCursor rule
- .cursor/rules/kubernetes.mdcCursor rule
- .cursor/rules/platform-skills.mdcCursor rule
- .cursor/rules/terraform.mdcCursor rule
- code-reviewSkill
- platform-skillsSkill
- ai-governanceSkill
- awesome-docsSkill
- aws-profileSkill
- awsSkill
- azureSkill
- backup-drSkill
- chaosSkill
- checkovSkill
- cluster-upgradeSkill
- commitSkill
- complianceSkill
- composite-actionsSkill
- datadogSkill
- debugSkill
- documentSkill
- doraSkill
- dynatraceSkill
- finopsSkill
- fluxcdSkill
- gateway-apiSkill
- gitopsSkill
- helmchartSkill
- karpenterSkill
- kedaSkill
- kingfisherSkill
- kubernetesSkill
- kubescape-operatorSkill
- kubescapeSkill
- kyvernoSkill
- linkerdSkill
- linuxSkill
- mcpSkill
- observabilitySkill
- opaSkill
- openshiftSkill
- platform-skillsSkill
- preflightSkill
- productSkill
- progressive-deliverySkill
- pr-reviewSkill
- renovateSkill
- runtime-securitySkill
- secretsSkill
- self-improveSkill
- setup-agentsSkill
- supply-chainSkill
- terraformSkill
- token-optimizerSkill
- triageSkill
- trivySkill
- zizmorSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

