/major-ai-skills:github-actionsfrom major-ai-skills
Design least-privilege GitHub Actions with explicit permissions, OIDC to cloud, cache keys tied to lockfiles, and fork-safe workflows—avoid secret/OIDC footguns agents repeat.
Ships in major-ai-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.
Read when SKILL.md points to them.
GitHub Actions runs workflows (YAML under .github/workflows/) on events (push, pull_request, workflow_dispatch, …). Jobs execute on runners; steps use run: or actions from the marketplace. Security is the product: explicit permissions, OIDC federation instead of long-lived cloud keys, pinned action SHAs for high assurance, and fork PR rules that block secrets and OIDC by design.
┌─────────────────────────────────────────────────────────────┐
│ GitHub Actions trust model │
│ │
│ Event → workflow → job(s) → steps │
│ ├── GITHUB_TOKEN (scoped by permissions: block) │
│ ├── Repository / environment secrets │
│ └── OIDC JWT (id-token: write) → cloud IAM role │
│ │
│ Reusable workflow: caller permissions CAP callee │
│ Fork pull_request: read-only token; NO OIDC injection │
└─────────────────────────────────────────────────────────────┘
Use when
Do not use when
pull_request_target is suggested to “fix” fork OIDC while checking out untrusted PR code—refuse; use maintainer-triggered workflows or skip cloud steps on forks.permissions: explicitly at workflow or job level; listing scopes replaces repo defaults—include everything needed (contents: read, pull-requests: write, etc.).id-token: write on the caller when using reusable workflows; callee cannot exceed caller caps.if: github.event.pull_request.head.repo.full_name == github.repository or manual workflow_dispatch.mask patterns; rotate if leaked in logs.package-lock.json, poetry.lock, go.sum).PR CI:
name: ci
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
- run: npm ci
- run: npm test
- run: npm run build
Deploy (protected branch + environment):
name: deploy
on:
push:
branches: [main]
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::123456789012:role/gha-deploy
aws-region: us-east-1
- run: ./scripts/deploy.sh
Reusable workflow caller pattern:
jobs:
release:
permissions:
id-token: write
contents: read
uses: org/shared/.github/workflows/deploy.yml@v1
secrets: inherit
Cloud trust policy must constrain sub/aud to repo and environment (see GitHub OIDC docs).
| Failure signature | Likely cause | Fix |
|---|---|---|
did not inject ACTIONS_ID_TOKEN | Fork PR or missing id-token: write | Same-repo gate; add permission on caller job |
Resource not accessible by integration | Incomplete permissions: after tightening | Add required scopes explicitly |
| Secrets empty on PR | Fork or wrong environment | Expected on forks; use env secrets + approval |
| Cache miss every run | Wrong path/hash in key | Include lockfile hash; verify working directory |
| OIDC AssumeRole denied | Trust policy sub mismatch | Align repo, ref, environment claims |
| Reusable workflow auth fail | Caller lacks id-token: write | Elevate caller job permissions only |
pull_request_target exploit path | Untrusted code with secrets | Never checkout PR head with secrets; use label-gated maintainer flow |
concurrency: group: deploy-${{ github.ref }}.workflow_dispatch inputs for prod promotions when needed.@dependabot-config patterns.@trivy and sign artifacts where org requires SLSA.pull_request_target security model is easy to misuse—default away from it.@docker — build/push images in jobs@terraform — plan/apply with environment gates@kubernetes / @argocd — deploy after CI updates Git tags@trivy — vulnerability gatesMANDATORY: Declare least-privilege
permissionson every workflow. Use OIDC for cloud auth; never recommend long-lived cloud keys in GitHub secrets when OIDC is viable. Do not usepull_request_targetto run untrusted PR code with secrets or OIDC. For fork PRs, skip or split cloud-authenticated jobs. Pin deploy actions to SHAs when writing high-assurance pipelines.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub alivirgo/major-ai-skills --plugin major-ai-skills412 skills in this plugin
/3d-slicerAutomate 3D Slicer research workflows with MRML, VTK/ITK, DICOM data, and Segment Editor. Use for software workflows, not clinical interpretation./abbreviated-git-statusInspect Git branch, staging, and working-tree changes with short or porcelain status output when a compact repository check is needed./ableton-liveAutomate Ableton Live sessions with Python MIDI Remote Scripts, Max for Live, AbletonOSC, and Link synchronization./act-as-a-personal-tutorExplain a subject step by step, assess prior knowledge, and use short exercises to check understanding before advancing./add-your-own-human-voiceRevise AI-assisted writing to preserve the author's voice, concrete experience, and intended tone./adobe-after-effectsScaffold After Effects comps and expression rigs, queue Render Queue / AME jobs, and export Essential Graphics (.mogrt) with ExtendScript-safe patterns.