Skip to content
building-cicd-configs logo

CI/CD Config Builder

building-cicd-configs

Generates or updates CI/CD pipeline configurations for GitHub Actions, GitLab CI, or CircleCI. Use when the user asks to set up CI/CD, create workflows, automate deployment, or mentions GitHub Actions, pipelines, or continuous integration.

SKILL.md

Full skill instructions

CI/​CD Config Builder

When to use this skill

  • User asks to set up CI/​CD for a project
  • User wants to create GitHub Actions workflows
  • User mentions GitLab CI or CircleCI
  • User wants to automate linting, testing, or deployment
  • User asks to add a pipeline step or job

Workflow

  • Detect project type and framework
  • Identify target CI/​CD platform
  • Determine required pipeline stages
  • Generate pipeline configuration
  • Validate config syntax locally
  • Present for user approval

Instructions

Step 1: Detect Project Type

Check for framework indicators:

FrameworkIndicators
Next.jsnext.config.*, "next" in package.json
Nuxtnuxt.config.*, "nuxt" in package.json
Vitevite.config.*, "vite" in package.json
Node.jspackage.json without frontend framework
Staticindex.html at root, no package.json
Pythonrequirements.txt, pyproject.toml, setup.py

Detect package manager:

ls package-lock.json yarn.lock pnpm-lock.yaml bun.lockb 2>/​dev/​null | head -1

Check for existing scripts:

npm pkg get scripts 2>/​dev/​null

Step 2: Identify CI/​CD Platform

Check for existing configs:

ls -la .github/​workflows/ .gitlab-ci.yml .circleci/​config.yml 2>/​dev/​null

Platform selection:

  • GitHub Actions: Default for GitHub repos, .github/​workflows/​*.yml
  • GitLab CI: For GitLab repos, .gitlab-ci.yml
  • CircleCI: If .circleci/ exists or user specifies

Step 3: Determine Pipeline Stages

Standard pipeline flow:

install → lint → test → build → deploy

Required stages based on project:

  • Has ESLint/​Prettier → include lint
  • Has test framework → include test
  • Has build script → include build
  • Has deployment target → include deploy

Step 4: Generate Configuration

GitHub Actions (Node.js/​Next.js):

name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  ci:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/​checkout@v4

      - name: Setup Node.js
        uses: actions/​setup-node@v4
        with:
          node-version: "20"
          cache: "npm"

      - name: Install dependencies
        run: npm ci

      - name: Lint
        run: npm run lint

      - name: Test
        run: npm test

      - name: Build
        run: npm run build

GitHub Actions (with matrix):

jobs:
  ci:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [18, 20, 22]

    steps:
      - uses: actions/​checkout@v4

      - name: Setup Node.js ${{ matrix.node-version }}
        uses: actions/​setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"

      - run: npm ci
      - run: npm run lint
      - run: npm test

GitLab CI:

stages:
  - install
  - lint
  - test
  - build

variables:
  npm_config_cache: "$CI_PROJECT_DIR/​.npm"

cache:
  paths:
    - .npm/
    - node_modules/

install:
  stage: install
  image: node:20
  script:
    - npm ci

lint:
  stage: lint
  image: node:20
  script:
    - npm run lint

test:
  stage: test
  image: node:20
  script:
    - npm test
  coverage: '/​All files[^|]*\|[^|]*\s+([\d\.]+)/'

build:
  stage: build
  image: node:20
  script:
    - npm run build
  artifacts:
    paths:
      - dist/

CircleCI:

version: 2.1

orbs:
  node: circleci/​node@5

jobs:
  build-and-test:
    executor:
      name: node/​default
      tag: "20"
    steps:
      - checkout
      - node/​install-packages
      - run:
          name: Lint
          command: npm run lint
      - run:
          name: Test
          command: npm test
      - run:
          name: Build
          command: npm run build

workflows:
  ci:
    jobs:
      - build-and-test

Step 5: Add Deployment (Optional)

Vercel (GitHub Actions):

deploy:
  needs: ci
  runs-on: ubuntu-latest
  if: github.ref == 'refs/​heads/​main'
  steps:
    - uses: actions/​checkout@v4
    - uses: amondnet/​vercel-action@v25
      with:
        vercel-token: ${{ secrets.VERCEL_TOKEN }}
        vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
        vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
        vercel-args: "--prod"

AWS S3 (GitHub Actions):

deploy:
  needs: ci
  runs-on: ubuntu-latest
  if: github.ref == 'refs/​heads/​main'
  steps:
    - uses: actions/​checkout@v4
    - run: npm ci && npm run build
    - uses: aws-actions/​configure-aws-credentials@v4
      with:
        aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        aws-region: us-east-1
    - run: aws s3 sync ./​dist s3://${{ secrets.S3_BUCKET }} --delete

Step 6: Validate Configuration

GitHub Actions:

# Install actionlint
brew install actionlint
actionlint .github/​workflows/​*.yml

GitLab CI:

# Use GitLab's CI Lint API or local validation
gitlab-ci-lint .gitlab-ci.yml

CircleCI:

circleci config validate .circleci/​config.yml

YAML syntax check:

npx yaml-lint .github/​workflows/​*.yml

Common Additions

Environment variables:

env:
  NODE_ENV: production
  CI: true

Caching (GitHub Actions):

- uses: actions/​cache@v4
  with:
    path: ~/​.npm
    key: ${{ runner.os }}-node-${{ hashFiles('**/​package-lock.json') }}

Conditional jobs:

if: github.event_name == 'push' && github.ref == 'refs/​heads/​main'

Secrets reference:

${{ secrets.SECRET_NAME }}

Validation

Before completing:

  • Config syntax is valid
  • All referenced scripts exist in package.json
  • Secrets are documented (not values, just names needed)
  • Node version matches project requirements
  • Cache configuration is correct for package manager

Error Handling

  • Workflow not triggering: Check branch names and on: triggers match.
  • Action not found: Verify action version exists (e.g., @v4 not @v5).
  • Secrets missing: Document required secrets for user to add in repo settings.
  • Syntax error: Run actionlint or YAML linter locally.
  • Unsure about syntax: Check platform documentation or run --help on CLI tools.

Resources

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View