How this skill is triggered — by the user, by Claude, or both
Slash command
/infra-ci-cd-github-actions:infra-ci-cd-github-actionsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **Quick Guide:** GitHub Actions for CI/CD. Affected detection for monorepo optimization (e.g., Turborepo `--affected` or `--filter=...[origin/main]`). Dependency and build output caching for fast CI. Quality gates: lint + type-check + test + build + coverage as required status checks. Multi-environment deployments with build promotion. OIDC authentication for cloud providers. Pin all action a...
Quick Guide: GitHub Actions for CI/CD. Affected detection for monorepo optimization (e.g., Turborepo
--affectedor--filter=...[origin/main]). Dependency and build output caching for fast CI. Quality gates: lint + type-check + test + build + coverage as required status checks. Multi-environment deployments with build promotion. OIDC authentication for cloud providers. Pin all action and runtime versions.
<critical_requirements>
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST use affected/changed-package detection for PR builds - NEVER run full test suite on PRs)
(You MUST cache package manager dependencies and build outputs - CI without caching wastes 70% of runtime)
(You MUST pin action versions (actions/checkout@v6, oven-sh/setup-bun@v2, actions/cache@v5) - NEVER use @main or unversioned)
(You MUST implement quality gates (lint + type-check + test + build) as required status checks - block merge on failures)
(You MUST use OIDC for cloud provider auth where supported - NEVER use static long-lived credentials)
</critical_requirements>
Detailed Resources:
Auto-detection: GitHub Actions, CI/CD pipelines, .github/workflows, Turborepo affected detection, remote cache, deployment automation, quality gates, OIDC authentication, secret rotation, artifact attestations, SLSA provenance, reusable workflows, composite actions, matrix builds, workflow_call
When to use:
When NOT to use:
Key patterns covered:
--affected flag or --filter=...[origin/main])workflow_call, up to 10 levels total)using: composite, shared setup logic)CI/CD pipelines automate testing, building, and deployment. In a monorepo, intelligent caching and affected detection are critical for maintaining fast CI as the codebase grows.
Core principles:
Separate install, parallel quality checks, then build.
# Recommended workflow structure:
# ci.yml - lint, test, type-check, build (PR + main)
# deploy.yml - production deployment from main
# preview.yml - preview deployments for PRs
Key decisions:
latest)concurrency with cancel-in-progress: true to avoid wasting resourcesSee examples/core.md for complete workflow examples.
Only test and build changed packages in monorepos.
Turborepo example (two approaches, choose one):
# Modern: --affected flag (auto-detects CI environment)
turbo run test --affected
# Manual: --filter with git comparison
turbo run test --filter=...[origin/main]
Key principle: PRs use affected detection for fast feedback (< 5 min). Main branch runs full suite.
Gotcha: New packages have no git history and get skipped by affected detection. Always check for new package.json files and fall back to full suite.
See examples/testing.md for PR vs main branch workflow examples.
Automated checks that must pass before merge.
Quality gate order:
Configure as required status checks in branch protection. Use strict: true to require branches be up-to-date before merge.
See examples/testing.md for comprehensive quality gate workflow.
Eliminate static credentials for cloud deployments.
# Key requirement for OIDC:
permissions:
id-token: write # Required for OIDC token generation
contents: read
OIDC eliminates: manual key rotation, permanent security risk from leaked keys, and untraceable deployments. Temporary credentials auto-expire (typically 1 hour).
See examples/security.md for AWS OIDC and token-based authentication examples.
Centralize CI/CD logic across repositories.
| Feature | Reusable Workflow | Composite Action |
|---|---|---|
| Scope | Multiple jobs | Steps within a job |
| Secrets | Native secrets context | Must pass via inputs |
| Nesting | Up to 10 levels total (caller + 9 nested), 50 unique per run | N/A |
| Use for | Full pipeline templates | Shared setup/teardown |
See examples/core.md for implementation examples.
Goal: CI runtime < 5 minutes for PR builds
Parallelization techniques:
concurrency with cancel-in-progress: true to cancel outdated runsMonitoring targets:
<red_flags>
High Priority:
latest for runtime versions - Non-deterministic builds break reproducibilityMedium Priority:
concurrency limits - Multiple CI runs on same PR waste resourcesCommon Mistakes:
fetch-depth: 0 for affected detection (git diff fails without history)needs: [all, previous, jobs] on every job (creates sequential execution)Gotchas & Edge Cases:
fetch-depth: 0 required for affected detection (shallow clone breaks git diff)actions/cache default limit is 10GB per repo (configurable up to 10TB, additional storage billed at $0.07/GiB/month)id-token: write permission or token generation fails silentlyattestations: write AND id-token: write AND contents: readactions/create-release is deprecated - use softprops/action-gh-release@v2 insteadworkflow_dispatch now supports 25 inputs (increased from 10)</red_flags>
<critical_reminders>
All code must follow project conventions in CLAUDE.md
(You MUST use affected/changed-package detection for PR builds - NEVER run full test suite on PRs)
(You MUST cache package manager dependencies and build outputs - CI without caching wastes 70% of runtime)
(You MUST pin action versions (actions/checkout@v6, oven-sh/setup-bun@v2, actions/cache@v5) - NEVER use @main or unversioned)
(You MUST implement quality gates (lint + type-check + test + build) as required status checks - block merge on failures)
(You MUST use OIDC for cloud provider auth where supported - NEVER use static long-lived credentials)
Failure to follow these rules will result in slow CI (10+ min), security vulnerabilities (leaked credentials), and broken builds (missing quality gates).
</critical_reminders>
npx claudepluginhub agents-inc/skills --plugin infra-ci-cd-github-actionsDesign, debug, and harden GitHub Actions CI/CD workflows, including reusable workflows, matrix builds, self-hosted runners, OIDC authentication, caching, environments, secrets, and release automation.
Guides GitHub Actions CI/CD architecture, security hardening, and deployment strategies. Use when designing workflows, securing supply chains, optimizing build performance, or configuring deployments. Includes decision tables and quick references for common pipeline scenarios.
Provides GitHub Actions patterns for CI/CD pipelines, release automation with semantic-release, changesets, goreleaser, and testing strategies including matrix, cache, secrets, and reusable workflows.