CI/CD Setup

VerifiedSafe

Set up automated CI/CD pipelines using GitHub Actions. Creates testing, building, and deployment workflows.

Sby Skills Guide Bot
DevOpsIntermediate
7/30/2026
Claude CodeCursorWindsurfCopilotCodex
#ci-cd#github-actions#deployment#automation#pipelines

Recommended for

Automated summary

Generates GitHub Actions workflows for continuous integration and deployment, covering linting, testing, building, and per-environment deploys.

Strengths

  • Ships complete, adaptable YAML skeletons for Python, Node.js, and Go
  • Covers the full chain: tests with coverage, Docker image build, then staging and production deploys
  • Explains trigger rules (push, pull_request, tags) and job dependencies through needs
  • Includes dependency caching patterns for pip and npm

Limitations

  • Scoped to GitHub Actions; no examples for GitLab CI, CircleCI, or Jenkins
  • Deployment steps use generic ssh and docker-compose commands rather than real cloud platform integrations
  • Secret handling goes no further than referencing GitHub variables, and hardened workflow security is not addressed
When to use it

Use it when a project needs a GitHub Actions pipeline that automates testing, building, and deployment.

When not to use it

Skip it if your code lives outside GitHub or you need advanced pipeline security hardening.

Security analysis

Safe
Quality score88/100

The skill only uses Read, Write, and Edit tools to create CI/CD workflow files and documentation. It does not execute any commands itself, and its examples are standard GitHub Actions configurations. Secrets are handled according to best practices (using GitHub secrets, not hardcoding), and no destructive or exfiltrating actions are instructed.

No concerns found

How this analysis is made

Examples

New project CI
Set up GitHub Actions CI for my Python project: run pytest on every push and pull request to main, with pip caching.
Full pipeline with deploys
Create a CI/CD workflow that tests on every push, builds and pushes a Docker image on main, deploys to staging, and deploys to production only on version tags.
Node.js pipeline
Automate testing for my Node.js app with a GitHub Actions workflow using npm ci and Node 20, triggered on pull requests.

name: ci-cd-setup description: "Set up GitHub Actions or other CI/CD pipelines. Creates automated testing, building, and deployment workflows. Use when user says 'CI', 'CD', 'GitHub Actions', 'pipeline', 'automate testing', or 'deploy automation'." allowed-tools: Read, Write, Edit

CI/CD Setup

You are an expert at setting up CI/CD pipelines.

When To Use

  • User says "Set up CI", "GitHub Actions"
  • User asks to "Automate testing/deployment"
  • New project needs CI/CD
  • Adding deployment automation

Inputs

  • Test command
  • Build command
  • Deployment target (if any)
  • Branch strategy

Outputs

  • .github/workflows/ci.yml
  • Optional: deployment workflow
  • Documentation

Basic CI Workflow

name: CI

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

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"
          cache: "pip"

      - name: Install dependencies
        run: pip install -r requirements.txt

      - name: Run tests
        run: pytest --cov=src --cov-report=xml

      - name: Upload coverage
        uses: codecov/codecov-action@v4
        with:
          file: coverage.xml

Workflow Stages

| Stage | Purpose | When | |-------|---------|------| | Lint | Code style | Every push | | Test | Unit/integration tests | Every push | | Build | Create artifacts | On main/tags | | Deploy staging | Deploy to staging | On main | | Deploy prod | Deploy to production | On tags |

Language-Specific Workflows

Python

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
          cache: "pip"
      - run: pip install -r requirements.txt
      - run: pytest

Node.js

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

Go

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version: "1.21"
      - run: go test ./...

Full CI/CD Example

name: CI/CD

on:
  push:
    branches: [main]
    tags: ['v*']
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
          cache: "pip"
      - run: pip install -r requirements.txt
      - run: pytest

  build:
    needs: test
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
    steps:
      - uses: actions/checkout@v4
      - name: Build Docker image
        run: docker build -t myapp:${{ github.sha }} .
      - name: Push to registry
        run: |
          echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
          docker push myapp:${{ github.sha }}

  deploy-staging:
    needs: build
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'
    environment: staging
    steps:
      - name: Deploy to staging
        run: |
          ssh user@staging "docker pull myapp:${{ github.sha }} && docker-compose up -d"

  deploy-production:
    needs: build
    runs-on: ubuntu-latest
    if: startsWith(github.ref, 'refs/tags/')
    environment: production
    steps:
      - name: Deploy to production
        run: |
          ssh user@production "docker pull myapp:${{ github.sha }} && docker-compose up -d"

Caching

pip

- uses: actions/setup-python@v5
  with:
    cache: "pip"

npm

- uses: actions/setup-node@v4
  with:
    cache: "npm"

Custom cache

- uses: actions/cache@v4
  with:
    path: ~/.cache/custom
    key: custom-${{ runner.os }}-${{ hashFiles('**/lockfile') }}

Secrets Management

steps:
  - name: Deploy
    env:
      API_KEY: ${{ secrets.API_KEY }}
    run: ./deploy.sh

Add secrets in: Settings → Secrets and variables → Actions

Branch Protection

Recommended settings:

  • Require pull request reviews
  • Require status checks to pass
  • Require branches to be up to date
  • Include administrators

Anti-Patterns

  • No caching (slow builds)
  • Secrets in workflow files
  • No branch protection
  • Missing status checks before merge
  • Running tests only on main (should run on PRs)
  • No environment separation

Keywords

CI, CD, GitHub Actions, pipeline, automate testing, deploy, workflow

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/ci-cd-setup-ms71b38a/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/ci-cd-setup-ms71b38a' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/ci-cd-setup-ms71b38a/download' --output '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md.part' && mv '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md.part' '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Write, Edit

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md' && test -s '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/ci-cd-setup' && cp -R '.skill-downloads/ci-cd-setup-ms71b38a' '.claude/skills/ci-cd-setup'

Cursor
test -f '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md' && test -s '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/ci-cd-setup' && cp -R '.skill-downloads/ci-cd-setup-ms71b38a' '.cursor/skills/ci-cd-setup'

Codex
test -f '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md' && test -s '.skill-downloads/ci-cd-setup-ms71b38a/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/ci-cd-setup' && cp -R '.skill-downloads/ci-cd-setup-ms71b38a' '.agents/skills/ci-cd-setup'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/ci-cd-setup-ms71b38a'

openskills read 'ci-cd-setup-ms71b38a'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/ci-cd-setup-ms71b38a/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills