Help us improve
Share bugs, ideas, or general feedback.
From godmode
Creates, audits, and optimizes GitHub Actions workflows for CI/CD, matrix builds, reusable workflows, composite actions, caching, and security hardening like pinning and permissions.
npx claudepluginhub arbazkhan971/godmodeHow this skill is triggered — by the user, by Claude, or both
Slash command
/godmode:ghactionsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
- User invokes `/godmode:ghactions`
Reference for GitHub Actions workflow best practices, including runner context, timeout-minutes, caching, concurrency, and security. Use when writing or debugging .yml workflows.
Writes and optimizes GitHub Actions workflows for CI/CD pipelines, triggers, jobs, steps, secrets, artifacts, and debugging runs.
Create, evaluate, and optimize GitHub Actions workflows and custom actions for CI/CD pipelines, troubleshooting, security analysis, performance tuning. Covers Ruby/Rails, TypeScript/Node.js, Heroku, Fly.io deployments.
Share bugs, ideas, or general feedback.
/godmode:ghactions.github/workflows/ or action.yml# Detect existing workflows
ls .github/workflows/*.yml 2>/dev/null
# Audit current actions
grep -rh "uses:" .github/workflows/ 2>/dev/null \
| sort -u
# Find unpinned actions (security risk)
grep -rn "uses:.*@v[0-9]" .github/workflows/ 2>/dev/null
# Find missing permissions declarations
grep -L "permissions:" .github/workflows/*.yml 2>/dev/null
# Find missing timeouts
grep -L "timeout-minutes:" .github/workflows/*.yml 2>/dev/null
REPOSITORY CONTEXT:
Workflows: <list>
Language: <detected>, Package Manager: <npm|pnpm>
Test: <jest|vitest|pytest>, Linter: <eslint|ruff>
Monorepo: yes/no, Environments: staging|production
IF no workflows: create from scratch
IF unpinned actions: pin to SHA immediately
IF missing permissions: add explicit per-job
IF missing timeouts: add to every job
KEY TRIGGERS:
push (CI on merge), pull_request (PR checks)
schedule (nightly), workflow_dispatch (manual)
workflow_call (reusable), release (publish)
RULES:
Use paths/paths-ignore to skip irrelevant workflows
IF docs-only change: skip test workflow
IF monorepo: trigger per-package via paths
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@<SHA>
- uses: actions/setup-node@<SHA>
with: { node-version: '20', cache: 'npm' }
- run: npm ci && npm run lint
test:
needs: lint
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node-version: [18, 20, 22]
# Cancel redundant runs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
OPTIMIZATION:
Shallow clone: fetch-depth: 1
Dependency caching: via setup action cache param
Docker layers: BuildKit GHA backend
Test sharding: matrix strategy
THRESHOLDS:
PR pipeline target: < 10 minutes total
Individual job timeout: 15 minutes default
Cache hit rate target: > 90%
IF pipeline > 15min: split jobs, add sharding
# Pin to SHA, minimal permissions
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
permissions:
contents: read
# NEVER interpolate untrusted input in run:
env:
PR_TITLE: ${{ github.event.pull_request.title }}
SECURITY CHECKLIST:
Pin all actions to full commit SHA
Declare minimum permissions per job
Never interpolate untrusted input in run: blocks
Restrict fork access to secrets
Use OIDC for cloud providers (no long-lived secrets)
Run OpenSSF Scorecard weekly
IF write-all permissions: CRITICAL — restrict now
IF unpinned actions: HIGH — pin to SHA
IF untrusted interpolation in run: CRITICAL
ENVIRONMENTS:
Staging: auto-deploy on push to main
Production: manual approval required
PROTECTION RULES:
Required reviewers: 1+
Wait timer: optional (e.g., 5min for monitoring)
Branch restriction: main only
IF deploy fails: auto-rollback
Save in .github/workflows/ and .github/actions/
Commit: "ci: <description> — GitHub Actions
(<N> jobs, <estimated time>)"
Never ask to continue. Loop autonomously until done.
permissions: write-all.run:.timeout-minutes on every job.retention-days on artifact uploads.continue-on-error: true for flaky tests.ls .github/workflows/*.yml 2>/dev/null
grep -rh "uses:" .github/workflows/ | sort -u
grep -rn "uses:.*@v[0-9]" .github/workflows/
grep -L "permissions:" .github/workflows/*.yml
grep -L "timeout-minutes:" .github/workflows/*.yml
Print: GHActions: {N} workflows, {M} jobs. Cache: {active|missing}. Concurrency: {status}. Security: {pinned|unpinned}. Status: {status}.
iteration workflow jobs duration_before duration_after cache_hit_rate security_fixes status
KEEP if: workflow passes on test PR
AND no secret exposure AND cache hit maintained
DISCARD if: workflow fails OR secrets leaked
OR build time increased > 20%
STOP when ALL of:
- All workflows pass on clean PR
- Caching configured for dependencies
- Concurrency groups prevent stale runs
- Secrets in repository settings only
actionlint locally.