G

Github Actions Creator Kit

All-in-one skill covering user, wants, create, generate. Includes structured workflows, validation checks, and reusable patterns for development.

SkillClipticsdevelopmentv1.0.0MIT
0 views0 copies

GitHub Actions Creator Skill

A Claude Code skill for creating production-ready GitHub Actions workflows — covering CI/CD pipelines, test automation, deployment workflows, scheduled jobs, and reusable workflow patterns.

When to Use This Skill

Choose this skill when:

  • Setting up CI/CD pipelines for a new repository
  • Creating test, build, and deploy workflows
  • Automating code quality checks (linting, type checking, security)
  • Setting up scheduled jobs (dependency updates, reports)
  • Creating reusable composite actions for shared workflows
  • Configuring matrix builds for multi-platform testing

Consider alternatives when:

  • You need to fix a failing CI check (use a CI fix skill)
  • You need to deploy without CI (use a deployment skill)
  • You need a different CI platform (GitLab CI, CircleCI)

Quick Start

# Create workflow directory mkdir -p .github/workflows # Add the skill to Claude Code claude mcp add github-actions-creator # Generate a CI workflow claude "create a CI workflow for my TypeScript Node.js project"
# .github/workflows/ci.yml - Complete CI Pipeline name: CI on: push: branches: [main] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest strategy: matrix: node-version: [18, 20, 22] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm ci - run: npm run lint - run: npm run typecheck - run: npm test -- --coverage - uses: actions/upload-artifact@v4 if: matrix.node-version == 20 with: name: coverage path: coverage/

Core Concepts

Workflow Patterns

PatternTriggerUse Case
CI Pipelinepush, pull_requestTest, lint, build on every change
Deploypush to main, releaseDeploy to staging/production
Scheduledcron scheduleDependency audit, cleanup, reports
Manualworkflow_dispatchOn-demand tasks with input parameters
Reusableworkflow_callShared workflows across repositories
Matrixstrategy.matrixMulti-version, multi-platform testing

Deploy Workflow

# .github/workflows/deploy.yml name: Deploy on: push: branches: [main] concurrency: group: deploy-${{ github.ref }} cancel-in-progress: true jobs: test: uses: ./.github/workflows/ci.yml deploy-staging: needs: test runs-on: ubuntu-latest environment: staging steps: - uses: actions/checkout@v4 - run: npm ci && npm run build - uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CF_API_TOKEN }} command: deploy --env staging deploy-production: needs: deploy-staging runs-on: ubuntu-latest environment: name: production url: https://myapp.com steps: - uses: actions/checkout@v4 - run: npm ci && npm run build - uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CF_API_TOKEN }} command: deploy --env production

Reusable Workflow

# .github/workflows/reusable-test.yml name: Reusable Test Workflow on: workflow_call: inputs: node-version: type: string default: '20' secrets: NPM_TOKEN: required: false jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ inputs.node-version }} - run: npm ci - run: npm test

Configuration

ParameterTypeDefaultDescription
runnerstring"ubuntu-latest"GitHub-hosted runner OS
node_versionsarray["20"]Node.js versions for matrix testing
cachestring"npm"Dependency caching: npm, yarn, pnpm
concurrencybooleantrueCancel in-progress runs on new push
environmentsarray["staging", "production"]Deployment environments
branchstring"main"Primary branch for triggers
timeout_minutesnumber15Job timeout in minutes

Best Practices

  1. Use concurrency to cancel redundant runs — when a new push arrives while CI is running on the same branch, cancel the old run to save compute minutes and provide faster feedback.

  2. Cache dependencies between runs — use actions/setup-node with cache: 'npm' or actions/cache to avoid downloading dependencies on every run; this typically saves 30-60 seconds per job.

  3. Use environments for deployment protection — configure required reviewers and wait timers on the production environment to prevent accidental production deployments.

  4. Pin action versions to specific SHA or major version — use actions/checkout@v4 not @main and critical third-party actions pinned to SHA; unpinned actions can change behavior unexpectedly.

  5. Split large workflows into reusable components — extract common patterns (test, build, deploy) into reusable workflows with workflow_call; this reduces duplication and ensures consistency across repositories.

Common Issues

Actions cache grows too large and is evicted — GitHub caches have a 10GB limit per repository. Key caches by lock file hash (hashFiles('**/package-lock.json')) so old caches are replaced when dependencies change.

Secrets not available in pull request workflows — For security, secrets are not available to workflows triggered by PRs from forks. Use pull_request_target trigger for trusted operations, but be careful not to execute untrusted code with secrets access.

Matrix builds take too long — Testing across 4 Node versions, 3 OS platforms creates 12 jobs. Only test the full matrix on the main branch; for PRs, test the primary version only and run the full matrix as a nightly scheduled workflow.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates